mirror of
				https://github.com/sb745/NyaaV3.git
				synced 2025-11-04 01:45:46 +02: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
					
				
					 2 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
					@ -664,7 +664,9 @@ def view_torrent(torrent_id):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            flask.flash('Comment successfully posted.', 'success')
 | 
					            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
 | 
					    # 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)
 | 
					    can_edit = flask.g.user and (flask.g.user is torrent.user or flask.g.user.is_moderator)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -93,9 +93,10 @@
 | 
				
			||||||
		<ul>
 | 
							<ul>
 | 
				
			||||||
		{% for key, value in files.items() recursive -%}
 | 
							{% for key, value in files.items() recursive -%}
 | 
				
			||||||
		{% if value is iterable %}
 | 
							{% if value is iterable %}
 | 
				
			||||||
 | 
								{% set pre_expanded = not loop.depth0 and value.items()|length <= 20 %}
 | 
				
			||||||
			<li>
 | 
								<li>
 | 
				
			||||||
				<a href="" class="folder"><i class="fa fa-folder-open"></i>{{ key }}</a>
 | 
									<a href="" class="folder"><i class="fa fa-folder{% if pre_expanded %}-open{% endif %}"></i>{{ key }}</a>
 | 
				
			||||||
				<ul{% if not loop.depth0 and value.items()|length <= 20 %} data-show="yes"{% endif %}>{{ '\n' + loop(value.items()) }}
 | 
									<ul{% if pre_expanded %} data-show="yes"{% endif %}>{{ '\n' + loop(value.items()) }}
 | 
				
			||||||
				</ul>
 | 
									</ul>
 | 
				
			||||||
			</li>
 | 
								</li>
 | 
				
			||||||
		{% else %}
 | 
							{% else %}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue