Added the ability to "brand" Galaxy in the masthead from the ini file.

This commit is contained in:
Nate Coraor
2007-11-09 16:52:02 +00:00
parent b4a9884081
commit 3ab97ed098
5 changed files with 17 additions and 2 deletions
+1
View File
@@ -51,6 +51,7 @@ class Configuration( object ):
self.use_heartbeat = kwargs.get( 'use_heartbeat', False )
self.ucsc_display_sites = kwargs.get( 'ucsc_display_sites', "main,test,archaea" ).lower().split(",")
self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', "wormbase,flybase" ).lower().split(",")
self.brand = kwargs.get( 'brand', None )
#Parse global_conf
global_conf = kwargs.get( 'global_conf', None )
global_conf_parser = ConfigParser.ConfigParser()
+2 -1
View File
@@ -561,7 +561,8 @@ class Universe( BaseController ):
@web.expose
def masthead( self, trans ):
return trans.fill_template( "masthead.tmpl" )
brand = trans.app.config.get( "brand", None )
return trans.fill_template( "masthead.tmpl", brand=brand )
@web.expose
def dataset_errors( self, trans, id=None, **kwd ):
+5
View File
@@ -24,3 +24,8 @@ a:link, a:visited, a:active
{
color: #eeeeee;
}
span.brand
{
font-size:60%;
}
+6 -1
View File
@@ -1,4 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
#if $brand is not None:
#set $brand = "<span class='brand'>/%s</span>" % $brand
#end if
<html>
<head>
@@ -12,7 +17,7 @@
<table width="100%" cellspacing="0" border="0">
<tr valign="middle">
<td width="26px"><a target="_blank" href="http://www.bx.psu.edu/cgi-bin/trac.cgi"><img border="0" src="${h.url_for('/static/images/galaxyIcon_noText.png')}"></a></td>
<td align="left" valign="middle"><div class="pageTitle">Galaxy</div></td>
<td align="left" valign="middle"><div class="pageTitle">Galaxy$brand</div></td>
<td align="right" valign="middle">
Info: <a href="mailto:galaxy-bugs@bx.psu.edu">report bugs</a>
+3
View File
@@ -98,6 +98,9 @@ static_favicon_dir = %(here)s/static/favicon.ico
static_scripts_dir = %(here)s/static/scripts/
static_style_dir = %(here)s/static/june_2007_style/blue
# Brand: appends "/[brand]" to the "Galaxy" text in the masthead
#brand = Foo
# ---- Datatypes ------------------------------------------------------------
[galaxy:datatypes]