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/06/21 20:33:45 UTC

[3/3] git commit: [#6257] make the right side of the project header extensible

[#6257] make the right side of the project header extensible


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

Branch: refs/heads/master
Commit: a9b8ad9fd2fb3c53924ba5620391ee6c0b045262
Parents: 1753ad1
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Jun 4 19:54:57 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Fri Jun 21 18:33:07 2013 +0000

----------------------------------------------------------------------
 Allura/allura/templates/jinja_master/nav_menu.html | 17 ++---------------
 .../templates/jinja_master/theme_macros.html       | 17 +++++++++++++++++
 2 files changed, 19 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a9b8ad9f/Allura/allura/templates/jinja_master/nav_menu.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/nav_menu.html b/Allura/allura/templates/jinja_master/nav_menu.html
index a34e20a..8aa91f1 100644
--- a/Allura/allura/templates/jinja_master/nav_menu.html
+++ b/Allura/allura/templates/jinja_master/nav_menu.html
@@ -22,21 +22,8 @@
 {% if not c.project or (n.neighborhood_project == c.project and not n.show_title) %}
   <div id="nav_menu_missing"></div>
 {% else %}
-  {{ theme_macros.breadcrumbs(c.project, c.app) }}
-  {% if c.project.neighborhood.icon %}
-    <a href="{{c.project.neighborhood.url()}}"><img src="{{c.project.neighborhood.url()}}/icon" class="neighborhood_icon"
-       alt="Return to {{c.project.neighborhood.name}}" title="Return to {{c.project.neighborhood.name}}"></a>
-       <div class="neighborhood_title">
-         <h1><a href="{{c.project.neighborhood.url()}}">{{c.project.neighborhood.name}}</a></h1>
-         {% if c.project.neighborhood.project_list_url %}
-           <div class="neighborhood_title_link">
-           <a href="{{c.project.neighborhood.project_list_url}}">
-             View More Projects
-           </a>
-           </div>
-         {% endif %}
-      </div>
-  {% endif %}
+    {{ theme_macros.breadcrumbs(c.project, c.app) }}
+    {{ theme_macros.project_header_right(c.project, c.app) }}
     {% if c.project.user_project_of %}
       {{lib.gravatar(c.project.user_project_of, size=48, className='project_icon')}}
     {% elif c.project.icon %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a9b8ad9f/Allura/allura/templates/jinja_master/theme_macros.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/theme_macros.html b/Allura/allura/templates/jinja_master/theme_macros.html
index a493075..61f5e2f 100644
--- a/Allura/allura/templates/jinja_master/theme_macros.html
+++ b/Allura/allura/templates/jinja_master/theme_macros.html
@@ -96,3 +96,20 @@
         </ul>
     </nav>
 {%- endmacro %}
+
+{%- macro project_header_right(project, app) %}
+  {% if project.neighborhood.icon %}
+    <a href="{{project.neighborhood.url()}}"><img src="{{project.neighborhood.url()}}/icon" class="neighborhood_icon"
+       alt="Return to {{project.neighborhood.name}}" title="Return to {{project.neighborhood.name}}"></a>
+       <div class="neighborhood_title">
+         <h1><a href="{{project.neighborhood.url()}}">{{project.neighborhood.name}}</a></h1>
+         {% if project.neighborhood.project_list_url %}
+           <div class="neighborhood_title_link">
+           <a href="{{project.neighborhood.project_list_url}}">
+             View More Projects
+           </a>
+           </div>
+         {% endif %}
+      </div>
+  {% endif %}
+{%- endmacro %}
\ No newline at end of file