You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/10/23 16:49:20 UTC

[20/28] allura git commit: [#7924] ticket:853 Update icons on repo pages

[#7924] ticket:853 Update icons on repo pages


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/8c635103
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/8c635103
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/8c635103

Branch: refs/heads/ib/7924
Commit: 8c6351038fb77737d1025261d11b0df0645d356a
Parents: 04552c6
Author: Igor Bondarenko <je...@gmail.com>
Authored: Thu Oct 22 19:35:12 2015 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Thu Oct 22 19:35:12 2015 +0300

----------------------------------------------------------------------
 Allura/allura/lib/app_globals.py         |  1 +
 Allura/allura/templates/repo/commit.html |  4 +---
 Allura/allura/templates/repo/file.html   |  4 +---
 Allura/allura/templates/repo/tree.html   | 10 +++-------
 4 files changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/8c635103/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index ca064bb..8e1a8ab 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -259,6 +259,7 @@ class Globals(object):
             caution=Icon('fa fa-ban', 'Caution'),
             vote_up=Icon('fa fa-plus', 'Vote Up'),
             vote_down=Icon('fa fa-minus', 'Vote Down'),
+            download=Icon('fa fa-download', 'Download'),
             # 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/8c635103/Allura/allura/templates/repo/commit.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/commit.html b/Allura/allura/templates/repo/commit.html
index 7678a32..b0f3427 100644
--- a/Allura/allura/templates/repo/commit.html
+++ b/Allura/allura/templates/repo/commit.html
@@ -32,9 +32,7 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
 
 {% block actions %}
 {{ lib.maximize_content_button() }}
-<a href="{{commit.url()}}log/">
-  <b data-icon="{{g.icons.history.char}}" class="ico {{g.icons.history.css}}" title="History"> </b> History
-</a>
+{{ g.icons['history'].render(href='{}log/'.format(commit.url()), show_title=True) }}
 {% endblock %}
 
 {% block body_top_js %}

http://git-wip-us.apache.org/repos/asf/allura/blob/8c635103/Allura/allura/templates/repo/file.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/file.html b/Allura/allura/templates/repo/file.html
index cad455b..ff3100a 100644
--- a/Allura/allura/templates/repo/file.html
+++ b/Allura/allura/templates/repo/file.html
@@ -33,9 +33,7 @@
 
 {% block actions %}
 {{ lib.maximize_content_button() }}
-<a href="{{blob.commit.url()}}log/?path={{ blob.path() }}">
-  <b data-icon="{{g.icons.history.char}}" class="ico {{g.icons.history.css}}" title="History"> </b> History
-</a>
+{{ g.icons['history'].render(href='{}log/?path={}'.format(blob.commit.url(), blob.path()), show_title=True) }}
 {% endblock %}
 
 {% block extra_js %}

http://git-wip-us.apache.org/repos/asf/allura/blob/8c635103/Allura/allura/templates/repo/tree.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tree.html b/Allura/allura/templates/repo/tree.html
index 13f69aa..1fc2d80 100644
--- a/Allura/allura/templates/repo/tree.html
+++ b/Allura/allura/templates/repo/tree.html
@@ -59,20 +59,16 @@ form.tarball button:hover {
 {% if tarball_url %}
 <form class="tarball" action="{{ tarball_url }}" method="post">
   <input type="hidden" name="path" value="{{ path or '' }}" />
-  <button><b data-icon="{{g.icons.folder.char}}" class="ico {{g.icons.folder.css}}" title="Snapshot"></b> Download Snapshot</button>
+  <button>{{ g.icons['download'].render(title='Download Snapshot', show_title=True) }}</button>
   {{lib.csrf_token()}}
 </form>
 {% endif %}
 
-<a href="{{commit.url()}}log/?path={{ path }}">
-  <b data-icon="{{g.icons.history.char}}" class="ico {{g.icons.history.css}}" title="History"> </b> History
-</a>
+{{ g.icons['history'].render(href='{}log/?path={}'.format(commit.url(), path), show_title=True) }}
 {% if c.user and c.user != c.user.anonymous() %}
   {{c.subscribe_form.display(value=tool_subscribed, tool_subscribed=tool_subscribed, action='subscribe', style='icon')}}
 {% endif %}
-<a href="{{c.app.url}}feed/">
-  <b data-icon="{{g.icons.feed.char}}" class="ico {{g.icons.feed.css}}" title="Feed"> </b>
-</a>
+{{ g.icons['feed'].render(href='{}feed/'.format(c.app.url)) }}
 {% endblock %}
 
 {% block content %}