Merge pull request #192 from sharkykh/fix-file-list-inverted-icons

Fix inverted icons in file list
This commit is contained in:
Anna-Maria Meriniemi 2017-05-25 23:44:19 +03:00 committed by GitHub
commit 6524e244c2
2 changed files with 6 additions and 3 deletions

View File

@ -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)

View File

@ -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 %}