incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [3/3] git commit: [#4703] Cleanup text of related artifact links
Date Thu, 20 Feb 2014 20:15:01 GMT
[#4703] Cleanup text of related artifact links

- Only show project if different than current.
- Show tool label instead of artifact type.

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/2faedb5e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2faedb5e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2faedb5e

Branch: refs/heads/master
Commit: 2faedb5edc3a95f3208ea9449a6a1800650326c0
Parents: b3df897
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Thu Feb 20 20:14:06 2014 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Thu Feb 20 20:14:06 2014 +0000

----------------------------------------------------------------------
 Allura/allura/templates/jinja_master/lib.html | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2faedb5e/Allura/allura/templates/jinja_master/lib.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/lib.html b/Allura/allura/templates/jinja_master/lib.html
index ae7156c..cad88ef 100644
--- a/Allura/allura/templates/jinja_master/lib.html
+++ b/Allura/allura/templates/jinja_master/lib.html
@@ -35,14 +35,13 @@
     <h4>Related</h4>
     <p>
     {% for related in related_artifacts %}
-      {% set project=related.app_config.project.name %}
-      {% set tool=related.app_config.options.mount_label %}
-      {% if project and tool %}
-        {% set prefix='%s [%s]' % (project, tool) %}
-      {% elif tool %}
-        {% set prefix='[%s]' % (tool,) %}
+      {% set tool = related.app_config.options.mount_label %}
+      {% if related.project != artifact.project %}
+        {% set prefix = '%s: %s' % (related.project.name, tool) %}
+      {% else %}
+        {% set prefix = tool %}
       {% endif %}
-      <a href="{{related.url()}}">{{prefix}} {{related.type_s}}: {{related.link_text()}}</a><br>
+      <a href="{{related.url()}}">{{prefix}}: {{related.link_text()}}</a><br>
     {% endfor %}
     </p>
   {% endif %}


Mime
View raw message