mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 09:19:59 +00:00
templates/search_results.html: use url_for for the appropriate endpoints
This commit is contained in:
parent
8b7712b1d0
commit
c178f905b0
|
@ -12,7 +12,7 @@
|
|||
{% if special_results is defined and not search.user %}
|
||||
{% if special_results.first_word_user %}
|
||||
<div class="alert alert-info">
|
||||
<a href="/user/{{ special_results.first_word_user.username }}{{ modify_query(q=special_results.query_sans_user)[1:] }}">Click here to see only results uploaded by {{ special_results.first_word_user.username }}</a>
|
||||
<a href="{{ url_for('view_user', user_name=special_results.first_word_user.username) }}{{ modify_query(q=special_results.query_sans_user)[1:] }}">Click here to see only results uploaded by {{ special_results.first_word_user.username }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -61,11 +61,11 @@
|
|||
{% set icon_dir = config.SITE_FLAVOR %}
|
||||
<td style="padding:0 4px;">
|
||||
{% if use_elastic %}
|
||||
<a href="/?c={{ cat_id }}" title="{{ category_name(cat_id) }}">
|
||||
<a href="{{ url_for('home', c=cat_id) }}" title="{{ category_name(cat_id) }}">
|
||||
{% else %}
|
||||
<a href="/?c={{ cat_id }}" title="{{ torrent.main_category.name }} - {{ torrent.sub_category.name }}">
|
||||
<a href="{{ url_for('home', c=cat_id) }}" title="{{ torrent.main_category.name }} - {{ torrent.sub_category.name }}">
|
||||
{% endif %}
|
||||
<img src="/static/img/icons/{{ icon_dir }}/{{ cat_id }}.png" alt="{{ category_name(cat_id) }}">
|
||||
<img src="{{ url_for('static', filename='img/icons/%s/%s.png'|format(icon_dir, cat_id)) }}" alt="{{ category_name(cat_id) }}">
|
||||
</a>
|
||||
</td>
|
||||
{% if use_elastic %}
|
||||
|
|
Loading…
Reference in a new issue