• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

Revisão2e4e6411f3a9e97dda6006e4f84a1ede24eac8d5 (tree)
Hora2012-06-27 01:46:44
AutorJenny Steele <jsteele@geek...>
CommiterDave Brondsema

Mensagem de Log

[#4180] Added ability for a neighborhood to make a custom link for their nav and added text to make the neighborhood home link more obvious

Mudança Sumário

Diff

--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -475,6 +475,7 @@ class NeighborhoodAdminController(object):
475475 self.neighborhood.project_template = project_template
476476 self.neighborhood.allow_browse = kw.get('allow_browse', False)
477477 self.neighborhood.show_title = kw.get('show_title', False)
478+ self.neighborhood.project_list_url = kw.get('project_list_url', '')
478479 tracking_id = kw.get('tracking_id', '')
479480 if tracking_id != self.neighborhood.tracking_id:
480481 c.project = self.neighborhood.neighborhood_project
--- a/Allura/allura/lib/widgets/forms.py
+++ b/Allura/allura/lib/widgets/forms.py
@@ -140,6 +140,7 @@ class NeighborhoodOverviewForm(ForgeForm):
140140 validator=V.JsonValidator(if_empty=''))
141141 icon = ew.FileField()
142142 tracking_id = ew.TextField()
143+ project_list_url = ew.TextField(validator=fev.URL())
143144
144145 def from_python(self, value, state):
145146 if value.features['css'] == "picker":
--- a/Allura/allura/model/neighborhood.py
+++ b/Allura/allura/model/neighborhood.py
@@ -55,6 +55,7 @@ class Neighborhood(MappedClass):
5555 site_specific_html = FieldProperty(str, if_missing='')
5656 project_template = FieldProperty(str, if_missing='')
5757 tracking_id = FieldProperty(str, if_missing='')
58+ project_list_url = FieldProperty(str, if_missing='')
5859 level = FieldProperty(S.Deprecated)
5960 allow_private = FieldProperty(S.Deprecated)
6061 features = FieldProperty(dict(
--- a/Allura/allura/templates/jinja_master/master.html
+++ b/Allura/allura/templates/jinja_master/master.html
@@ -59,7 +59,7 @@
5959 {{theme_macros.header(c.user.username, c.user._id, c.user.display_name, g.login_url, '/auth/logout')}}
6060 {% set flash = tg.flash_obj.render('flash', use_js=False) %}
6161 <section id="page-body" class="{{g.document_class(neighborhood)}}">
62- <div class="grid-24">
62+ <div class="grid-24" id="nav_menu_holder">
6363 {% block nav_menu %}
6464 {% include g.theme.nav_menu %}
6565 {% endblock %}
--- a/Allura/allura/templates/jinja_master/nav_menu.html
+++ b/Allura/allura/templates/jinja_master/nav_menu.html
@@ -5,7 +5,17 @@
55 {% else %}
66 {% if c.project.neighborhood.icon %}
77 <a href="{{c.project.neighborhood.url()}}"><img src="{{c.project.neighborhood.url()}}/icon" class="neighborhood_icon"
8- alt="Return to {{c.project.neighborhood.name}} Neighborhood" title="Return to {{c.project.neighborhood.name}} Neighborhood"></a>
8+ alt="Return to {{c.project.neighborhood.name}}" title="Return to {{c.project.neighborhood.name}}"></a>
9+ <div class="neighborhood_title">
10+ <h1><a href="{{c.project.neighborhood.url()}}">{{c.project.neighborhood.name}}</a></h1>
11+ {% if c.project.neighborhood.project_list_url %}
12+ <div class="neighborhood_title_link">
13+ <a href="{{c.project.neighborhood.project_list_url}}">
14+ View More Projects
15+ </a>
16+ </div>
17+ {% endif %}
18+ </div>
919 {% endif %}
1020 <a href="{{c.project.url()}}">
1121 {% if c.project.user_project_of %}
--- a/Allura/allura/templates/jinja_master/neigh_nav_menu.html
+++ b/Allura/allura/templates/jinja_master/neigh_nav_menu.html
@@ -1,11 +1,15 @@
11 {% if not neighborhood or not neighborhood.show_title %}
22 <div id="nav_menu_missing"></div>
33 {% else %}
4-
5- <a href="{{neighborhood.url()}}">
64 {% if neighborhood.icon %}
7- <img src="{{neighborhood.url()}}/icon" class="project_icon" alt="{{neighborhood.name}} Logo"/>
5+ <a href="{{neighborhood.url()}}"><img src="{{neighborhood.url()}}/icon" class="project_icon" alt="{{neighborhood.name}} Logo"/></a>
86 {% endif %}
9- <h1 class="project_title">{{neighborhood.name}}</h1>
10- </a>
7+ <h1 class="project_title"><a href="{{neighborhood.url()}}">{{neighborhood.name}}</a></h1>
8+ {% if neighborhood.project_list_url %}
9+ <div class="project_title_link">
10+ <a href="{{neighborhood.project_list_url}}">
11+ View Projects
12+ </a>
13+ </div>
14+ {% endif %}
1115 {% endif %}
--- a/Allura/allura/templates/widgets/neighborhood_overview_form.html
+++ b/Allura/allura/templates/widgets/neighborhood_overview_form.html
@@ -28,6 +28,8 @@
2828 <label class="grid-4">Analytics Tracking ID</label>
2929 <div class="grid-14">{{widget.display_field(widget.fields.tracking_id)}}</div>
3030 {% endif %}
31+ <label class="grid-4">Project List URL</label>
32+ <div class="grid-14">{{widget.display_field(widget.fields.project_list_url)}}</div>
3133 <label class="grid-4">&nbsp;</label>
3234 <div class="grid-14"><input type="submit" value="Save"/></div>
3335 </form>