Author: peter
Date: Thu Nov 29 07:59:32 2012
New Revision: 1415072
URL: http://svn.apache.org/viewvc?rev=1415072&view=rev
Log:
#266 - Whitelabeling/detracify: Left footer
- moved Trac version info/disclaimer to About page
- added Bloodhound version info instead
- optional trac.ini setting for left footer prefix/postfix
Modified:
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_about.html
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
incubator/bloodhound/trunk/installer/bloodhound_setup.py
Modified:
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_about.html
URL:
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_about.html?rev=1415072&r1=1415071&r2=1415072&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_about.html
(original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_about.html
Thu Nov 29 07:59:32 2012
@@ -39,8 +39,11 @@
<body>
<div id="content" class="about">
- <h1>About ${chrome.labels.application_short}</h1>
- <p>Standing on the shoulders of Trac,
${chrome.labels.application_full}
+ <h1>About ${chrome.labels.application_short}
+ ${chrome.labels.application_version}
+ </h1>
+ <p>Standing on the shoulders of <a href="http://trac.edgewall.org/">
+ Trac ${trac.version}</a>, ${chrome.labels.application_full}
is a project hosted by the Apache Software Foundation's Incubator
project.
<br/>
Modified:
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
URL:
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html?rev=1415072&r1=1415071&r2=1415072&view=diff
==============================================================================
---
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
(original)
+++
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
Thu Nov 29 07:59:32 2012
@@ -267,9 +267,11 @@
${select('*|text()|comment()')}
<div class="row footer">
<div class="span8">
- Powered by <a href="http://www.apache.org/">Apache<sup>TM</sup></a>
<a href="${href.about()}">Bloodhound</a>.
- Standing on the shoulders of
- <a href="http://trac.edgewall.org/">Trac ${trac.version}</a>.
+ ${chrome.labels.footer_left_prefix}
+ Powered by <a href="http://www.apache.org/">Apache<sup>TM</sup></a>
+ <a href="${href.about()}">${chrome.labels.application_short}
+ ${chrome.labels.application_version}</a>
+ ${chrome.labels.footer_left_postfix}
</div>
<div class="span4"><div class="pull-right">${chrome.footer}</div></div>
</div>
Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
URL:
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1415072&r1=1415071&r2=1415072&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Thu Nov 29
07:59:32 2012
@@ -38,6 +38,7 @@ from themeengine.api import ThemeBase, T
from bhdashboard.util import dummy_request
from bhdashboard.web_ui import DashboardModule
+from pkg_resources import get_distribution
from urlparse import urlparse
from wsgiref.util import setup_testing_defaults
@@ -153,7 +154,12 @@ class BloodhoundTheme(ThemeBase):
application_short = c.get(
'labels', 'application_short', "Bloodhound"),
application_full = c.get(
- 'labels', 'application_full', "Apache Bloodhound"))
+ 'labels', 'application_full', "Apache Bloodhound"),
+ footer_left_prefix = c.get(
+ 'labels', 'footer_left_prefix', ""),
+ footer_left_postfix = c.get(
+ 'labels', 'footer_left_postfix', ""),
+ application_version = ".".join(map(str, application_version)))
return handler
def post_process_request(self, req, template, data, content_type):
@@ -359,4 +365,5 @@ class QuickCreateTicketDialog(Component)
"of ticket #%s: %s" % (t.id, e))
return t.id
-
+application_version = tuple(int(i) for i in get_distribution('BloodhoundTheme')
+ .parsed_version if i.startswith('0'))
Modified: incubator/bloodhound/trunk/installer/bloodhound_setup.py
URL:
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/installer/bloodhound_setup.py?rev=1415072&r1=1415071&r2=1415072&view=diff
==============================================================================
--- incubator/bloodhound/trunk/installer/bloodhound_setup.py (original)
+++ incubator/bloodhound/trunk/installer/bloodhound_setup.py Thu Nov 29
07:59:32 2012
@@ -74,7 +74,9 @@ BASE_CONFIG = {'components': {'bhtheme.*
'<a href="%(site)s">%(site)s</a>'
% {'site': BH_PROJECT_SITE,}),},
'labels': {'application_short': 'Bloodhound',
- 'application_full': 'Apache Bloodhound'},
+ 'application_full': 'Apache Bloodhound',
+ 'footer_left_prefix': '',
+ 'footer_left_postfix': ''},
}
ACCOUNTS_CONFIG = {'account-manager': {'account_changes_notify_addresses' : '',