Commits

Greg Von Kuster committed 9804130

Clarify tool searches in the tool shed. Searches are retricted to only tools that properly load in Galaxy.

  • Participants
  • Parent commits 8953f79

Comments (0)

Files changed (3)

File lib/galaxy/webapps/community/controllers/repository.py

         params = util.Params( kwd )
         message = util.restore_text( params.get( 'message', ''  ) )
         status = params.get( 'status', 'done' )
-        return trans.fill_template( '/webapps/community/index.mako', message=message, status=status )
+        # See if there are any RepositoryMetadata records since menu items require them.
+        repository_metadata = trans.sa_session.query( model.RepositoryMetadata ).first()
+        return trans.fill_template( '/webapps/community/index.mako',
+                                    repository_metadata=repository_metadata,
+                                    message=message,
+                                    status=status )
     @web.expose
     def browse_categories( self, trans, **kwd ):
         if 'f-free-text-search' in kwd:
         exact_matches_checked = CheckboxField.is_checked( exact_matches )
         match_tuples = []
         if tool_id or tool_name or tool_version:
-            for repository_metadata in trans.sa_session.query( model.RepositoryMetadata.table ).all():
+            for repository_metadata in trans.sa_session.query( model.RepositoryMetadata ):
                 metadata = repository_metadata.metadata
                 tools = metadata[ 'tools' ]
                 found = False

File templates/webapps/community/index.mako

                                 <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_repositories', operation='my_repositories', webapp='community' )}">Browse my repositories</a>
                             </div>
                         %endif
-                        <div class="toolTitle">
-                            <a target="galaxy_main" href="${h.url_for( controller='repository', action='find_tools', webapp='community' )}">Search for tools</a>
-                        </div>
+                        %if repository_metadata:
+                            <div class="toolTitle">
+                                <a target="galaxy_main" href="${h.url_for( controller='repository', action='find_tools', webapp='community' )}">Search for valid tools</a>
+                            </div>
+                        %endif
                     </div>
                 </div>
                 <div class="toolSectionBody">

File templates/webapps/community/repository/find_tools.mako

 %endif
 
 <div class="toolForm">
-    <div class="toolFormTitle">Search repositories for tools</div>
+    <div class="toolFormTitle">Search repositories for valid tools</div>
     <div class="toolFormBody">
         <div class="form-row">
-            Enter any combination of the following tool attributes to locate matching tools.
+            Valid tools are those that properly load in Galaxy.  Enter any combination of the following tool attributes to locate matching valid tools.
         </div>
         <div style="clear: both"></div>
         <form name="find_tools" id="find_tools" action="${h.url_for( controller='repository', action='find_tools' )}" method="post" >