Fix for incorrect template inheritance causing the tool shed base_panels to be displayed in the galaxy app when logging in after logout.

This commit is contained in:
Daniel Blankenberg
2013-05-08 14:37:33 -04:00
parent 930f938d3c
commit 2b87ccac65
+10 -17
View File
@@ -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)}"/>