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/02/04 22:27:05 UTC
[4/16] git commit: [#4943] no error when empty anchored_tools,
update text
[#4943] no error when empty anchored_tools, update text
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ebbfce43
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ebbfce43
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ebbfce43
Branch: refs/heads/cj/5705
Commit: ebbfce4314622215a40df31726159a8c4f14194b
Parents: 145ed5a
Author: Dave Brondsema <db...@geek.net>
Authored: Thu Jan 31 16:34:24 2013 +0000
Committer: Dave Brondsema <db...@geek.net>
Committed: Thu Jan 31 20:26:30 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/neighborhood.py | 6 ++++--
.../widgets/neighborhood_overview_form.html | 8 ++++++--
2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ebbfce43/Allura/allura/model/neighborhood.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/neighborhood.py b/Allura/allura/model/neighborhood.py
index c572ce6..eafa29a 100644
--- a/Allura/allura/model/neighborhood.py
+++ b/Allura/allura/model/neighborhood.py
@@ -240,9 +240,11 @@ class Neighborhood(MappedClass):
self.css = ""
def get_anchored_tools(self):
- anchored_tools = self.anchored_tools.replace(' ', '').split(',')
+ if not self.anchored_tools:
+ return dict()
try:
+ anchored_tools = [at.strip() for at in self.anchored_tools.split(',')]
return OrderedDict((tool.split(':')[0].lower(), tool.split(':')[1]) for tool in anchored_tools)
except Exception:
- log.info("anchored_tools isn't valid", exc_info=True)
+ log.warning("anchored_tools isn't valid", exc_info=True)
return dict()
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ebbfce43/Allura/allura/templates/widgets/neighborhood_overview_form.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/neighborhood_overview_form.html b/Allura/allura/templates/widgets/neighborhood_overview_form.html
index 4d68191..3376712 100644
--- a/Allura/allura/templates/widgets/neighborhood_overview_form.html
+++ b/Allura/allura/templates/widgets/neighborhood_overview_form.html
@@ -32,8 +32,12 @@
{% endif %}
<label class="grid-4">Project List URL</label>
<div class="grid-14">{{widget.display_field(widget.fields.project_list_url)}}</div>
- <label class="grid-4">Anchored tools (Example: wiki:Wiki,tickets:Tracker)</label>
- <div class="grid-14">{{widget.display_field(widget.fields.anchored_tools)}}</div>
+ <label class="grid-4">Anchored tools</label>
+ <div class="grid-14">{{widget.display_field(widget.fields.anchored_tools)}}
+ <br/>
+ Anchored tools will be inserted at the beginning of all projects, and cannot be removed by a project.
+ If you change the anchored tools, already-inserted tools will stay on all those projects. Example: "wiki:Wiki, sometool:The Label"
+ </div>
<label class="grid-4"> </label>
<div class="grid-14"><input type="submit" value="Save"/></div>
</form>