commit/galaxy-central: greg: Display the new request type in appropriate tool shed girds.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/320d6f095b81/ Changeset: 320d6f095b81 User: greg Date: 2013-07-15 16:10:12 Summary: Display the new request type in appropriate tool shed girds. Affected #: 2 files diff -r ea94ef1419d04dc442644edc0090f9d165fad2fd -r 320d6f095b810d8c338c5ad5dbc04d6685505c5e lib/tool_shed/grids/repository_grids.py --- a/lib/tool_shed/grids/repository_grids.py +++ b/lib/tool_shed/grids/repository_grids.py @@ -82,6 +82,13 @@ return escape_html( repository.name ) + class TypeColumn( grids.TextColumn ): + + def get_value( self, trans, grid, repository ): + type_class = repository.get_type_class( trans.app ) + return escape_html( type_class.label ) + + class MetadataRevisionColumn( grids.GridColumn ): def __init__( self, col_name ): @@ -210,8 +217,9 @@ DescriptionColumn( "Synopsis", key="description", attach_popup=False ), - MetadataRevisionColumn( "Metadata Revisions" ), - ToolsFunctionallyCorrectColumn( "Tools Verified" ), + TypeColumn( "Type" ), + MetadataRevisionColumn( "Metadata<br/>Revisions" ), + ToolsFunctionallyCorrectColumn( "Tools<br/>Verified" ), UserColumn( "Owner", model_class=model.User, link=( lambda item: dict( operation="repositories_by_user", id=item.id ) ), @@ -365,8 +373,9 @@ key="name", link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ), attach_popup=False ), - RepositoryGrid.MetadataRevisionColumn( "Metadata Revisions" ), - RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ), + RepositoryGrid.TypeColumn( "Type" ), + RepositoryGrid.MetadataRevisionColumn( "Metadata<br/>Revisions" ), + RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools<br/>Verified" ), RepositoryGrid.UserColumn( "Owner", model_class=model.User, link=( lambda item: dict( operation="repositories_by_user", id=item.id ) ), @@ -412,8 +421,9 @@ RepositoryGrid.DescriptionColumn( "Synopsis", key="description", attach_popup=False ), - RepositoryGrid.MetadataRevisionColumn( "Metadata Revisions" ), - RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ), + RepositoryGrid.TypeColumn( "Type" ), + RepositoryGrid.MetadataRevisionColumn( "Metadata<br/>Revisions" ), + RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools<br/>Verified" ), RepositoryGrid.CategoryColumn( "Category", model_class=model.Category, key="Category.name", @@ -448,8 +458,9 @@ RepositoryGrid.DescriptionColumn( "Synopsis", key="description", attach_popup=False ), - RepositoryGrid.MetadataRevisionColumn( "Metadata Revisions" ), - RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ), + RepositoryGrid.TypeColumn( "Type" ), + RepositoryGrid.MetadataRevisionColumn( "Metadata<br/>Revisions" ), + RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools<br/>Verified" ), RepositoryGrid.UserColumn( "Owner", model_class=model.User, link=( lambda item: dict( controller="repository", operation="repositories_by_user", id=item.id ) ), @@ -496,8 +507,9 @@ key="name", link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ), attach_popup=False ), - RepositoryGrid.MetadataRevisionColumn( "Metadata Revisions" ), - RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ), + RepositoryGrid.TypeColumn( "Type" ), + RepositoryGrid.MetadataRevisionColumn( "Metadata<br/>Revisions" ), + RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools<br/>Verified" ), RepositoryGrid.DeprecatedColumn( "Deprecated" ) ] columns.append( grids.MulticolFilterColumn( "Search repository name", @@ -785,8 +797,9 @@ key="name", link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ), attach_popup=False ), - RepositoriesIOwnGrid.MetadataRevisionColumn( "Metadata Revisions" ), - RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ), + RepositoryGrid.TypeColumn( "Type" ), + RepositoriesIOwnGrid.MetadataRevisionColumn( "Metadata<br/>Revisions" ), + RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools<br/>Verified" ), RepositoriesIOwnGrid.CategoryColumn( "Category", model_class=model.Category, key="Category.name", @@ -1100,6 +1113,14 @@ return escape_html( repository.name ) + class RepositoryTypeColumn( grids.TextColumn ): + + def get_value( self, trans, grid, repository_metadata ): + repository = repository_metadata.repository + type_class = repository.get_type_class( trans.app ) + return escape_html( type_class.label ) + + class RepositoryOwnerColumn( grids.TextColumn ): def get_value( self, trans, grid, repository_metadata ): @@ -1201,6 +1222,7 @@ key="Repository.name", link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ), attach_popup=False ), + RepositoryNameColumn( "Type" ), RepositoryOwnerColumn( "Owner", model_class=model.User, attach_popup=False, @@ -1598,8 +1620,9 @@ RepositoryGrid.DescriptionColumn( "Synopsis", key="description", attach_popup=False ), + RepositoryGrid.TypeColumn( "Type" ), InstallableRevisionColumn( "Installable Revisions" ), - RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ), + RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools<br/>Verified" ), RepositoryGrid.UserColumn( "Owner", model_class=model.User, attach_popup=False ), diff -r ea94ef1419d04dc442644edc0090f9d165fad2fd -r 320d6f095b810d8c338c5ad5dbc04d6685505c5e test/tool_shed/functional/test_0000_basic_repository_features.py --- a/test/tool_shed/functional/test_0000_basic_repository_features.py +++ b/test/tool_shed/functional/test_0000_basic_repository_features.py @@ -353,5 +353,5 @@ # Check for the changeset revision, repository name, owner username, 'repos' in the clone url, and the captured # unicode decoding error message. strings_displayed = [ 'Changeset %d:%s' % ( revision_number, revision_hash ), 'filtering_0000', 'user1', 'repos', 'added:', - '+These characters should not' ] + '+These characters should not' ] self.load_changeset_in_tool_shed( repository_id, changeset_revision, strings_displayed=strings_displayed ) \ No newline at end of file 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.
participants (1)
-
commits-noreply@bitbucket.org