filescheme.py & dirbrowser.html updated

This commit is contained in:
meles5 2015-09-25 14:49:03 +02:00
parent 70597d574f
commit 8bcc0e4b92
2 changed files with 3 additions and 9 deletions

View File

@ -76,11 +76,6 @@ def dirbrowser_html(path):
# pylint: disable=no-member # pylint: disable=no-member
# https://bitbucket.org/logilab/pylint/issue/490/ # https://bitbucket.org/logilab/pylint/issue/490/
folder_icon = utils.resource_filename('img/folder.svg')
file_icon = utils.resource_filename('img/file.svg')
folder_url = QUrl.fromLocalFile(folder_icon).toString(QUrl.FullyEncoded)
file_url = QUrl.fromLocalFile(file_icon).toString(QUrl.FullyEncoded)
if is_root(path): if is_root(path):
parent = None parent = None
@ -101,8 +96,7 @@ def dirbrowser_html(path):
directories = get_file_list(path, all_files, os.path.isdir) directories = get_file_list(path, all_files, os.path.isdir)
html = template.render(title=title, url=path, icon='', html = template.render(title=title, url=path, icon='',
parent=parent, files=files, parent=parent, files=files,
directories=directories, folder_url=folder_url, directories=directories)
file_url=file_url)
return html.encode('UTF-8', errors='xmlcharrefreplace') return html.encode('UTF-8', errors='xmlcharrefreplace')

View File

@ -32,11 +32,11 @@ ul > li {
} }
ul > li { ul > li {
background-image: url('{{folder_url}}'); background-image: url('{{ resource_url('img/folder.svg') }}');
} }
ul.files > li { ul.files > li {
background-image: url('{{file_url}}'); background-image: url('{{ resource_url('img/file.svg') }}');
} }
{% endblock %} {% endblock %}