You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2015/10/29 15:36:46 UTC
[04/50] [abbrv] allura git commit: [#7924] ticket:858 Use file icon
for files in repo tree view
[#7924] ticket:858 Use file icon for files in repo tree view
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/c58d4327
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/c58d4327
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/c58d4327
Branch: refs/heads/db/7919
Commit: c58d43273d8b2890d1911c6db9a3e6e8138b6095
Parents: cc64774
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Oct 27 16:58:45 2015 +0200
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Tue Oct 27 16:58:45 2015 +0200
----------------------------------------------------------------------
Allura/allura/lib/app_globals.py | 1 +
.../templates/widgets/repo/tree_widget.html | 18 +++++++++---------
2 files changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/c58d4327/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index df34964..f03da38 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -262,6 +262,7 @@ class Globals(object):
download=Icon('fa fa-download', 'Download'),
revert=Icon('fa fa-history', 'Revert'),
browse_commits=Icon('fa fa-list', 'Browse Commits'),
+ file=Icon('fa fa-file-o', 'File'),
# Permissions
perm_read=Icon('fa fa-eye', 'Read'),
perm_update=Icon('fa fa-rotate-left', 'Update'),
http://git-wip-us.apache.org/repos/asf/allura/blob/c58d4327/Allura/allura/templates/widgets/repo/tree_widget.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/repo/tree_widget.html b/Allura/allura/templates/widgets/repo/tree_widget.html
index c65ab51..c619b94 100644
--- a/Allura/allura/templates/widgets/repo/tree_widget.html
+++ b/Allura/allura/templates/widgets/repo/tree_widget.html
@@ -43,15 +43,15 @@
{% for dirent in tree.ls() %}
<tr>
<td class="nowrap">
- <a href="{{h.urlquote(dirent.href)}}">
- {% if dirent.kind == 'DIR' %}
- {% set icon_name = 'folder' %}
- {% else %}
- {% set icon_name = 'table' %}
- {% endif %}
- {{ g.icons[icon_name].render(tag='b', title=h.really_unicode(dirent.name)) }}
- <span>{{ h.really_unicode(dirent.name) }}</span>
- </a>
+ {% if dirent.kind == 'DIR' %}
+ {% set icon_name = 'folder' %}
+ {% else %}
+ {% set icon_name = 'file' %}
+ {% endif %}
+ {{ g.icons[icon_name].render(
+ href=h.urlquote(dirent.href),
+ title=h.really_unicode(dirent.name),
+ show_title=True) }}
</td>
<td class="nowrap">{{lib.abbr_date(dirent.last_commit.date)}}</td>
<td class="nowrap">