1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/6d72b2db32c0/ Changeset: 6d72b2db32c0 User: greg Date: 2013-05-14 21:58:09 Summary: Ehancements for the tool shed repository View changeset page: display the commit message, display both the ctx rev and the changeset hash in the title bar, and add Previous changeset and Next changeset buttons to allow for easier scrolling through the repository changelog. Affected #: 2 files diff -r c1f961549cca546214ff4430dd6a01c42cfeaa63 -r 6d72b2db32c0d84032ee40f2cd86b7b09485c441 lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -2681,17 +2681,39 @@ id=id, message=message, status=status ) ) - ctx_parent = ctx.parents()[0] + ctx_parent = ctx.parents()[ 0 ] + if ctx.children(): + ctx_child = ctx.children()[ 0 ] + else: + ctx_child = None modified, added, removed, deleted, unknown, ignored, clean = repo.status( node1=ctx_parent.node(), node2=ctx.node() ) anchors = modified + added + removed + deleted + unknown + ignored + clean diffs = [] for diff in patch.diff( repo, node1=ctx_parent.node(), node2=ctx.node() ): diffs.append( suc.to_safe_string( diff, to_html=True ) ) metadata = self.get_metadata( trans, id, ctx_str ) + # For rendering the prev button. + if ctx_parent: + ctx_parent_rev = ctx_parent.rev() + if ctx_parent_rev < 0: + prev = None + else: + prev = "%s:%s" % ( ctx_parent_rev, ctx_parent ) + else: + prev = None + if ctx_child: + ctx_child_rev = ctx_child.rev() + next = "%s:%s" % ( ctx_child_rev, ctx_child ) + else: + next = None return trans.fill_template( '/webapps/tool_shed/repository/view_changeset.mako', repository=repository, metadata=metadata, + prev=prev, + next=next, ctx=ctx, + ctx_parent=ctx_parent, + ctx_child=ctx_child, anchors=anchors, modified=modified, added=added, diff -r c1f961549cca546214ff4430dd6a01c42cfeaa63 -r 6d72b2db32c0d84032ee40f2cd86b7b09485c441 templates/webapps/tool_shed/repository/view_changeset.mako --- a/templates/webapps/tool_shed/repository/view_changeset.mako +++ b/templates/webapps/tool_shed/repository/view_changeset.mako @@ -50,13 +50,33 @@ <div class="toolForm"><% if can_download: - title_str = 'Changeset %s' % ctx + title_str = 'Changeset %s:%s' % ( ctx.rev(), ctx ) else: - title_str = '%s changeset %s' % ( repository.name, ctx ) + title_str = '%s changeset %s:%s' % ( repository.name, ctx.rev(), ctx ) %> - <div class="toolFormTitle">${title_str | h}</div> + <div class="toolFormTitle"> + ${title_str | h} + </div><div class="toolFormBody"><table class="grid"> + %if prev or next: + <tr> + <td> + %if prev: + <a class="action-button" href="${h.url_for( controller='repository', action='view_changeset', id=trans.security.encode_id( repository.id ), ctx_str=ctx_parent )}">Previous changeset ${prev | h}</a> + %endif + %if next: + <a class="action-button" href="${h.url_for( controller='repository', action='view_changeset', id=trans.security.encode_id( repository.id ), ctx_str=ctx_child )}">Next changeset ${next | h}</a> + %endif + </td> + </tr> + %endif + <tr> + <td> + <b>Commit message:</b> + <br/>${ctx.description() | h}<br/> + </td> + </tr> %if modified: <tr><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.