You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/12/07 09:23:02 UTC

[06/12] allura git commit: ticket:866 added link for photo (need to specify correct path)

ticket:866 added link for photo (need to specify correct path)


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

Branch: refs/heads/ib/5940
Commit: 4e0f8e5185dd47bb6e985cae5d1579ee4b1e110e
Parents: 4277912
Author: DeV1doR <de...@ukr.net>
Authored: Wed Dec 2 15:56:40 2015 +0200
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Mon Dec 7 10:01:07 2015 +0200

----------------------------------------------------------------------
 Allura/allura/lib/app_globals.py                       | 4 ++++
 Allura/allura/templates/jinja_master/theme_macros.html | 1 +
 Allura/development.ini                                 | 6 +++---
 3 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/4e0f8e51/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index ffbb535..3fd5cd2 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -602,6 +602,10 @@ class Globals(object):
     def global_nav(self):
         return json.loads(config.get('global_nav'))
 
+    @LazyProperty
+    def logo_path(self):
+        return config.get('logo_path')
+
 
 class Icon(object):
 

http://git-wip-us.apache.org/repos/asf/allura/blob/4e0f8e51/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 aea5ebd..f7e2bdf 100644
--- a/Allura/allura/templates/jinja_master/theme_macros.html
+++ b/Allura/allura/templates/jinja_master/theme_macros.html
@@ -28,6 +28,7 @@ http://stackoverflow.com/questions/26582731/redefining-imported-jinja-macros
 <header id="site-header">
     <div class="wrapper">
         <nav class="nav-left">
+          <a href="/"><img src="{{ g.logo_path }}" /></a>
           {% for nav_link in g.global_nav %}
             <a href="{{ nav_link['url'] }}">{{ nav_link['title'] }}</a>
           {% endfor %}

http://git-wip-us.apache.org/repos/asf/allura/blob/4e0f8e51/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 66bbb5e..4320820 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -81,8 +81,8 @@ domain = localhost
 base_url = http://localhost:8080
 ; This should be the same as base_url
 forgemail.url = http://localhost:8080
-; Change this to your logo url
-logo_url = Allura
+; Change this to your logo path
+logo_path =  http://localhost:8080/allura/nf/images/admin_24.png
 
 ; Used to uniquify references to static resources, can be a timestamp or any unique value
 ; This should be updated each time you deploy (or make significant changes, like new tools, new css)
@@ -493,7 +493,7 @@ limit_param_max = 500
 ;
 ; Override this to specify your custom navigation links
 ;
-global_nav = [{"title": "Logo", "url": "https://mail.google.com"}, {"title": "Ashot-one-shot", "url": "http://vk.com/id22568536"}]
+global_nav = [{"title": "Logo", "url": "https://mail.google.com"}]
 
 
 ;