Mercurial > kallithea
changeset 5069:3105842da68f
changelog: use status label directly from c.statuses.get() output
In the changelog template, c.statuses.get() returns a list:
[ str(status), status_lbl, pr_id, pr_repo ]
So to obtain the status label, one can directly use the second element,
rather than using a helper function on the first.
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Wed, 22 Apr 2015 22:09:15 +0200 |
parents | 140f2811fc6f |
children | 6c631f531a06 |
files | kallithea/templates/changelog/changelog.html |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/templates/changelog/changelog.html Thu Apr 23 21:44:19 2015 +0200 +++ b/kallithea/templates/changelog/changelog.html Wed Apr 22 22:09:15 2015 +0200 @@ -89,11 +89,11 @@ %if c.statuses.get(cs.raw_id): <div class="changeset-status-ico"> %if c.statuses.get(cs.raw_id)[2]: - <a class="tooltip" title="${_('Changeset status: %s\nClick to open associated pull request #%s') % (h.changeset_status_lbl(c.statuses.get(cs.raw_id)[0]), c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"> + <a class="tooltip" title="${_('Changeset status: %s\nClick to open associated pull request #%s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"> <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i> </a> %else: - <a class="tooltip" title="${_('Changeset status: %s') % h.changeset_status_lbl(c.statuses.get(cs.raw_id)[0])}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> + <a class="tooltip" title="${_('Changeset status: %s') % c.statuses.get(cs.raw_id)[1]}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i> </a> %endif