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 2013/05/08 00:28:55 UTC

[21/50] [abbrv] git commit: [#6138] more updates to transition stored tool_names to lowercase

[#6138] more updates to transition stored tool_names to lowercase


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/17617e6e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/17617e6e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/17617e6e

Branch: refs/heads/tv/4321
Commit: 17617e6ebd6c1aad2b7f198526c6811d17b14d7d
Parents: 7cc8df7
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu May 2 20:08:01 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu May 2 20:08:01 2013 +0000

----------------------------------------------------------------------
 .../templates/admin_widgets/metadata_admin.html    |    2 +-
 .../allura/ext/admin/templates/project_admin.html  |    4 ++--
 Allura/allura/templates/jinja_master/lib.html      |    2 +-
 Allura/allura/tests/model/test_project.py          |    2 +-
 Allura/allura/tests/test_globals.py                |    6 +++---
 5 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/17617e6e/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html b/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
index 738428f..ff60ab3 100644
--- a/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
+++ b/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
@@ -46,7 +46,7 @@
     <input name="support_page" type="radio" value=""{% if value.support_page == '' %} checked{% endif %} id="support_page_none">
     <label for="support_page_none">None</label><br>
     {% for ac in value.app_configs %}
-      {% if ac.tool_name in ['Wiki', 'Tickets', 'Discussion'] %}
+      {% if ac.tool_name.lower() in ['wiki', 'tickets', 'discussion'] %}
         <input name="support_page" type="radio" value="{{ac.options.mount_point}}" id="support_page_{{ac.options.mount_point}}"
                {% if value.support_page == ac.options.mount_point %} checked{% endif %}>
         <label for="support_page_{{ac.options.mount_point}}">{{ac.options.mount_label}}</label><br>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/17617e6e/Allura/allura/ext/admin/templates/project_admin.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/templates/project_admin.html b/Allura/allura/ext/admin/templates/project_admin.html
index 3da1c0c..f8453f2 100644
--- a/Allura/allura/ext/admin/templates/project_admin.html
+++ b/Allura/allura/ext/admin/templates/project_admin.html
@@ -49,7 +49,7 @@
   </div>
   <div class="grid-4">
     {% for tool in c.project.app_configs %}
-      {% if tool.tool_name == 'Wiki' and not wiki_found %}
+      {% if tool.tool_name.lower() == 'wiki' and not wiki_found %}
         <a href="{{c.project.url()}}{{tool.options.mount_point}}/add">Add Page</a><br>
         <a href="{{c.project.url()}}{{tool.options.mount_point}}/">View Wiki</a>
         {% set wiki_found = True %}
@@ -82,7 +82,7 @@
   </div>
   <div class="grid-4">
     {% for tool in c.project.app_configs %}
-      {% if tool.tool_name == 'Tickets' and not tracker_found %}
+      {% if tool.tool_name.lower() == 'tickets' and not tracker_found %}
         <a href="{{c.project.url()}}{{tool.options.mount_point}}/new">Create Ticket</a><br>
         <a href="{{c.project.url()}}{{tool.options.mount_point}}/milestones">Edit Milestones</a><br>
         <a href="{{c.project.url()}}{{tool.options.mount_point}}/">View Tickets</a>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/17617e6e/Allura/allura/templates/jinja_master/lib.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/lib.html b/Allura/allura/templates/jinja_master/lib.html
index 0e4938a..48934d3 100644
--- a/Allura/allura/templates/jinja_master/lib.html
+++ b/Allura/allura/templates/jinja_master/lib.html
@@ -659,7 +659,7 @@ allowed, permitting basic styling and layout: &lt;div markdown style="float:left
 <h2 id="md_ex_neighborhood_notes{{id}}">Neighborhood Notifications</h2>
 <p>You can list updates from all projects in a neighborhood by tool type. Max_number (default is 5) and sort (default is pubdate) are optional:</p>
 <div class="codehilite"><pre>
-[[neighborhood_feeds tool_name=Wiki max_number=10 sort=pubdate]]
+[[neighborhood_feeds tool_name=wiki max_number=10 sort=pubdate]]
 </pre></div>
 </div>
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/17617e6e/Allura/allura/tests/model/test_project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/model/test_project.py b/Allura/allura/tests/model/test_project.py
index 232dec5..16f5a97 100644
--- a/Allura/allura/tests/model/test_project.py
+++ b/Allura/allura/tests/model/test_project.py
@@ -107,7 +107,7 @@ def test_anchored_tools():
     c.project.install_app = MagicMock()
     assert c.project.sitemap()[0].label == 'Wiki'
     assert c.project.install_app.call_args[0][0] == 'tickets'
-    assert c.project.ordered_mounts()[0]['ac'].tool_name == 'Wiki'
+    assert c.project.ordered_mounts()[0]['ac'].tool_name == 'wiki'
 
 
 def test_set_ordinal_to_admin_tool():

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/17617e6e/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index 2adc64c..bf17979 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -143,7 +143,7 @@ def test_macros():
     r = g.markdown_wiki.convert('[[download_button]]')
     assert_equal(r, '<div class="markdown_content"><p><span class="download-button-%s" style="margin-bottom: 1em; display: block;"></span></p>\n</div>' % p_test._id)
     h.set_context('--init--', 'wiki', neighborhood='Projects')
-    r = g.markdown_wiki.convert('[[neighborhood_feeds tool_name=Wiki]]')
+    r = g.markdown_wiki.convert('[[neighborhood_feeds tool_name=wiki]]')
     assert 'Home modified by' in r, r
     orig_len = len(r)
     # Make project private & verify we don't see its new feed items
@@ -155,7 +155,7 @@ def test_macros():
     pg = WM.Page.query.get(title='Home', app_config_id=c.app.config._id)
     pg.text = 'Change'
     pg.commit()
-    r = g.markdown_wiki.convert('[[neighborhood_feeds tool_name=Wiki]]')
+    r = g.markdown_wiki.convert('[[neighborhood_feeds tool_name=wiki]]')
     new_len = len(r)
     assert new_len == orig_len
     p = BM.BlogPost(title='test me', neighborhood_id=p_test.neighborhood_id)
@@ -361,7 +361,7 @@ def test_macro_include():
 
 def test_macro_nbhd_feeds():
     with h.push_context('--init--', 'wiki', neighborhood='Projects'):
-        r = g.markdown_wiki.convert('[[neighborhood_feeds tool_name=Wiki]]')
+        r = g.markdown_wiki.convert('[[neighborhood_feeds tool_name=wiki]]')
         assert 'Home modified by ' in r, r