You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2014/02/20 21:15:01 UTC

[3/3] git commit: [#4703] Cleanup text of related artifact links

[#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 <tv...@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 <tv...@gmail.com>
Authored: Thu Feb 20 20:14:06 2014 +0000
Committer: Tim Van Steenburgh <tv...@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 %}