commit/galaxy-central: greg: Add the ability to switch between tool shed repository revsions when viewing tool metadata.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/b1f22f337651/ changeset: b1f22f337651 user: greg date: 2011-08-22 22:31:50 summary: Add the ability to switch between tool shed repository revsions when viewing tool metadata. affected #: 3 files (1.5 KB) --- a/lib/galaxy/webapps/community/controllers/repository.py Mon Aug 22 16:19:49 2011 -0400 +++ b/lib/galaxy/webapps/community/controllers/repository.py Mon Aug 22 16:31:50 2011 -0400 @@ -1157,12 +1157,17 @@ tool = None break is_malicious = change_set_is_malicious( trans, repository_id, repository.tip ) + changeset_revision_select_field = build_changeset_revision_select_field( trans, + repository, + selected_value=changeset_revision, + add_id_to_name=False ) return trans.fill_template( "/webapps/community/repository/view_tool_metadata.mako", repository=repository, tool=tool, metadata=metadata, changeset_revision=changeset_revision, revision_label=revision_label, + changeset_revision_select_field=changeset_revision_select_field, is_malicious=is_malicious, message=message, status=status ) --- a/templates/webapps/community/repository/manage_repository.mako Mon Aug 22 16:19:49 2011 -0400 +++ b/templates/webapps/community/repository/manage_repository.mako Mon Aug 22 16:31:50 2011 -0400 @@ -19,7 +19,7 @@ browse_label = 'Browse or delete repository files' else: browse_label = 'Browse repository files' - can_set_malicious = metadata and can_set_metadata and is_admin + can_set_malicious = metadata and can_set_metadata and is_admin and changeset_revision == repository.tip %><%! --- a/templates/webapps/community/repository/view_tool_metadata.mako Mon Aug 22 16:19:49 2011 -0400 +++ b/templates/webapps/community/repository/view_tool_metadata.mako Mon Aug 22 16:31:50 2011 -0400 @@ -71,14 +71,31 @@ <div class="toolForm"><div class="toolFormTitle">Repository revision</div><div class="toolFormBody"> - <div class="form-row"> - <label>Revision:</label> - %if can_view_change_log: - <a href="${h.url_for( controller='repository', action='view_changelog', id=trans.app.security.encode_id( repository.id ) )}">${revision_label}</a> - %else: - ${revision_label} - %endif - </div> + %if len( changeset_revision_select_field.options ) > 1: + <form name="change_revision" id="change_revision" action="${h.url_for( controller='repository', action='view_tool_metadata', repository_id=trans.security.encode_id( repository.id ), tool_id=metadata[ 'id' ] )}" method="post" > + <div class="form-row"> + <% + if changeset_revision == repository.tip: + tip_str = 'repository tip' + else: + tip_str = '' + %> + ${changeset_revision_select_field.get_html()} <i>${tip_str}</i> + <div class="toolParamHelp" style="clear: both;"> + Select a revision to inspect and download versions of tools from this repository. + </div> + </div> + </form> + %else: + <div class="form-row"> + <label>Revision:</label> + %if can_view_change_log: + <a href="${h.url_for( controller='repository', action='view_changelog', id=trans.app.security.encode_id( repository.id ) )}">${revision_label}</a> + %else: + ${revision_label} + %endif + </div> + %endif </div></div><p/> 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)
-
Bitbucket