1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/e38a9eb21336/ changeset: e38a9eb21336 user: greg date: 2012-02-06 16:19:43 summary: Load empty tool sections into the in-memory tool_panel dictionary, just don't display them in the tool panel. Also include a fix for reactivating or unintallting a tool shed repository that includes tools - ToolVersion ovjects cannot be marked deleted. affected #: 3 files diff -r 281bd9a8feddf90af8edf13acfa752809f7824d5 -r e38a9eb21336ce56ba6c5ec53e7492853c2c4088 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -295,7 +295,7 @@ self.load_workflow_tag_set( sub_elem, elems ) elif sub_elem.tag == 'label': self.load_label_tag_set( sub_elem, elems ) - if key not in panel_dict and section.elems: + if key not in panel_dict: panel_dict[ key ] = section def load_tool( self, config_file, guid=None ): """ diff -r 281bd9a8feddf90af8edf13acfa752809f7824d5 -r e38a9eb21336ce56ba6c5ec53e7492853c2c4088 lib/galaxy/web/controllers/admin_toolshed.py --- a/lib/galaxy/web/controllers/admin_toolshed.py +++ b/lib/galaxy/web/controllers/admin_toolshed.py @@ -499,18 +499,9 @@ metadata = repository.metadata repository_tools_tups = get_repository_tools_tups( trans.app, metadata ) guids_to_activate = [ repository_tool_tup[1] for repository_tool_tup in repository_tools_tups ] - # Undelete the tool_version for each guid. + # Make sure we have a tool_version for each guid. for guid_to_activate in guids_to_activate: - tool_version = get_tool_version( trans.app, guid_to_activate ) - if tool_version: - if tool_version.deleted: - # This should not happen as we are currently not marking tool versions as deleted - # upon deactivation. We may decide to eliminate the tool_version.deleted column - # at some point, but we'll keep it for now in case we decide its useful. - tool_version.deleted = False - trans.sa_session.add( tool_version ) - trans.sa_session.flush() - else: + if not get_tool_version( trans.app, guid_to_activate ): # We're somehow missing a tool_version, so create a new one. tool_version = trans.model.ToolVersion( tool_id=guid_to_activate, tool_shed_repository=repository ) trans.sa_session.add( tool_version ) diff -r 281bd9a8feddf90af8edf13acfa752809f7824d5 -r e38a9eb21336ce56ba6c5ec53e7492853c2c4088 templates/root/tool_menu.mako --- a/templates/root/tool_menu.mako +++ b/templates/root/tool_menu.mako @@ -365,22 +365,25 @@ ${render_workflow( key, val, False )} %elif key.startswith( 'section' ): <% section = val %> - <div class="toolSectionTitle" id="title_${section.id}"> - <span>${section.name}</span> - </div> - <div id="${section.id}" class="toolSectionBody"> - <div class="toolSectionBg"> - %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 + ## Render the section only if it is not empty. + %if section.elems: + <div class="toolSectionTitle" id="title_${section.id}"> + <span>${section.name}</span></div> - </div> + <div id="${section.id}" class="toolSectionBody"> + <div class="toolSectionBg"> + %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 + </div> + </div> + %endif %elif key.startswith( 'label' ): ${render_label( val )} %endif Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.