def get_value( self, trans, grid, review ):
     encoded_review_id = trans.security.encode_id( review.id )
     rval = '<a class="action-button" href="'
     if review.user == trans.user:
         rval += 'edit_review'
     else:
         rval +='browse_review'
     rval += '?id=%s">%s</a>' % ( encoded_review_id, suc.get_revision_label( trans, review.repository, review.changeset_revision ) )
     return rval
示例#2
0
 def get_value(self, trans, grid, review):
     encoded_review_id = trans.security.encode_id(review.id)
     rval = '<a class="action-button" href="'
     if review.user == trans.user:
         rval += 'edit_review'
     else:
         rval += 'browse_review'
     rval += '?id=%s">%s</a>' % (encoded_review_id,
                                 suc.get_revision_label(
                                     trans, review.repository,
                                     review.changeset_revision))
     return rval
示例#3
0
 def get_value( self, trans, grid, repository_metadata ):
     repository = repository_metadata.repository
     repo = hg.repository( suc.get_configured_ui(), repository.repo_path( trans.app ) )
     ctx = suc.get_changectx_for_changeset( repo, repository_metadata.changeset_revision )
     return suc.get_revision_label( trans, repository, repository_metadata.changeset_revision, include_date=True )