1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 09:10:00 +00:00

Add number of comments to torrent lists

Will only show when number of comments is above zero.
This commit is contained in:
Kfir Hadas 2017-05-23 10:51:28 +03:00
parent b6ecad898d
commit 90695cad11
2 changed files with 20 additions and 5 deletions

View file

@ -62,6 +62,18 @@ table.torrent-list tbody tr td a:visited {
color: #1d4568;
}
table.torrent-list tbody .comments {
float: right;
border: 1px solid #d7d7d7;
border-radius: 3px;
color: #383838;
padding: 0 5px 0 5px;
background-color: #ffffff;
}
table.torrent-list tbody .comments i {
padding-right: 2px;
}
#torrent-description img {
max-width: 100%;
}

View file

@ -68,11 +68,14 @@
<img src="/static/img/icons/{{ icon_dir }}/{{ cat_id }}.png" alt="{{ category_name(cat_id) }}">
</a>
</td>
{% if use_elastic %}
<td><a href="{{ url_for('view_torrent', torrent_id=torrent.meta.id) }}" title="{{ torrent.display_name | escape }}">{%if "highlight" in torrent.meta %}{{ torrent.meta.highlight.display_name[0] | safe }}{% else %}{{torrent.display_name}}{%endif%}</a></td>
{% else %}
<td><a href="{{ url_for('view_torrent', torrent_id=torrent.id) }}" title="{{ torrent.display_name | escape }}">{{ torrent.display_name | escape }}</a></td>
{% endif %}
<td>
{% if torrent.comments %}<span class="comments"><i class="fa fa-comments-o"></i>{{ torrent.comments | length }}</span>{% endif %}
{% if use_elastic %}
<a href="{{ url_for('view_torrent', torrent_id=torrent.meta.id) }}" title="{{ torrent.display_name | escape }}">{%if "highlight" in torrent.meta %}{{ torrent.meta.highlight.display_name[0] | safe }}{% else %}{{torrent.display_name}}{%endif%}</a>
{% else %}
<a href="{{ url_for('view_torrent', torrent_id=torrent.id) }}" title="{{ torrent.display_name | escape }}">{{ torrent.display_name | escape }}</a>
{% endif %}
</td>
<td style="white-space: nowrap;text-align: center;">
{% if torrent.has_torrent %}<a href="{{ url_for('download_torrent', torrent_id=torrent.id) }}"><i class="fa fa-fw fa-download"></i></a>{% endif %}
{% if use_elastic %}