1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/06b3b644188a/ changeset: 06b3b644188a user: greg date: 2012-10-23 16:43:57 summary: Fix for RepositoriesWithReviewsGrid, specifically the WithReviewsRevisionColumn. affected #: 4 files diff -r f64b134738a929a05481d30c3135b7663f7f806d -r 06b3b644188a29b78e8400298c67472b5b6bd790 lib/galaxy/webapps/community/controllers/repository.py --- a/lib/galaxy/webapps/community/controllers/repository.py +++ b/lib/galaxy/webapps/community/controllers/repository.py @@ -118,20 +118,6 @@ elif len( select_field.options ) == 1: return select_field.options[ 0 ][ 0 ] return '' - class WithReviewsRevisionColumn( grids.GridColumn ): - def __init__( self, col_name ): - grids.GridColumn.__init__( self, col_name ) - def get_value( self, trans, grid, repository ): - # Restrict to revisions that have been reviewed. - repository_metadata_revisions = get_repository_metadata_revisions_for_review( repository, reviewed=True ) - if repository_metadata_revisions: - rval = '' - for repository_metadata in repository_metadata_revisions: - rev, label, changeset_revision = get_rev_label_changeset_revision_from_repository_metadata( repository_metadata, repository=repository ) - rval += '<a href="manage_repository_reviews_of_revision' - rval += '?id=%s&changeset_revision=%s">%s</a><br/>' % ( trans.security.encode_id( repository.id ), changeset_revision, label ) - return rval - return '' class WithoutReviewsRevisionColumn( grids.GridColumn ): def __init__( self, col_name ): grids.GridColumn.__init__( self, col_name ) diff -r f64b134738a929a05481d30c3135b7663f7f806d -r 06b3b644188a29b78e8400298c67472b5b6bd790 lib/galaxy/webapps/community/controllers/repository_review.py --- a/lib/galaxy/webapps/community/controllers/repository_review.py +++ b/lib/galaxy/webapps/community/controllers/repository_review.py @@ -50,6 +50,21 @@ class RepositoriesWithReviewsGrid( RepositoryGrid ): # This grid filters out repositories that have been marked as deprecated. + class WithReviewsRevisionColumn( grids.GridColumn ): + def __init__( self, col_name ): + grids.GridColumn.__init__( self, col_name ) + def get_value( self, trans, grid, repository ): + # Restrict to revisions that have been reviewed. + if repository.reviews: + rval = '' + repo = hg.repository( get_configured_ui(), repository.repo_path ) + for review in repository.reviews: + changeset_revision = review.changeset_revision + rev, label = get_rev_label_from_changeset_revision( repo, changeset_revision ) + rval += '<a href="manage_repository_reviews_of_revision' + rval += '?id=%s&changeset_revision=%s">%s</a><br/>' % ( trans.security.encode_id( repository.id ), changeset_revision, label ) + return rval + return '' class ReviewersColumn( grids.TextColumn ): def get_value( self, trans, grid, repository ): rval = '' @@ -68,7 +83,7 @@ key="name", link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ), attach_popup=True ), - RepositoryGrid.WithReviewsRevisionColumn( "Reviewed revisions" ), + WithReviewsRevisionColumn( "Reviewed revisions" ), RepositoryGrid.WithoutReviewsRevisionColumn( "Revisions for review" ), RepositoryGrid.UserColumn( "Owner", attach_popup=False ), ReviewersColumn( "Reviewers", attach_popup=False ) @@ -718,6 +733,10 @@ # The value of the received id is the encoded repository id. if 'operation' in kwd: operation = kwd['operation'].lower() + if operation == "inspect repository revisions": + return trans.response.send_redirect( web.url_for( controller='repository_review', + action='manage_repository_reviews', + **kwd ) ) if operation == "view_or_manage_repository": return trans.response.send_redirect( web.url_for( controller='repository_review', action='view_or_manage_repository', diff -r f64b134738a929a05481d30c3135b7663f7f806d -r 06b3b644188a29b78e8400298c67472b5b6bd790 templates/webapps/community/repository_review/browse_review.mako --- a/templates/webapps/community/repository_review/browse_review.mako +++ b/templates/webapps/community/repository_review/browse_review.mako @@ -84,7 +84,7 @@ <label>Private:</label> ${private_check_box.get_html( disabled=True )} <div class="toolParamHelp" style="clear: both;"> - A private review can be accessed only by the owner of the repository and the IUC. + A private review can be accessed only by the owner of the repository and authorized repository reviewers. </div><div style="clear: both"></div></td> diff -r f64b134738a929a05481d30c3135b7663f7f806d -r 06b3b644188a29b78e8400298c67472b5b6bd790 templates/webapps/community/repository_review/edit_review.mako --- a/templates/webapps/community/repository_review/edit_review.mako +++ b/templates/webapps/community/repository_review/edit_review.mako @@ -119,7 +119,7 @@ <label>Mark private:</label> ${private_check_box.get_html()} <div class="toolParamHelp" style="clear: both;"> - A private review can be accessed only by the owner of the repository and the IUC. + A private review can be accessed only by the owner of the repository and authorized repository reviewers. </div><div style="clear: both"></div></td> 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.