1. Olemis Lang
  2. bloodhound_theme


pe...@13f79535-47bb-0310-9956-ffa450edef68  committed 8c37928

#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

  • Participants
  • Parent commits e9d198e
  • Branches default

Comments (0)

Files changed (3)

File bhtheme/templates/bh_about.html

View file
  • Ignore whitespace
     <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 

File bhtheme/templates/bloodhound_theme.html

View file
  • Ignore whitespace
       <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 class="span4"><div class="pull-right">${chrome.footer}</div></div>

File bhtheme/theme.py

View file
  • Ignore whitespace
 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
             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):
                                    "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'))