commit/galaxy-central: inithello: Enable dynamic configuration of message box content and visibility in the wsgi .ini file. Display the configured brand, if any, in the <title> element.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/cb0432cfcc8a/ Changeset: cb0432cfcc8a User: inithello Date: 2013-05-07 17:22:38 Summary: Enable dynamic configuration of message box content and visibility in the wsgi .ini file. Display the configured brand, if any, in the <title> element. Affected #: 5 files diff -r 3790a81856bf4a8b1fc6b6075c467ce813155b2a -r cb0432cfcc8a8cd67d608b6c1acc66e3b3739107 lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -154,6 +154,10 @@ self.ucsc_display_sites = kwargs.get( 'ucsc_display_sites', "main,test,archaea,ucla" ).lower().split(",") self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', "modencode,sgd_yeast,tair,wormbase,wormbase_ws120,wormbase_ws140,wormbase_ws170,wormbase_ws180,wormbase_ws190,wormbase_ws200,wormbase_ws204,wormbase_ws210,wormbase_ws220,wormbase_ws225" ).lower().split(",") self.brand = kwargs.get( 'brand', None ) + # Configuration for the message box directly below the masthead. + self.message_box_visible = kwargs.get( 'message_box_visible', False ) + self.message_box_content = kwargs.get( 'message_box_content', None ) + self.message_box_class = kwargs.get( 'message_box_class', 'info' ) self.support_url = kwargs.get( 'support_url', 'http://wiki.g2.bx.psu.edu/Support' ) self.wiki_url = kwargs.get( 'wiki_url', 'http://g2.trac.bx.psu.edu/' ) self.blog_url = kwargs.get( 'blog_url', None ) diff -r 3790a81856bf4a8b1fc6b6075c467ce813155b2a -r cb0432cfcc8a8cd67d608b6c1acc66e3b3739107 lib/galaxy/webapps/tool_shed/config.py --- a/lib/galaxy/webapps/tool_shed/config.py +++ b/lib/galaxy/webapps/tool_shed/config.py @@ -79,6 +79,10 @@ self.nginx_upload_path = kwargs.get( 'nginx_upload_path', False ) self.log_actions = string_as_bool( kwargs.get( 'log_actions', 'False' ) ) self.brand = kwargs.get( 'brand', None ) + # Configuration for the message box directly below the masthead. + self.message_box_visible = kwargs.get( 'message_box_visible', False ) + self.message_box_content = kwargs.get( 'message_box_content', None ) + self.message_box_class = kwargs.get( 'message_box_class', 'info' ) self.support_url = kwargs.get( 'support_url', 'http://wiki.g2.bx.psu.edu/Support' ) self.wiki_url = kwargs.get( 'wiki_url', 'http://wiki.g2.bx.psu.edu/FrontPage' ) self.blog_url = kwargs.get( 'blog_url', None ) diff -r 3790a81856bf4a8b1fc6b6075c467ce813155b2a -r cb0432cfcc8a8cd67d608b6c1acc66e3b3739107 templates/base/base_panels.mako --- a/templates/base/base_panels.mako +++ b/templates/base/base_panels.mako @@ -3,9 +3,8 @@ <% self.has_left_panel = hasattr( self, 'left_panel' ) self.has_right_panel = hasattr( self, 'right_panel' ) - self.message_box_visible=False + self.message_box_visible = app.config.message_box_visible self.overlay_visible=False - self.message_box_class="" self.active_view=None self.body_class="" self.require_javascript=False @@ -245,16 +244,16 @@ </div></%def> -## Messagebox -<%def name="message_box_content()"> -</%def> - ## Document <html><!--base_panels.mako--> ${self.init()} <head> - <title>${self.title()}</title> + %if app.config.brand: + <title>${self.title()} / ${app.config.brand}</title> + %else: + <title>${self.title()}</title> + %endif <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ## For mobile browsers, don't scale up <meta name = "viewport" content = "maximum-scale=1.0"> @@ -284,9 +283,9 @@ ${self.masthead()} </div></div> - <div id="messagebox" class="panel-${self.message_box_class}-message"> - %if self.message_box_visible: - ${self.message_box_content()} + <div id="messagebox" class="panel-${app.config.message_box_class}-message"> + %if self.message_box_visible and app.config.message_box_content: + ${app.config.message_box_content} %endif </div> ${self.overlay(visible=self.overlay_visible)} diff -r 3790a81856bf4a8b1fc6b6075c467ce813155b2a -r cb0432cfcc8a8cd67d608b6c1acc66e3b3739107 tool_shed_wsgi.ini.sample --- a/tool_shed_wsgi.ini.sample +++ b/tool_shed_wsgi.ini.sample @@ -88,6 +88,11 @@ # Use the new iframe / javascript based layout use_new_layout = true +# Show a message box under the masthead. +#message_box_visible = False +#message_box_content = None +#message_box_class = info + # Serving static files (needed if running standalone) static_enabled = True static_cache_time = 360 diff -r 3790a81856bf4a8b1fc6b6075c467ce813155b2a -r cb0432cfcc8a8cd67d608b6c1acc66e3b3739107 universe_wsgi.ini.sample --- a/universe_wsgi.ini.sample +++ b/universe_wsgi.ini.sample @@ -264,6 +264,11 @@ # -- UI Localization +# Show a message box under the masthead. +#message_box_visible = False +#message_box_content = None +#message_box_class = info + # Append "/{brand}" to the "Galaxy" text in the masthead. #brand = None Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org