mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-13 02:53:51 +01:00
Move tag list to top of package list page
This commit is contained in:
parent
ae4352068e
commit
ec087e4687
@ -19,48 +19,45 @@
|
|||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row">
|
<aside class="mb-5">
|
||||||
<div class="col-md-9">
|
<p class="text-muted">Filter by tags</p>
|
||||||
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
|
||||||
{{ render_pkggrid(packages) }}
|
|
||||||
|
|
||||||
|
{% for pair in tags %}
|
||||||
|
{% set count = pair[0] %}
|
||||||
|
{% set tag = pair[1] %}
|
||||||
|
|
||||||
{% from "macros/pagination.html" import render_pagination %}
|
{% if tag in selected_tags %}
|
||||||
{{ render_pagination(pagination, url_set_query) }}
|
<a class="badge badge-primary"
|
||||||
|
href="{{ url_set_query(page=1, _remove={ 'tag': tag.name }) }}">
|
||||||
|
|
||||||
|
{{ tag.title }}
|
||||||
|
({{ count }})
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="badge badge-secondary"
|
||||||
|
href="{{ url_set_query(page=1, _add={ 'tag': tag.name }) }}">
|
||||||
|
|
||||||
{% if topics %}
|
{{ tag.title }}
|
||||||
<h2 style="margin-top:2em;">More content from the forums</h2>
|
({{ count }})
|
||||||
|
</a>
|
||||||
{% from "macros/topics.html" import render_topics %}
|
|
||||||
{{ render_topics(topics, current_user) }}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
{% endfor %}
|
||||||
|
</aside>
|
||||||
|
|
||||||
<aside class="col-md-3">
|
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
||||||
<p class="text-muted">Filter by tags</p>
|
{{ render_pkggrid(packages) }}
|
||||||
|
|
||||||
{% for pair in tags %}
|
|
||||||
{% set count = pair[0] %}
|
|
||||||
{% set tag = pair[1] %}
|
|
||||||
|
|
||||||
{% if tag in selected_tags %}
|
{% from "macros/pagination.html" import render_pagination %}
|
||||||
<a class="badge badge-primary"
|
{{ render_pagination(pagination, url_set_query) }}
|
||||||
href="{{ url_set_query(page=1, _remove={ 'tag': tag.name }) }}">
|
|
||||||
|
|
||||||
{{ tag.title }}
|
|
||||||
({{ count }})
|
|
||||||
</a>
|
|
||||||
{% else %}
|
|
||||||
<a class="badge badge-secondary"
|
|
||||||
href="{{ url_set_query(page=1, _add={ 'tag': tag.name }) }}">
|
|
||||||
|
|
||||||
{{ tag.title }}
|
{% if topics %}
|
||||||
({{ count }})
|
<h2 style="margin-top:2em;">More content from the forums</h2>
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% from "macros/topics.html" import render_topics %}
|
||||||
{% endfor %}
|
{{ render_topics(topics, current_user) }}
|
||||||
</aside>
|
{% endif %}
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user