Browse Source

add filter attributes support for pagination and tag links #35

main
ghost 1 year ago
parent
commit
deb35d5013
  1. 25
      templates/default/torrent/list.html.twig

25
templates/default/torrent/list.html.twig

@ -80,7 +80,11 @@
{% if torrent.keywords %} {% if torrent.keywords %}
<div class="margin-b-16-px"> <div class="margin-b-16-px">
{% for keyword, quantity in torrent.keywords %} {% for keyword, quantity in torrent.keywords %}
<a href="{{ path('torrent_search', { query : keyword | url_encode(true) }) }}"> <a href="{{ path('torrent_search', { query : keyword | url_encode(true),
locales : app.request.get('locales'),
categories : app.request.get('categories'),
sensitive : app.request.get('sensitive'),
filter : app.request.get('filter') }) }}">
#{{ keyword }} #{{ keyword }}
</a> </a>
{% endfor %} {% endfor %}
@ -169,17 +173,30 @@
{% if query %} {% if query %}
{% if pagination.page > 1 %} {% if pagination.page > 1 %}
{% if pagination.page == 2 %} {% if pagination.page == 2 %}
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_search', { query : query | url_encode(true) | raw }) }}"> <a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_search', { query : query | url_encode(true) | raw,
locales : app.request.get('locales'),
categories : app.request.get('categories'),
sensitive : app.request.get('sensitive'),
filter : app.request.get('filter') }) }}">
{{ 'Back' | trans | lower }} {{ 'Back' | trans | lower }}
</a> </a>
{% else %} {% else %}
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_search', { query : query | url_encode(true), page : pagination.page - 1 }) }}"> <a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_search', { query : query | url_encode(true), page : pagination.page - 1,
locales : app.request.get('locales'),
categories : app.request.get('categories'),
sensitive : app.request.get('sensitive'),
filter : app.request.get('filter') }) }}">
{{ 'Back' | trans | lower }} {{ 'Back' | trans | lower }}
</a> </a>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if pagination.page < pagination.pages %} {% if pagination.page < pagination.pages %}
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_search', { query : query | url_encode(true), page : pagination.page + 1 }) }}"> <a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_search', { query : query | url_encode(true),
page : pagination.page + 1,
locales : app.request.get('locales'),
categories : app.request.get('categories'),
sensitive : app.request.get('sensitive'),
filter : app.request.get('filter') }) }}">
{{ 'Next' | trans | lower }} {{ 'Next' | trans | lower }}
</a> </a>
{% endif %} {% endif %}

Loading…
Cancel
Save