incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [19/21] git commit: [#6463] Encapsulate importer icon
Date Tue, 23 Jul 2013 16:59:40 GMT
[#6463] Encapsulate importer icon

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>


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

Branch: refs/heads/tv/6463
Commit: 3d9d59b5b3a5ffcce9f53e767b85803cefe39b3f
Parents: c4874bb
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Tue Jul 23 16:56:57 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Jul 23 16:56:57 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/base.py                     | 3 +++
 ForgeImporters/forgeimporters/templates/project_base.html | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3d9d59b5/ForgeImporters/forgeimporters/base.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/base.py b/ForgeImporters/forgeimporters/base.py
index 334b89a..777eb8a 100644
--- a/ForgeImporters/forgeimporters/base.py
+++ b/ForgeImporters/forgeimporters/base.py
@@ -105,6 +105,9 @@ class ToolImporter(object):
     def tool_description(self):
         return getattr(aslist(self.target_app)[0], 'tool_description', None)
 
+    def tool_icon(self, theme, size):
+        return theme.app_icon_url(aslist(self.target_app)[0], size)
+
 
 class ToolsValidator(fev.Set):
     def __init__(self, source, *a, **kw):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3d9d59b5/ForgeImporters/forgeimporters/templates/project_base.html
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/templates/project_base.html b/ForgeImporters/forgeimporters/templates/project_base.html
index bd37665..fc654f2 100644
--- a/ForgeImporters/forgeimporters/templates/project_base.html
+++ b/ForgeImporters/forgeimporters/templates/project_base.html
@@ -38,7 +38,7 @@
         {% endif %}
         {% for name, tool_importer in importer.tool_importers.iteritems() %}
         <div class="tool">
-            <img src="{{ g.theme.app_icon_url(tool_importer.target_app, 48) }}" alt="{{
tool_importer.tool_label }} icon">
+            <img src="{{ tool_importer.tool_icon(g.theme, 48) }}" alt="{{ tool_importer.tool_label
}} icon">
             <label>
                 <input name="tools" value="{{name}}" type="checkbox"{% if not c.form_errors
or name in c.form_values['tools'] %} checked="checked"{% endif %}/>
                 {{tool_importer.tool_label}}


Mime
View raw message