1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/20d002e4e423/ changeset: 20d002e4e423 user: greg date: 2012-10-18 22:32:33 summary: Be able to find the desired review when choosing to manage it from various places in the tool shed. affected #: 4 files diff -r 2914e5d87851afcc9cadb7de02200a1eb75cc7e5 -r 20d002e4e423f3c0559ae6c74ec3040754aa3b86 lib/galaxy/webapps/community/controllers/repository.py --- a/lib/galaxy/webapps/community/controllers/repository.py +++ b/lib/galaxy/webapps/community/controllers/repository.py @@ -1679,6 +1679,13 @@ selected_categories = [ rca.category_id for rca in repository.categories ] # Determine if the current changeset revision has been reviewed by the current user. reviewed_by_user = changeset_revision_reviewed_by_user( trans, trans.user, repository, changeset_revision ) + if reviewed_by_user: + review = get_review_by_repository_id_changeset_revision_user_id( trans, + repository_id, + changeset_revision, + trans.security.encode_id( trans.user.id ) ) + else: + review = None return trans.fill_template( '/webapps/community/repository/manage_repository.mako', cntrller=cntrller, repo_name=repo_name, @@ -1691,6 +1698,7 @@ repository_metadata_id=repository_metadata_id, changeset_revision=changeset_revision, reviewed_by_user=reviewed_by_user, + review=review, changeset_revision_select_field=changeset_revision_select_field, revision_label=revision_label, selected_categories=selected_categories, @@ -2330,6 +2338,13 @@ status = 'error' # Determine if the current changeset revision has been reviewed by the current user. reviewed_by_user = changeset_revision_reviewed_by_user( trans, trans.user, repository, changeset_revision ) + if reviewed_by_user: + review = get_review_by_repository_id_changeset_revision_user_id( trans, + repository_id, + changeset_revision, + trans.security.encode_id( trans.user.id ) ) + else: + review = None return trans.fill_template( '/webapps/community/repository/view_repository.mako', cntrller=cntrller, repo=repo, @@ -2342,6 +2357,7 @@ alerts_check_box=alerts_check_box, changeset_revision=changeset_revision, reviewed_by_user=reviewed_by_user, + review=review, changeset_revision_select_field=changeset_revision_select_field, revision_label=revision_label, is_malicious=is_malicious, @@ -2403,6 +2419,13 @@ downloadable=False ) trans.app.config.tool_data_path = original_tool_data_path reviewed_by_user = changeset_revision_reviewed_by_user( trans, trans.user, repository, changeset_revision ) + if reviewed_by_user: + review = get_review_by_repository_id_changeset_revision_user_id( trans, + repository_id, + changeset_revision, + trans.security.encode_id( trans.user.id ) ) + else: + review = None return trans.fill_template( "/webapps/community/repository/view_tool_metadata.mako", repository=repository, metadata=metadata, @@ -2414,6 +2437,7 @@ changeset_revision_select_field=changeset_revision_select_field, is_malicious=is_malicious, reviewed_by_user=reviewed_by_user, + review=review, message=message, status=status ) diff -r 2914e5d87851afcc9cadb7de02200a1eb75cc7e5 -r 20d002e4e423f3c0559ae6c74ec3040754aa3b86 templates/webapps/community/repository/manage_repository.mako --- a/templates/webapps/community/repository/manage_repository.mako +++ b/templates/webapps/community/repository/manage_repository.mako @@ -49,7 +49,7 @@ <ul class="manage-table-actions"> %if reviewing_repository: %if reviewed_by_user: - <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', id=trans.app.security.encode_id( repository.id ), changeset_revision=changeset_revision )}">Manage my review of this revision</a> + <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', id=trans.app.security.encode_id( review.id ) )}">Manage my review of this revision</a> %else: <a class="action-button" href="${h.url_for( controller='repository_review', action='create_review', id=trans.app.security.encode_id( repository.id ), changeset_revision=changeset_revision )}">Add a review to this revision</a> %endif @@ -61,7 +61,7 @@ <div popupmenu="repository-${repository.id}-popup"> %if can_review_repository: %if reviewed_by_user: - <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', id=trans.app.security.encode_id( repository.id ), changeset_revision=changeset_revision )}">Manage my review of this revision</a> + <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', id=trans.app.security.encode_id( review.id ) )}">Manage my review of this revision</a> %else: <a class="action-button" href="${h.url_for( controller='repository_review', action='create_review', id=trans.app.security.encode_id( repository.id ), changeset_revision=changeset_revision )}">Add a review to this revision</a> %endif diff -r 2914e5d87851afcc9cadb7de02200a1eb75cc7e5 -r 20d002e4e423f3c0559ae6c74ec3040754aa3b86 templates/webapps/community/repository/view_repository.mako --- a/templates/webapps/community/repository/view_repository.mako +++ b/templates/webapps/community/repository/view_repository.mako @@ -42,7 +42,7 @@ %if trans.webapp.name == 'community': %if reviewing_repository: %if reviewed_by_user: - <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', id=trans.app.security.encode_id( repository.id ), changeset_revision=changeset_revision )}">Manage my review of this revision</a> + <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', id=trans.app.security.encode_id( review.id ) )}">Manage my review of this revision</a> %else: <a class="action-button" href="${h.url_for( controller='repository_review', action='create_review', id=trans.app.security.encode_id( repository.id ), changeset_revision=changeset_revision )}">Add a review to this revision</a> %endif @@ -54,7 +54,7 @@ <div popupmenu="repository-${repository.id}-popup"> %if can_review_repository: %if reviewed_by_user: - <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', id=trans.app.security.encode_id( repository.id ), changeset_revision=changeset_revision )}">Manage my review of this revision</a> + <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', id=trans.app.security.encode_id( review.id ) )}">Manage my review of this revision</a> %else: <a class="action-button" href="${h.url_for( controller='repository_review', action='create_review', id=trans.app.security.encode_id( repository.id ), changeset_revision=changeset_revision )}">Add a review to this revision</a> %endif diff -r 2914e5d87851afcc9cadb7de02200a1eb75cc7e5 -r 20d002e4e423f3c0559ae6c74ec3040754aa3b86 templates/webapps/community/repository/view_tool_metadata.mako --- a/templates/webapps/community/repository/view_tool_metadata.mako +++ b/templates/webapps/community/repository/view_tool_metadata.mako @@ -55,7 +55,7 @@ <div popupmenu="repository-${repository.id}-popup"> %if can_review_repository: %if reviewed_by_user: - <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', id=trans.app.security.encode_id( repository.id ), changeset_revision=changeset_revision )}">Manage my review of this revision</a> + <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', id=trans.app.security.encode_id( review.id ) )}">Manage my review of this revision</a> %else: <a class="action-button" href="${h.url_for( controller='repository_review', action='create_review', id=trans.app.security.encode_id( repository.id ), changeset_revision=changeset_revision )}">Add a review to this revision</a> %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.