incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [6/7] git commit: [#7051] Make sure More link still gets added
Date Wed, 19 Mar 2014 21:52:15 GMT
[#7051] Make sure More link still gets added

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@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/master
Commit: 3a265bd63e47462e6f17e1713ec78a963afb16d1
Parents: 186c3a3
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Tue Mar 18 17:23:49 2014 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@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']
 


Mime
View raw message