mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-08 22:35:00 +02:00
related to #1461 Adding natural sort order ASC and DESC
This commit is contained in:
+4
-2
@@ -30,7 +30,9 @@ $sort_orders = array(
|
||||
'date_creation DESC',
|
||||
'date_creation ASC',
|
||||
'date_available DESC',
|
||||
'date_available ASC'
|
||||
'date_available ASC',
|
||||
'natural_order DESC',
|
||||
'natural_order ASC'
|
||||
);
|
||||
|
||||
if (isset($_POST['simpleAutoOrder']) || isset($_POST['recursiveAutoOrder']) )
|
||||
@@ -98,7 +100,7 @@ SELECT id, name, id_uppercat
|
||||
|
||||
array_multisort(
|
||||
$sort,
|
||||
SORT_REGULAR,
|
||||
$order_by_field === "natural_order" ? SORT_NATURAL : SORT_REGULAR,
|
||||
'ASC' == $order_by_asc ? SORT_ASC : SORT_DESC,
|
||||
$categories
|
||||
);
|
||||
|
||||
@@ -72,6 +72,18 @@ var delay_autoOpen = {$delay_before_autoOpen}
|
||||
<input type="radio" value="date_available ASC" name="order">
|
||||
{'Date posted, old → new'|@translate}
|
||||
</label>
|
||||
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-dot-circled"> </span>
|
||||
<input type="radio" value="natural_order ASC" name="order">
|
||||
{'Natural order, A → Z'|@translate}
|
||||
</label>
|
||||
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-dot-circled"> </span>
|
||||
<input type="radio" value="natural_order DESC" name="order">
|
||||
{'Natural order, Z → A'|@translate}
|
||||
</label>
|
||||
</div>
|
||||
<input type="submit" name="simpleAutoOrder" value="{'Apply to direct sub-albums'|@translate}"/>
|
||||
<input type="submit" name="recursiveAutoOrder" value="{'Apply to the whole hierarchy'|@translate}"/>
|
||||
|
||||
@@ -415,4 +415,6 @@ $lang['Your authentication key is no longer valid.'] = 'Your authentication key
|
||||
$lang['Invalid username or password!'] = 'Invalid username or password!';
|
||||
$lang['generate random password'] = 'generate random password';
|
||||
$lang['Related albums'] = 'Related albums';
|
||||
$lang['Natural order, A → Z'] = 'Natural order, A → Z';
|
||||
$lang['Natural order, Z → A'] = 'Natural order, Z → A';
|
||||
?>
|
||||
|
||||
@@ -413,4 +413,6 @@ $lang['Link: %s'] = 'Lien: %s';
|
||||
$lang['Your authentication key is no longer valid.'] = 'Votre clef d\'identification n\'est plus valide.';
|
||||
$lang['Invalid username or password!'] = 'Nom d\'utilisateur ou mot de passe invalide !';
|
||||
$lang['generate random password'] = 'générer un mot de passe aléatoire';
|
||||
$lang['Related albums'] = 'Albums liés';
|
||||
$lang['Related albums'] = 'Albums liés';
|
||||
$lang['Natural order, A → Z'] = 'Ordre naturel, A → Z';
|
||||
$lang['Natural order, Z → A'] = 'Ordre naturel, Z → A';
|
||||
Reference in New Issue
Block a user