incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject git commit: [#5913] Fixed "and 1 others" corner-case on project header admin list
Date Thu, 23 May 2013 20:11:38 GMT
Updated Branches:
  refs/heads/cj/5913 752205790 -> daf172b05


[#5913] Fixed "and 1 others" corner-case on project header admin list

Signed-off-by: Cory Johns <cjohns@slashdotmedia.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/daf172b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/daf172b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/daf172b0

Branch: refs/heads/cj/5913
Commit: daf172b05538c7f584ef72e42e1bcd7f3e427f12
Parents: 7522057
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Thu May 23 20:11:22 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Thu May 23 20:11:22 2013 +0000

----------------------------------------------------------------------
 Allura/allura/templates/jinja_master/nav_menu.html |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/daf172b0/Allura/allura/templates/jinja_master/nav_menu.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/nav_menu.html b/Allura/allura/templates/jinja_master/nav_menu.html
index 724ca1c..a34e20a 100644
--- a/Allura/allura/templates/jinja_master/nav_menu.html
+++ b/Allura/allura/templates/jinja_master/nav_menu.html
@@ -56,11 +56,12 @@
     <div class="brought-by{% if c.project.icon %} with-icon{% endif %}">
         Brought to you by:
         {% set admins = c.project.admins()|sort(attribute='username') %}
-        {% for admin in admins[:4] %}
-            <a href="{{ admin.url() }}">{{ admin.username }}</a>{{ ',' if not
loop.last }}
+        {% for admin in admins[:5] %}
+            {% if loop.last and admins|length > 5 -%}
+                and <a href="{{ c.project.url() }}_members/">{{ admins|length - 4 }}
others</a>
+            {% else %}
+                <a href="{{ admin.url() }}">{{ admin.username }}</a>{{ ',' if
not loop.last }}
+            {% endif %}
         {%- endfor -%}
-        {% if admins|length > 4 -%}
-            , and <a href="{{ c.project.url() }}_members/">{{ admins|length - 4 }}
others</a>
-        {% endif %}
     </div>
 {% endif %}


Mime
View raw message