mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
Dash, sort by issues number
This commit is contained in:
parent
9b61281df7
commit
58333456fb
1 changed files with 7 additions and 0 deletions
|
@ -44,6 +44,8 @@
|
|||
<option {% if request.args.get("sort") in [None, "stars"] %}selected{% endif %} value="stars">{{ _("Popularity stars") }}</option>
|
||||
<option {% if request.args.get("sort") == "main_branch_update" %}selected{% endif %} value="main_branch_update">{{ _("Last update on main/master branch") }}</option>
|
||||
<option {% if request.args.get("sort") == "testing_branch_update" %}selected{% endif %} value="testing_branch_update">{{ _("Last update on testing branch") }}</option>
|
||||
<option {% if request.args.get("sort") == "nb_issues" %}selected{% endif %} value="nb_issues">{{ _("Issues number") }}</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="w-fit mx-auto flex items-center px-2 pt-2">
|
||||
|
@ -400,6 +402,11 @@
|
|||
return a.dataset.app > b.dataset.app ? 1 : -1;
|
||||
});
|
||||
}
|
||||
else if (sortBy === "nb_issues") {
|
||||
toSort.sort(function(a, b) {
|
||||
return b.dataset.nbIssues - a.dataset.nbIssues;
|
||||
});
|
||||
}
|
||||
for(var i = 0, l = toSort.length; i < l; i++) {
|
||||
toSort[i].remove()
|
||||
table.appendChild(toSort[i]);
|
||||
|
|
Loading…
Add table
Reference in a new issue