From 2b87ccac659ed67808982fbc8597f984e4cdabd7 Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Wed, 8 May 2013 14:37:33 -0400 Subject: [PATCH] Fix for incorrect template inheritance causing the tool shed base_panels to be displayed in the galaxy app when logging in after logout. --- templates/user/login.mako | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/templates/user/login.mako b/templates/user/login.mako index d0f78503d14..03ba4131374 100644 --- a/templates/user/login.mako +++ b/templates/user/login.mako @@ -1,20 +1,13 @@ -%if trans.webapp.name == 'galaxy': - <%! - def inherit(context): - if context.get('use_panels'): - return '/webapps/galaxy/base_panels.mako' - else: - return '/base.mako' - %> -%elif trans.webapp.name == 'tool_shed': - <%! - def inherit(context): - if context.get('use_panels'): - return '/webapps/tool_shed/base_panels.mako' - else: - return '/base.mako' - %> -%endif +<%! +#This is a hack, we should restructure templates to avoid this. +def inherit(context): + if context.get('trans').webapp.name == 'galaxy': + return '/webapps/galaxy/base_panels.mako' + elif context.get('trans').webapp.name == 'tool_shed': + return '/webapps/tool_shed/base_panels.mako' + else: + return '/base.mako' +%> <%inherit file="${inherit(context)}"/>