commit/galaxy-central: greg: Pass ids instead of objects when managing reviews from certain tool shed locations.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/4cd4f8bef29d/ changeset: 4cd4f8bef29d user: greg date: 2012-10-18 22:51:36 summary: Pass ids instead of objects when managing reviews from certain tool shed locations. affected #: 4 files diff -r 69744b8777c6a37b1b440cfb352789e116c34e6b -r 4cd4f8bef29d17a7bca74e235031060e2289ebdc lib/galaxy/webapps/community/controllers/repository.py --- a/lib/galaxy/webapps/community/controllers/repository.py +++ b/lib/galaxy/webapps/community/controllers/repository.py @@ -1684,8 +1684,9 @@ id, changeset_revision, trans.security.encode_id( trans.user.id ) ) + review_id = trans.security.encode_id( review.id ) else: - review = None + review_id = None return trans.fill_template( '/webapps/community/repository/manage_repository.mako', cntrller=cntrller, repo_name=repo_name, @@ -1698,7 +1699,7 @@ repository_metadata_id=repository_metadata_id, changeset_revision=changeset_revision, reviewed_by_user=reviewed_by_user, - review=review, + review_id=review_id, changeset_revision_select_field=changeset_revision_select_field, revision_label=revision_label, selected_categories=selected_categories, @@ -2340,11 +2341,12 @@ 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, + id, changeset_revision, trans.security.encode_id( trans.user.id ) ) + review_id = trans.security.encode_id( review.id ) else: - review = None + review_id = None return trans.fill_template( '/webapps/community/repository/view_repository.mako', cntrller=cntrller, repo=repo, @@ -2357,7 +2359,7 @@ alerts_check_box=alerts_check_box, changeset_revision=changeset_revision, reviewed_by_user=reviewed_by_user, - review=review, + review_id=review_id, changeset_revision_select_field=changeset_revision_select_field, revision_label=revision_label, is_malicious=is_malicious, @@ -2421,11 +2423,12 @@ 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, + id, changeset_revision, trans.security.encode_id( trans.user.id ) ) + review_id = trans.security.encode_id( review.id ) else: - review = None + review_id = None return trans.fill_template( "/webapps/community/repository/view_tool_metadata.mako", repository=repository, metadata=metadata, @@ -2437,7 +2440,7 @@ changeset_revision_select_field=changeset_revision_select_field, is_malicious=is_malicious, reviewed_by_user=reviewed_by_user, - review=review, + review_id=review_id, message=message, status=status ) diff -r 69744b8777c6a37b1b440cfb352789e116c34e6b -r 4cd4f8bef29d17a7bca74e235031060e2289ebdc 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( review.id ) )}">Manage my review of this revision</a> + <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', 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( review.id ) )}">Manage my review of this revision</a> + <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', 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 69744b8777c6a37b1b440cfb352789e116c34e6b -r 4cd4f8bef29d17a7bca74e235031060e2289ebdc 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( review.id ) )}">Manage my review of this revision</a> + <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', 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( review.id ) )}">Manage my review of this revision</a> + <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', 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 69744b8777c6a37b1b440cfb352789e116c34e6b -r 4cd4f8bef29d17a7bca74e235031060e2289ebdc 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( review.id ) )}">Manage my review of this revision</a> + <a class="action-button" href="${h.url_for( controller='repository_review', action='edit_review', 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.
participants (1)
-
Bitbucket