Commits

Greg Von Kuster committed 23b1732

Fix for loading tools from an installed tool shed repository into the tool panel outside of any sections.

  • Participants
  • Parent commits 60231c4

Comments (0)

Files changed (4)

lib/galaxy/util/shed_util.py

         id_elem.text = tool.id
         version_elem = SubElement( tool_elem, 'version' )
         version_elem.text = tool.version
+        if not tool_section:
+            elem_list.append( tool_elem )
     if tool_section:
         elem_list.append( root_elem )
-    elif tool_elem:
-        elem_list.append( tool_elem )
     return elem_list
 def generate_workflow_metadata( relative_path, exported_workflow_dict, metadata_dict ):
     """

lib/galaxy/web/controllers/admin_toolshed.py

         original_section_name = tool_panel_section[ 'name' ]
         tool_panel_section_select_field = build_tool_panel_section_select_field( trans )
         no_changes_check_box = CheckboxField( 'no_changes', checked=True )
-        message = "The tools contained in your <b>%s</b> repository were last loaded into the tool panel section <b>%s</b>.  " % ( repository.name, original_section_name )
-        message += "Uncheck the <b>No changes</b> check box and select a different tool panel section to load the tools in a "
-        message += "different section in the tool panel."
+        if original_section_name:
+            message = "The tools contained in your <b>%s</b> repository were last loaded into the tool panel section <b>%s</b>.  " \
+                % ( repository.name, original_section_name )
+            message += "Uncheck the <b>No changes</b> check box and select a different tool panel section to load the tools in a "
+            message += "different section in the tool panel."
+        else:
+            message = "The tools contained in your <b>%s</b> repository were last loaded into the tool panel outside of any sections.  " % repository.name
+            message += "Uncheck the <b>No changes</b> check box and select a tool panel section to load the tools into that section."
         status = 'done'
         return trans.fill_template( '/admin/tool_shed_repository/reselect_tool_panel_section.mako',
                                     repository=repository,

templates/admin/tool_shed_repository/reselect_tool_panel_section.mako

                 <label>Add new tool panel section:</label>
                 <input name="new_tool_panel_section" type="textfield" value="" size="40"/>
                 <div class="toolParamHelp" style="clear: both;">
-                    Add a new tool panel section contain the installed tools (optional).
+                    Add a new tool panel section to contain the installed tools (optional).
                 </div>
             </div>
             <div class="form-row">

templates/admin/tool_shed_repository/select_tool_panel_section.mako

                 <label>Add new tool panel section:</label>
                 <input name="new_tool_panel_section" type="textfield" value="${new_tool_panel_section}" size="40"/>
                 <div class="toolParamHelp" style="clear: both;">
-                    Add a new tool panel section contain the installed tools (optional).
+                    Add a new tool panel section to contain the installed tools (optional).
                 </div>
             </div>
             <div class="form-row">