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/03/18 18:24:16 UTC
[6/6] git commit: [#7051] Make sure More link still gets added
[#7051] Make sure More link still gets added
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/3a265bd6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3a265bd6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3a265bd6
Branch: refs/heads/tv/7051
Commit: 3a265bd63e47462e6f17e1713ec78a963afb16d1
Parents: 186c3a3
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Tue Mar 18 17:23:49 2014 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Mar 18 17:23:49 2014 +0000
----------------------------------------------------------------------
Allura/allura/model/project.py | 4 ++--
Allura/allura/tests/functional/test_home.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3a265bd6/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index dd247de..1ee6683 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -643,9 +643,9 @@ class Project(MappedClass, ActivityNode, ActivityObject):
# add tool url to list of urls that will match this nav
# entry
grouped_nav[tool_name].matching_urls.append(e.url)
- if len(grouped_nav[tool_name].children) < SITEMAP_PER_TOOL_LIMIT:
+ if len(grouped_nav[tool_name].children) < SITEMAP_PER_TOOL_LIMIT - 1:
grouped_nav[tool_name].children.append(e)
- elif len(grouped_nav[tool_name].children) == SITEMAP_PER_TOOL_LIMIT:
+ elif len(grouped_nav[tool_name].children) == SITEMAP_PER_TOOL_LIMIT - 1:
e.url = self.url() + '_list/' + tool_name
e.label = 'More...'
grouped_nav[tool_name].children.append(e)
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3a265bd6/Allura/allura/tests/functional/test_home.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_home.py b/Allura/allura/tests/functional/test_home.py
index 3b790aa..8a8d087 100644
--- a/Allura/allura/tests/functional/test_home.py
+++ b/Allura/allura/tests/functional/test_home.py
@@ -83,7 +83,7 @@ class TestProjectHome(TestController):
c.app = p.install_app('wiki', tool_name, tool_name, i)
response = self.app.get('/p/test/_nav.json')
menu = response.json['menu']
- assert_equal(len(menu[0]['children']), 11)
+ assert_equal(len(menu[0]['children']), 10)
assert {u'url': u'/p/test/_list/wiki', u'name': u'More...',
u'icon': u'tool-wiki', 'tool_name': 'wiki'} in menu[0]['children']