From 32fa021f34a02872c66abf27167ac15d9d0ee506 Mon Sep 17 00:00:00 2001 From: TheAMM Date: Sun, 28 May 2017 02:46:04 +0300 Subject: [PATCH] Turn comments icon on search result into link to comments Also cleans up torrent.id/torrent.meta.id --- nyaa/templates/search_results.html | 11 ++++++----- nyaa/templates/view.html | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/nyaa/templates/search_results.html b/nyaa/templates/search_results.html index fedfb2c..8313888 100644 --- a/nyaa/templates/search_results.html +++ b/nyaa/templates/search_results.html @@ -70,20 +70,21 @@ + {% set torrent_id = torrent.meta.id if use_elastic else torrent.id %} {% set com_count = torrent.comment_count %} {% if com_count %} - + {{ com_count -}} - + {% endif %} {% if use_elastic %} - {%if "highlight" in torrent.meta %}{{ torrent.meta.highlight.display_name[0] | safe }}{% else %}{{torrent.display_name}}{%endif%} + {%if "highlight" in torrent.meta %}{{ torrent.meta.highlight.display_name[0] | safe }}{% else %}{{torrent.display_name}}{%endif%} {% else %} - {{ torrent.display_name | escape }} + {{ torrent.display_name | escape }} {% endif %} - {% if torrent.has_torrent %}{% endif %} + {% if torrent.has_torrent %}{% endif %} {% if use_elastic %} {% else %} diff --git a/nyaa/templates/view.html b/nyaa/templates/view.html index 4834635..cfc1adc 100644 --- a/nyaa/templates/view.html +++ b/nyaa/templates/view.html @@ -128,7 +128,7 @@ {% endif %} -
+

Comments - {{ comments | length }}