You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/05/30 01:12:03 UTC
[09/21] git commit: [#5913] Fixed "and 1 others" corner-case on
project header admin list
[#5913] Fixed "and 1 others" corner-case on project header admin list
Signed-off-by: Cory Johns <cj...@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/4307a3da
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4307a3da
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4307a3da
Branch: refs/heads/cj/4994
Commit: 4307a3da0ad469f1893e3382e9db0e1b3a11122d
Parents: f2af255
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu May 23 20:11:22 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed May 29 18:40:18 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/4307a3da/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 %}