Extensions list: sort_by parameter #159

Merged
Márton Lente merged 36 commits from filter-sort into main 2024-06-03 12:57:45 +02:00
Showing only changes of commit 3640061d7d - Show all commits

View File

@ -7,31 +7,13 @@
<div class="row {% if type == 'Add-ons' %}is-row-add-ons{% elif type == 'Themes' %}is-row-themes{% endif %}">
<div class="col-md-12 my-4">
{% if type %}
<h2>{{ type }}</h2>
{% else %}
{% if author %}
<h2>{% blocktranslate %}Extensions by{% endblocktranslate %} <em class="search-highlight">{{ author }}</em></h2>
{% endif %}
{% if team %}
<h2>{% blocktranslate %}Extensions by{% endblocktranslate %} <em class="search-highlight">{{ team.name }}</em></h2>
{% endif %}
{% if tag %}
<h2 class="d-flex align-items-center">
<span class="me-3">{% blocktranslate %}Extensions with the tag{% endblocktranslate %}</span>
{% include "extensions/components/badge_tag.html" %}
</h2>
{% endif %}
{% if request.GET.q %}
<h2>{{ page_obj.paginator.count }} result{{ page_obj.paginator.count | pluralize }} for <em class="search-highlight">{{ request.GET.q }}</em></h2>
{% endif %}
{% endif %}
<div class="row mb-3">
<div class="col-md-12 d-flex">
<h2 class="me-auto">{{ type }}</h2>
{% if tags %}
<div class="mb-3 row">
<div class="col-md-12">
<div class="d-flex flex-column flex-md-row">
<div class="align-items-center d-flex flex-shrink-0 justify-content-between mb-2 mb-md-0 me-md-3">
<div class="box dropdown p-2 rounded-2">
<div class="box dropdown me-md-3 p-2 rounded-2">
<button class="align-items-center d-flex dropdown-toggle js-dropdown-toggle" data-toggle-menu-id="js-dropdown-filter">
{% if tag %}
{{ tag.name }}
@ -77,7 +59,6 @@
{% endfor %}
</ul>
</div>
</div>
<div class="box dropdown p-2 rounded-2">
<button class="dropdown-toggle js-dropdown-toggle" data-toggle-menu-id="js-dropdown-sort">
Sort by <i class="i-chevron-down"></i>
@ -121,8 +102,25 @@
</ul>
</div>
</div>
{% endif %}
</div>
</div>
{% else %}
{% if author %}
<h2>{% blocktranslate %}Extensions by{% endblocktranslate %} <em class="search-highlight">{{ author }}</em></h2>
{% endif %}
{% if team %}
<h2>{% blocktranslate %}Extensions by{% endblocktranslate %} <em class="search-highlight">{{ team.name }}</em></h2>
{% endif %}
{% if tag %}
<h2 class="d-flex align-items-center">
<span class="me-3">{% blocktranslate %}Extensions with the tag{% endblocktranslate %}</span>
{% include "extensions/components/badge_tag.html" %}
</h2>
{% endif %}
{% if request.GET.q %}
<h2>{{ page_obj.paginator.count }} result{{ page_obj.paginator.count | pluralize }} for <em class="search-highlight">{{ request.GET.q }}</em></h2>
{% endif %}
{% endif %}
<div class="row">