mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 01:03:31 +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}"/>
|
||||
|
||||
Reference in New Issue
Block a user