## Render a tool <%def name="render_tool( tool, section )"> %if not tool.hidden: %if section:
%else:
%endif <% 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 ) ) %> ## FIXME: This doesn't look right ## %if "[[" in tool.description and "]]" in tool.description: ## ${tool.description.replace( '[[', '' % $tool.id ).replace( "]]", "" ) %if tool.name: ${_(tool.name)} ${tool.description} %else: ${tool.description} %endif
%endif ## Render a workflow <%def name="render_workflow( key, workflow, section )"> %if section:
%else:
%endif <% encoded_id = key.lstrip( 'workflow_' ) %> ${_(workflow.name)}
## Render a label <%def name="render_label( label )">
${label.text}
${_('Galaxy Tools')} ## ${h.js( "jquery", "galaxy.base", "json2" )}
## Tool search. <% 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" %> ## Recently used tools. %if trans.user: <% 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" %>
Recently Used
%for tool in recent_tools: ${render_tool( tool, True )} %endfor
%endif ## Tools. %for key, val in toolbox.tool_panel.items():
%if key.startswith( 'tool' ): ${render_tool( val, False )} %elif key.startswith( 'workflow' ): ${render_workflow( key, val, False )} %elif key.startswith( 'section' ): <% section = val %>
${section.name}
%for section_key, section_val in section.elems.items(): %if section_key.startswith( 'tool' ): ${render_tool( section_val, True )} %elif section_key.startswith( 'workflow' ): ${render_workflow( section_key, section_val, True )} %elif section_key.startswith( 'label' ): ${render_label( section_val )} %endif %endfor
%elif key.startswith( 'label' ): ${render_label( val )} %endif
%endfor ## Feedback when search returns no results. ## Link to workflow management. The location of this may change, but eventually ## at least some workflows will appear here (the user should be able to ## configure which of their stored workflows appear in the tools menu). %if t.user:
Workflows
%if t.user.stored_workflow_menu_entries: %for m in t.user.stored_workflow_menu_entries: %endfor %endif
%endif