mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2025-01-10 15:34:07 +00:00
Merge pull request #192 from sharkykh/fix-file-list-inverted-icons
Fix inverted icons in file list
This commit is contained in:
commit
6524e244c2
|
@ -664,7 +664,9 @@ def view_torrent(torrent_id):
|
|||
|
||||
flask.flash('Comment successfully posted.', 'success')
|
||||
|
||||
return flask.redirect(flask.url_for('view_torrent', torrent_id=torrent_id, _anchor='com-'+str(torrent_count)))
|
||||
return flask.redirect(flask.url_for('view_torrent',
|
||||
torrent_id=torrent_id,
|
||||
_anchor='com-' + str(torrent_count)))
|
||||
|
||||
# Only allow owners and admins to edit torrents
|
||||
can_edit = flask.g.user and (flask.g.user is torrent.user or flask.g.user.is_moderator)
|
||||
|
|
|
@ -93,9 +93,10 @@
|
|||
<ul>
|
||||
{% for key, value in files.items() recursive -%}
|
||||
{% if value is iterable %}
|
||||
{% set pre_expanded = not loop.depth0 and value.items()|length <= 20 %}
|
||||
<li>
|
||||
<a href="" class="folder"><i class="fa fa-folder-open"></i>{{ key }}</a>
|
||||
<ul{% if not loop.depth0 and value.items()|length <= 20 %} data-show="yes"{% endif %}>{{ '\n' + loop(value.items()) }}
|
||||
<a href="" class="folder"><i class="fa fa-folder{% if pre_expanded %}-open{% endif %}"></i>{{ key }}</a>
|
||||
<ul{% if pre_expanded %} data-show="yes"{% endif %}>{{ '\n' + loop(value.items()) }}
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
|
|
Loading…
Reference in a new issue