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/22 15:36:35 UTC

[09/14] git commit: [#5913] Add triangle to indicate nav menus with dropdowns

[#5913] Add triangle to indicate nav menus with dropdowns

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/32805238
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/32805238
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/32805238

Branch: refs/heads/cj/5913
Commit: 32805238a933c221a7c8d95beab741d46be50db6
Parents: 11009bd
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu May 16 13:43:09 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Wed May 22 13:35:42 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/project.py           |    2 +-
 Allura/allura/tests/unit/test_project.py |   18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/32805238/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index da36ada..e98b44c 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -498,7 +498,7 @@ class Project(MappedClass, ActivityNode, ActivityObject):
                 if tool_name not in grouped_nav:
                     child = deepcopy(e)
                     # change label to be the tool name (type)
-                    e.label = g.entry_points['tool'][tool_name].tool_label
+                    e.label = g.entry_points['tool'][tool_name].tool_label + u' \u25be'
                     # add tool url to list of urls that will match this nav entry
                     # have to do this before changing the url to the list page
                     e.matching_urls.append(e.url)

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/32805238/Allura/allura/tests/unit/test_project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/unit/test_project.py b/Allura/allura/tests/unit/test_project.py
index 7329dba..f83cfe9 100644
--- a/Allura/allura/tests/unit/test_project.py
+++ b/Allura/allura/tests/unit/test_project.py
@@ -38,10 +38,10 @@ class TestProject(unittest.TestCase):
         p.sitemap = Mock(return_value=sitemap_entries)
         entries = p.grouped_navbar_entries()
         expected = [
-            ('Tickets', 'proj_url/_list/tickets', 3),
-            ('wiki', 'wiki url', 0),
-            ('Discussion', 'proj_url/_list/discussion', 2),
-            ('subproject', 'subproject url', 0),
+            (u'Tickets \u25be', 'proj_url/_list/tickets', 3),
+            (u'wiki', 'wiki url', 0),
+            (u'Discussion \u25be', 'proj_url/_list/discussion', 2),
+            (u'subproject', 'subproject url', 0),
         ]
         expected_ticket_urls = ['bugs url', 'features url', 'support url']
         actual = [(e.label, e.url, len(e.matching_urls)) for e in entries]
@@ -64,11 +64,11 @@ class TestProject(unittest.TestCase):
         p.tool_data['allura'] = {'grouping_threshold': 2}
         entries = p.grouped_navbar_entries()
         expected = [
-            ('Tickets', 'proj_url/_list/tickets', 3),
-            ('wiki', 'wiki url', 0),
-            ('discuss', 'discuss url', 0),
-            ('subproject', 'subproject url', 0),
-            ('help', 'help url', 0),
+            (u'Tickets \u25be', 'proj_url/_list/tickets', 3),
+            (u'wiki', 'wiki url', 0),
+            (u'discuss', 'discuss url', 0),
+            (u'subproject', 'subproject url', 0),
+            (u'help', 'help url', 0),
         ]
         expected_ticket_urls = ['bugs url', 'features url', 'support url']
         actual = [(e.label, e.url, len(e.matching_urls)) for e in entries]