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:14:59 UTC

[1/3] git commit: [#4703] ticket:539 s/tools_name/options.mount_label/

Repository: incubator-allura
Updated Branches:
  refs/heads/master 88cdedb5d -> 2faedb5ed


[#4703] ticket:539 s/tools_name/options.mount_label/


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

Branch: refs/heads/master
Commit: b3df897d47a9ec9f30802f45d8db46f29a2e8a1e
Parents: 761a191
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Feb 18 10:07:26 2014 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Feb 20 15:38:57 2014 +0000

----------------------------------------------------------------------
 Allura/allura/templates/jinja_master/lib.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b3df897d/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 700e409..ae7156c 100644
--- a/Allura/allura/templates/jinja_master/lib.html
+++ b/Allura/allura/templates/jinja_master/lib.html
@@ -36,7 +36,7 @@
     <p>
     {% for related in related_artifacts %}
       {% set project=related.app_config.project.name %}
-      {% set tool=related.app_config.tool_name %}
+      {% set tool=related.app_config.options.mount_label %}
       {% if project and tool %}
         {% set prefix='%s [%s]' % (project, tool) %}
       {% elif tool %}


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

Posted by tv...@apache.org.
[#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 %}


[2/3] git commit: [#4703] ticket:539 Made 'related_artifacts' macro more verbose.

Posted by tv...@apache.org.
[#4703] ticket:539 Made 'related_artifacts' macro more verbose.

Made macro display list of artifacts sorted by project and tool names displaying these fields as well.


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

Branch: refs/heads/master
Commit: 761a191be38245871165dddce96ef622ee3cf8ac
Parents: 88cdedb
Author: Ferens Dmitriy <fe...@gmail.com>
Authored: Mon Feb 17 19:32:38 2014 +0200
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Feb 20 15:38:57 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/artifact.py               | 2 +-
 Allura/allura/templates/jinja_master/lib.html | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/761a191b/Allura/allura/model/artifact.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/artifact.py b/Allura/allura/model/artifact.py
index d54a08e..cd8f5e2 100644
--- a/Allura/allura/model/artifact.py
+++ b/Allura/allura/model/artifact.py
@@ -193,7 +193,7 @@ class Artifact(MappedClass):
                     artifact.set_context(app.repo)
             if artifact not in related_artifacts and (getattr(artifact, 'deleted', False) == False):
                 related_artifacts.append(artifact)
-        return related_artifacts
+        return sorted(related_artifacts, key=lambda a: a.url())
 
     def subscribe(self, user=None, topic=None, type='direct', n=1, unit='day'):
         """Subscribe ``user`` to the :class:`allura.model.notification.Mailbox`

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/761a191b/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 133eee8..700e409 100644
--- a/Allura/allura/templates/jinja_master/lib.html
+++ b/Allura/allura/templates/jinja_master/lib.html
@@ -35,7 +35,14 @@
     <h4>Related</h4>
     <p>
     {% for related in related_artifacts %}
-      <a href="{{related.url()}}">{{related.type_s}}: {{related.link_text()}}</a><br>
+      {% set project=related.app_config.project.name %}
+      {% set tool=related.app_config.tool_name %}
+      {% if project and tool %}
+        {% set prefix='%s [%s]' % (project, tool) %}
+      {% elif tool %}
+        {% set prefix='[%s]' % (tool,) %}
+      {% endif %}
+      <a href="{{related.url()}}">{{prefix}} {{related.type_s}}: {{related.link_text()}}</a><br>
     {% endfor %}
     </p>
   {% endif %}