[hg] galaxy 3587: Decouple the masthead from base_panels.mako.
details: http://www.bx.psu.edu/hg/galaxy/rev/273535c97761 changeset: 3587:273535c97761 user: Greg Von Kuster <greg@bx.psu.edu> date: Wed Mar 31 13:11:05 2010 -0400 description: Decouple the masthead from base_panels.mako. diffstat: templates/admin/index.mako | 2 +- templates/base_panels.mako | 148 +-------------------------- templates/cloud/index.mako | 2 +- templates/display_base.mako | 2 +- templates/form.mako | 2 +- templates/grid_base.mako | 2 +- templates/history/list_published.mako | 2 +- templates/history/view.mako | 2 +- templates/library/common/browse_library.mako | 2 +- templates/library/index.mako | 2 +- templates/message.mako | 2 +- templates/page/editor.mako | 2 +- templates/page/index.mako | 2 +- templates/page/list_published.mako | 2 +- templates/panels.mako | 2 +- templates/requests/index.mako | 2 +- templates/root/index.mako | 2 +- templates/sample/index.mako | 2 +- templates/tracks/browser.mako | 2 +- templates/visualization/list.mako | 2 +- templates/visualization/list_published.mako | 2 +- templates/webapps/galaxy/base_panels.mako | 152 +++++++++++++++++++++++++++ templates/workflow/editor.mako | 2 +- templates/workflow/index.mako | 2 +- templates/workflow/list.mako | 2 +- templates/workflow/list_published.mako | 2 +- 26 files changed, 177 insertions(+), 171 deletions(-) diffs (552 lines): diff -r 9f32d8c55e30 -r 273535c97761 templates/admin/index.mako --- a/templates/admin/index.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/admin/index.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/base_panels.mako --- a/templates/base_panels.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/base_panels.mako Wed Mar 31 13:11:05 2010 -0400 @@ -15,9 +15,6 @@ ## Override </%def> -## Default title -<%def name="title()">Galaxy</%def> - ## Default stylesheets <%def name="stylesheets()"> ${h.css('base','panel_layout')} @@ -152,150 +149,7 @@ ## Masthead <%def name="masthead()"> - - ## Tab area, fills entire width - <div style="position: absolute; top: 0; left: 0; width: 100%; text-align: center"> - - <table class="tab-group" border="0" cellspacing="0" style="margin: auto;"> - <tr> - - <%def name="tab( id, display, href, target='_parent', visible=True, extra_class='' )"> - <% - cls = "tab" - if extra_class: - cls += " " + extra_class - if self.active_view == id: - cls += " active" - style = "" - if not visible: - style = "display: none;" - %> - <td class="${cls}" style="${style}"><a target="${target}" href="${href}">${display}</a></td> - </%def> - - %if app.config.cloud_controller_instance: - ${tab( "cloud", "Cloud", h.url_for( controller='/cloud', action='index' ))} - %else: - ${tab( "analysis", "Analyze Data", h.url_for( controller='/root', action='index' ))} - - ${tab( "workflow", "Workflow", h.url_for( controller='/workflow', action='index' ))} - - ${tab( "libraries", "Data Libraries", h.url_for( controller='/library', action='index' ))} - %endif - - %if trans.user and trans.request_types(): - <td class="tab"> - <a>Lab</a> - <div class="submenu"> - <ul> - <li><a href="${h.url_for( controller='/requests', action='index' )}">Sequencing Requests</a></li> - <li><a target="_blank" href="${app.config.get( "lims_doc_url", "http://main.g2.bx.psu.edu/u/rc/p/sts" )}">Help</a></li> - </ul> - </div> - </td> - %endif - - %if app.config.get_bool( 'enable_tracks', False ): - <% - cls = "tab" - if self.active_view == 'visualization': - cls += " active" - %> - <td class="${cls}"> - Visualization - <div class="submenu"> - <ul> - <li><a href="${h.url_for( controller='/tracks', action='index' )}">New Track Browser</a></li> - <li><hr style="color: inherit; background-color: gray"/></li> - <li><a href="${h.url_for( controller='/visualization', action='list' )}">Saved Visualizations</a></li> - </ul> - </div> - </td> - %endif - - ${tab( "admin", "Admin", h.url_for( controller='/admin', action='index' ), extra_class="admin-only", visible=( trans.user and app.config.is_admin_user( trans.user ) ) )} - - <td class="tab"> - <a>Help</a> - <div class="submenu"> - <ul> - <li><a href="${app.config.get( "bugs_email", "mailto:galaxy-bugs@bx.psu.edu" )}">Email comments, bug reports, or suggestions</a></li> - <li><a target="_blank" href="${app.config.get( "wiki_url", "http://bitbucket.org/galaxy/galaxy-central/wiki" )}">Galaxy Wiki</a></li> - <li><a target="_blank" href="${app.config.get( "screencasts_url", "http://galaxycast.org" )}">Video tutorials (screencasts)</a></li> - <li><a target="_blank" href="${app.config.get( "citation_url", "http://bitbucket.org/galaxy/galaxy-central/wiki/Citations" )}">How to Cite Galaxy</a></li> - </ul> - </div> - </td> - - ## User tab. - <% - cls = "tab" - if self.active_view == 'user': - cls += " active" - %> - <td class="${cls}"> - <a>User</a> - <% - if trans.user: - user_email = trans.user.email - style1 = "display: none;" - style2 = ""; - else: - user_email = "" - style1 = "" - style2 = "display: none;" - %> - <div class="submenu"> - <ul class="loggedout-only" style="${style1}"> - <li><a href="${h.url_for( controller='/user', action='login' )}">Login</a></li> - %if app.config.allow_user_creation: - <li><a href="${h.url_for( controller='/user', action='create' )}">Register</a></li> - %endif - </ul> - <ul class="loggedin-only" style="${style2}"> - %if app.config.use_remote_user: - %if app.config.remote_user_logout_href: - <li><a href="${app.config.remote_user_logout_href}" target="_top">Logout</a></li> - %endif - %else: - <li>Logged in as <span id="user-email">${user_email}</span></li> - <li><a target="galaxy_main" href="${h.url_for( controller='/user', action='index' )}">Preferences</a></li> - <% - if app.config.require_login: - logout_target = "" - logout_url = h.url_for( controller='/root', action='index', m_c='user', m_a='logout' ) - else: - logout_target = "" - logout_url = h.url_for( controller='/user', action='logout' ) - %> - <li><a target="${logout_target}" href="${logout_url}">Logout</a></li> - %endif - <li><hr style="color: inherit; background-color: gray"/></li> - <li><a target="galaxy_main" href="${h.url_for( controller='/history', action='list' )}">Histories</a></li> - <li><a target="galaxy_main" href="${h.url_for( controller='/dataset', action='list' )}">Datasets</a></li> - %if app.config.get_bool( 'enable_pages', False ): - <li><a href="${h.url_for( controller='/page', action='list' )}">Pages</a></li> - %endif - </ul> - </div> - </td> - - </tr> - </table> - - </div> - - ## Logo, layered over tabs to be clickable - <div class="title" style="position: absolute; top: 0; left: 0;"> - <a href="${app.config.get( 'logo_url', '/' )}"> - <img border="0" src="${h.url_for('/static/images/galaxyIcon_noText.png')}" style="width: 26px; vertical-align: top;"> - Galaxy - %if app.config.brand: - <span class='brand'>/ ${app.config.brand}</span> - %endif - </a> - </div> - + ## Override </%def> <%def name="overlay( title='', content='' )"> diff -r 9f32d8c55e30 -r 273535c97761 templates/cloud/index.mako --- a/templates/cloud/index.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/cloud/index.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/display_base.mako --- a/templates/display_base.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/display_base.mako Wed Mar 31 13:11:05 2010 -0400 @@ -3,7 +3,7 @@ if context.get('no_panels'): return '/base.mako' else: - return '/base_panels.mako' + return '/webapps/galaxy/base_panels.mako' from galaxy.model import History, StoredWorkflow, Page from galaxy.web.framework.helpers import iff diff -r 9f32d8c55e30 -r 273535c97761 templates/form.mako --- a/templates/form.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/form.mako Wed Mar 31 13:11:05 2010 -0400 @@ -2,7 +2,7 @@ def inherit(context): if context.get('use_panels') is True: print "here" - return '/base_panels.mako' + return '/webapps/galaxy/base_panels.mako' else: return '/base.mako' %> diff -r 9f32d8c55e30 -r 273535c97761 templates/grid_base.mako --- a/templates/grid_base.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/grid_base.mako Wed Mar 31 13:11:05 2010 -0400 @@ -4,7 +4,7 @@ import galaxy.util def inherit(context): if context.get('use_panels'): - return '/base_panels.mako' + return '/webapps/galaxy/base_panels.mako' else: return '/base.mako' %> diff -r 9f32d8c55e30 -r 273535c97761 templates/history/list_published.mako --- a/templates/history/list_published.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/history/list_published.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/history/view.mako --- a/templates/history/view.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/history/view.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%namespace file="/display_common.mako" import="get_history_link, get_controller_name" /> <%namespace file="/root/history_common.mako" import="render_dataset" /> <%namespace file="/tagging_common.mako" import="render_individual_tagging_element, render_community_tagging_element" /> diff -r 9f32d8c55e30 -r 273535c97761 templates/library/common/browse_library.mako --- a/templates/library/common/browse_library.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/library/common/browse_library.mako Wed Mar 31 13:11:05 2010 -0400 @@ -5,7 +5,7 @@ <%! def inherit(context): if context.get('use_panels'): - return '/base_panels.mako' + return '/webapps/galaxy/base_panels.mako' else: return '/base.mako' %> diff -r 9f32d8c55e30 -r 273535c97761 templates/library/index.mako --- a/templates/library/index.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/library/index.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/message.mako --- a/templates/message.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/message.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,7 +1,7 @@ <%! def inherit(context): if context.get('use_panels') is True: - return '/base_panels.mako' + return '/webapps/galaxy/base_panels.mako' else: return '/base.mako' %> diff -r 9f32d8c55e30 -r 273535c97761 templates/page/editor.mako --- a/templates/page/editor.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/page/editor.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/page/index.mako --- a/templates/page/index.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/page/index.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/page/list_published.mako --- a/templates/page/list_published.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/page/list_published.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/panels.mako --- a/templates/panels.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/panels.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/requests/index.mako --- a/templates/requests/index.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/requests/index.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/root/index.mako --- a/templates/root/index.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/root/index.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="late_javascripts()"> ${parent.late_javascripts()} diff -r 9f32d8c55e30 -r 273535c97761 templates/sample/index.mako --- a/templates/sample/index.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/sample/index.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/tracks/browser.mako --- a/templates/tracks/browser.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/tracks/browser.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/visualization/list.mako --- a/templates/visualization/list.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/visualization/list.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/visualization/list_published.mako --- a/templates/visualization/list_published.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/visualization/list_published.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/webapps/galaxy/base_panels.mako --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/webapps/galaxy/base_panels.mako Wed Mar 31 13:11:05 2010 -0400 @@ -0,0 +1,152 @@ +<%inherit file="/base_panels.mako"/> + +## Default title +<%def name="title()">Galaxy</%def> + +## Masthead +<%def name="masthead()"> + + ## Tab area, fills entire width + <div style="position: absolute; top: 0; left: 0; width: 100%; text-align: center"> + + <table class="tab-group" border="0" cellspacing="0" style="margin: auto;"> + <tr> + + <%def name="tab( id, display, href, target='_parent', visible=True, extra_class='' )"> + <% + cls = "tab" + if extra_class: + cls += " " + extra_class + if self.active_view == id: + cls += " active" + style = "" + if not visible: + style = "display: none;" + %> + <td class="${cls}" style="${style}"><a target="${target}" href="${href}">${display}</a></td> + </%def> + + %if app.config.cloud_controller_instance: + ${tab( "cloud", "Cloud", h.url_for( controller='/cloud', action='index' ))} + %else: + ${tab( "analysis", "Analyze Data", h.url_for( controller='/root', action='index' ))} + + ${tab( "workflow", "Workflow", h.url_for( controller='/workflow', action='index' ))} + + ${tab( "libraries", "Data Libraries", h.url_for( controller='/library', action='index' ))} + %endif + + %if trans.user and trans.request_types(): + <td class="tab"> + <a>Lab</a> + <div class="submenu"> + <ul> + <li><a href="${h.url_for( controller='/requests', action='index' )}">Sequencing Requests</a></li> + <li><a target="_blank" href="${app.config.get( "lims_doc_url", "http://main.g2.bx.psu.edu/u/rc/p/sts" )}">Help</a></li> + </ul> + </div> + </td> + %endif + + %if app.config.get_bool( 'enable_tracks', False ): + <% + cls = "tab" + if self.active_view == 'visualization': + cls += " active" + %> + <td class="${cls}"> + Visualization + <div class="submenu"> + <ul> + <li><a href="${h.url_for( controller='/tracks', action='index' )}">New Track Browser</a></li> + <li><hr style="color: inherit; background-color: gray"/></li> + <li><a href="${h.url_for( controller='/visualization', action='list' )}">Saved Visualizations</a></li> + </ul> + </div> + </td> + %endif + + ${tab( "admin", "Admin", h.url_for( controller='/admin', action='index' ), extra_class="admin-only", visible=( trans.user and app.config.is_admin_user( trans.user ) ) )} + + <td class="tab"> + <a>Help</a> + <div class="submenu"> + <ul> + <li><a href="${app.config.get( "bugs_email", "mailto:galaxy-bugs@bx.psu.edu" )}">Email comments, bug reports, or suggestions</a></li> + <li><a target="_blank" href="${app.config.get( "wiki_url", "http://bitbucket.org/galaxy/galaxy-central/wiki" )}">Galaxy Wiki</a></li> + <li><a target="_blank" href="${app.config.get( "screencasts_url", "http://galaxycast.org" )}">Video tutorials (screencasts)</a></li> + <li><a target="_blank" href="${app.config.get( "citation_url", "http://bitbucket.org/galaxy/galaxy-central/wiki/Citations" )}">How to Cite Galaxy</a></li> + </ul> + </div> + </td> + + ## User tab. + <% + cls = "tab" + if self.active_view == 'user': + cls += " active" + %> + <td class="${cls}"> + <a>User</a> + <% + if trans.user: + user_email = trans.user.email + style1 = "display: none;" + style2 = ""; + else: + user_email = "" + style1 = "" + style2 = "display: none;" + %> + <div class="submenu"> + <ul class="loggedout-only" style="${style1}"> + <li><a href="${h.url_for( controller='/user', action='login' )}">Login</a></li> + %if app.config.allow_user_creation: + <li><a href="${h.url_for( controller='/user', action='create' )}">Register</a></li> + %endif + </ul> + <ul class="loggedin-only" style="${style2}"> + %if app.config.use_remote_user: + %if app.config.remote_user_logout_href: + <li><a href="${app.config.remote_user_logout_href}" target="_top">Logout</a></li> + %endif + %else: + <li>Logged in as <span id="user-email">${user_email}</span></li> + <li><a target="galaxy_main" href="${h.url_for( controller='/user', action='index' )}">Preferences</a></li> + <% + if app.config.require_login: + logout_target = "" + logout_url = h.url_for( controller='/root', action='index', m_c='user', m_a='logout' ) + else: + logout_target = "" + logout_url = h.url_for( controller='/user', action='logout' ) + %> + <li><a target="${logout_target}" href="${logout_url}">Logout</a></li> + %endif + <li><hr style="color: inherit; background-color: gray"/></li> + <li><a target="galaxy_main" href="${h.url_for( controller='/history', action='list' )}">Histories</a></li> + <li><a target="galaxy_main" href="${h.url_for( controller='/dataset', action='list' )}">Datasets</a></li> + %if app.config.get_bool( 'enable_pages', False ): + <li><a href="${h.url_for( controller='/page', action='list' )}">Pages</a></li> + %endif + </ul> + </div> + </td> + + </tr> + </table> + + </div> + + ## Logo, layered over tabs to be clickable + <div class="title" style="position: absolute; top: 0; left: 0;"> + <a href="${app.config.get( 'logo_url', '/' )}"> + <img border="0" src="${h.url_for('/static/images/galaxyIcon_noText.png')}" style="width: 26px; vertical-align: top;"> + Galaxy + %if app.config.brand: + <span class='brand'>/ ${app.config.brand}</span> + %endif + </a> + </div> + +</%def> diff -r 9f32d8c55e30 -r 273535c97761 templates/workflow/editor.mako --- a/templates/workflow/editor.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/workflow/editor.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/workflow/index.mako --- a/templates/workflow/index.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/workflow/index.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/workflow/list.mako --- a/templates/workflow/list.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/workflow/list.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <% diff -r 9f32d8c55e30 -r 273535c97761 templates/workflow/list_published.mako --- a/templates/workflow/list_published.mako Wed Mar 31 12:36:05 2010 -0400 +++ b/templates/workflow/list_published.mako Wed Mar 31 13:11:05 2010 -0400 @@ -1,4 +1,4 @@ -<%inherit file="/base_panels.mako"/> +<%inherit file="/webapps/galaxy/base_panels.mako"/> <%def name="init()"> <%
participants (1)
-
Greg Von Kuster