You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/05/29 17:08:41 UTC

git commit: [#5716] make project admin's support choices configurable, and off by default

Updated Branches:
  refs/heads/db/5716 3ca70b489 -> 1653215c2


[#5716] make project admin's support choices configurable, and off by default


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

Branch: refs/heads/db/5716
Commit: 1653215c21354fb01e2eeac8647bd86ab404ade3
Parents: 3ca70b4
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed May 29 14:08:58 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed May 29 14:09:44 2013 +0000

----------------------------------------------------------------------
 .../templates/admin_widgets/metadata_admin.html    |    6 +++++-
 Allura/development.ini                             |    6 ++++++
 Allura/test.ini                                    |    2 ++
 3 files changed, 13 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1653215c/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 b37d638..454f33a 100644
--- a/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
+++ b/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
@@ -41,6 +41,8 @@
     {{widget.display_field(widget.fields.short_description) }}
 
     <div style="clear:both">&nbsp;</div>
+    
+    {% if tg.config.get('support_tool_choices') %}
     Preferred Support Page (for users of your project):<br>
     {% if c.form_errors.get('support_page_url') %}
         <div class="error">{{c.form_errors.get('support_page_url')}}</div>
@@ -48,7 +50,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 c.project.app_configs %}
-      {% if ac.tool_name.lower() in ['wiki', 'tickets', 'discussion'] %}
+      {% if ac.tool_name.lower() in tg.config['support_tool_choices'].split() %}
         <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>
@@ -60,6 +62,8 @@
            {% if value.support_page == '_url' %} checked{% endif %}>
     <label for="support_page_url_cb">URL: </label>
     <input type="text" name="support_page_url" value="{{value.support_page_url}}" style="width: 70%"><br>
+    {% endif %}
+
     {{ widget.display_label(widget.fields.twitter_handle) }}
     <br>
     {{widget.display_field(widget.fields.twitter_handle) }}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1653215c/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index cdde88e..b3c084f 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -141,6 +141,12 @@ scm.repos.tarball.root = /usr/share/nginx/www/
 scm.repos.tarball.url_prefix = http://localhost/
 scm.repos.tarball.zip_binary = /usr/bin/zip
 
+# space-separated list of tool names that are valid options
+# for project admins to set for their 'support_page' field
+# this field is not used by default in Allura, so this option
+# is disabled by default
+#support_tool_choices = wiki tickets discussion
+
 trovecategories.enableediting = true
 
 # ActivityStream

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1653215c/Allura/test.ini
----------------------------------------------------------------------
diff --git a/Allura/test.ini b/Allura/test.ini
index f749705..b3d9760 100644
--- a/Allura/test.ini
+++ b/Allura/test.ini
@@ -101,6 +101,8 @@ scm.repos.tarball.enable = true
 scm.repos.tarball.root = /tmp/tarball
 scm.repos.tarball.url_prefix = file://
 
+support_tool_choices = wiki tickets discussion
+
 #stats.sample_rate = 0
 
 disable_csrf_protection=1