from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1287725327.091922 _template_filename='templates/root/tool_menu.mako' _template_uri='/root/tool_menu.mako' _template_cache=cache.Cache(__name__, _modified_time) _source_encoding=None _exports = ['render_label', 'render_tool', 'render_workflow'] def render_body(context,**pageargs): context.caller_stack._push_frame() try: __M_locals = __M_dict_builtin(pageargs=pageargs) _ = context.get('_', UNDEFINED) h = context.get('h', UNDEFINED) def render_label(label): return render_render_label(context.locals_(__M_locals),label) t = context.get('t', UNDEFINED) str = context.get('str', UNDEFINED) recent_tools = context.get('recent_tools', UNDEFINED) toolbox = context.get('toolbox', UNDEFINED) trans = context.get('trans', UNDEFINED) def render_tool(tool,section): return render_render_tool(context.locals_(__M_locals),tool,section) def render_workflow(key,workflow,section): return render_render_workflow(context.locals_(__M_locals),key,workflow,section) __M_writer = context.writer() # SOURCE LINE 25 __M_writer(u'\n\n') # SOURCE LINE 37 __M_writer(u'\n\n') # SOURCE LINE 44 __M_writer(u'\n\n\n\n \n ') # SOURCE LINE 49 __M_writer(unicode(_('Galaxy Tools'))) __M_writer(u'\n \n \n \n\n') # SOURCE LINE 55 __M_writer(u' ') __M_writer(unicode(h.js( "jquery", "galaxy.base", "json2" ))) __M_writer(u'\n\n \n \n\n \n
\n \n') # SOURCE LINE 243 __M_writer(u' ') show_tool_search = False if trans.user: show_tool_search = trans.user.preferences.get( "show_tool_search", "False" ) if show_tool_search == "True": display = "block" else: display = "none" __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['display','show_tool_search'] if __M_key in __M_locals_builtin()])) # SOURCE LINE 252 __M_writer(u'\n \n \n') # SOURCE LINE 259 if trans.user: # SOURCE LINE 260 __M_writer(u' ') if trans.user.preferences.get( 'show_recently_used_menu', 'False' ) == 'True': display = "block" pref_class = "user_pref_visible" else: display = "none" pref_class = "user_pref_hidden" __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['pref_class','display'] if __M_key in __M_locals_builtin()])) # SOURCE LINE 267 __M_writer(u'\n
\n
\n Recently Used\n
\n
\n
\n') # SOURCE LINE 275 for tool in recent_tools: # SOURCE LINE 276 __M_writer(u' ') __M_writer(unicode(render_tool( tool, True ))) __M_writer(u'\n') # SOURCE LINE 278 __M_writer(u'
\n
\n
\n
\n') # SOURCE LINE 283 __M_writer(u' \n') # SOURCE LINE 285 for key, val in toolbox.tool_panel.items(): # SOURCE LINE 286 __M_writer(u'
\n') # SOURCE LINE 287 if key.startswith( 'tool' ): # SOURCE LINE 288 __M_writer(u' ') __M_writer(unicode(render_tool( val, False ))) __M_writer(u'\n') # SOURCE LINE 289 elif key.startswith( 'workflow' ): # SOURCE LINE 290 __M_writer(u' ') __M_writer(unicode(render_workflow( key, val, False ))) __M_writer(u'\n') # SOURCE LINE 291 elif key.startswith( 'section' ): # SOURCE LINE 292 __M_writer(u' ') section = val __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['section'] if __M_key in __M_locals_builtin()])) __M_writer(u'\n
\n ') # SOURCE LINE 294 __M_writer(unicode(section.name)) __M_writer(u'\n
\n
\n
\n') # SOURCE LINE 298 for section_key, section_val in section.elems.items(): # SOURCE LINE 299 if section_key.startswith( 'tool' ): # SOURCE LINE 300 __M_writer(u' ') __M_writer(unicode(render_tool( section_val, True ))) __M_writer(u'\n') # SOURCE LINE 301 elif section_key.startswith( 'workflow' ): # SOURCE LINE 302 __M_writer(u' ') __M_writer(unicode(render_workflow( section_key, section_val, True ))) __M_writer(u'\n') # SOURCE LINE 303 elif section_key.startswith( 'label' ): # SOURCE LINE 304 __M_writer(u' ') __M_writer(unicode(render_label( section_val ))) __M_writer(u'\n') # SOURCE LINE 307 __M_writer(u'
\n
\n') # SOURCE LINE 309 elif key.startswith( 'label' ): # SOURCE LINE 310 __M_writer(u' ') __M_writer(unicode(render_label( val ))) __M_writer(u'\n') # SOURCE LINE 312 __M_writer(u'
\n
\n') # SOURCE LINE 315 __M_writer(u' \n') # SOURCE LINE 317 __M_writer(u' \n \n') # SOURCE LINE 324 __M_writer(u' \n') # SOURCE LINE 325 if t.user: # SOURCE LINE 326 __M_writer(u'
\n
\n
\n Workflows\n
\n
\n
\n') # SOURCE LINE 333 if t.user.stored_workflow_menu_entries: # SOURCE LINE 334 for m in t.user.stored_workflow_menu_entries: # SOURCE LINE 335 __M_writer(u' \n') # SOURCE LINE 340 __M_writer(u' \n
\n
\n') # SOURCE LINE 346 __M_writer(u' \n
\n \n \n\n') return '' finally: context.caller_stack._pop_frame() def render_render_label(context,label): context.caller_stack._push_frame() try: __M_writer = context.writer() # SOURCE LINE 40 __M_writer(u'\n
\n ') # SOURCE LINE 42 __M_writer(unicode(label.text)) __M_writer(u'\n
\n') return '' finally: context.caller_stack._pop_frame() def render_render_tool(context,tool,section): context.caller_stack._push_frame() try: h = context.get('h', UNDEFINED) t = context.get('t', UNDEFINED) _ = context.get('_', UNDEFINED) __M_writer = context.writer() # SOURCE LINE 2 __M_writer(u'\n') # SOURCE LINE 3 if not tool.hidden: # SOURCE LINE 4 if section: # SOURCE LINE 5 __M_writer(u'
\n') # SOURCE LINE 6 else: # SOURCE LINE 7 __M_writer(u'
\n') # SOURCE LINE 9 __M_writer(u' ') if tool.input_required: link = h.url_for( controller='tool_runner', tool_id=tool.id ) else: link = h.url_for( tool.action, ** tool.get_static_param_values( t ) ) # SOURCE LINE 14 __M_writer(u'\n') # SOURCE LINE 18 if tool.name: # SOURCE LINE 19 __M_writer(u' ') __M_writer(unicode(_(tool.name))) __M_writer(u' ') __M_writer(unicode(tool.description)) __M_writer(u' \n') # SOURCE LINE 20 else: # SOURCE LINE 21 __M_writer(u' ') __M_writer(unicode(tool.description)) __M_writer(u'\n') # SOURCE LINE 23 __M_writer(u'
\n') return '' finally: context.caller_stack._pop_frame() def render_render_workflow(context,key,workflow,section): context.caller_stack._push_frame() try: h = context.get('h', UNDEFINED) _ = context.get('_', UNDEFINED) __M_writer = context.writer() # SOURCE LINE 28 __M_writer(u'\n') # SOURCE LINE 29 if section: # SOURCE LINE 30 __M_writer(u'
\n') # SOURCE LINE 31 else: # SOURCE LINE 32 __M_writer(u'
\n') # SOURCE LINE 34 __M_writer(u' ') encoded_id = key.lstrip( 'workflow_' ) __M_writer(u'\n ') __M_writer(unicode(_(workflow.name))) __M_writer(u'\n
\n') return '' finally: context.caller_stack._pop_frame()