Mercurial > kallithea
changeset 4891:a7bbf4e18ec3
pullrequest overview: display in table to improve readability
Instead of showing all info in the pullrequest overview right after each
other on the same line, use a table to improve readability.
Additionally, add following information:
- author
- destination repository
The latter is always the same when viewing the list of pullrequests of a
certain repository, but this change already anticipates re-use of this
block in the 'my pullrequests' overview.
The table is still static, non-sortable, since YUI is deprecated and no new
alternative has been decided upon yet. This improvement can be done later.
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Tue, 03 Mar 2015 21:33:04 +0100 |
parents | 9ff4b82f56c9 |
children | 42f3115cc2ac |
files | kallithea/public/css/style.css kallithea/templates/pullrequests/pullrequest_data.html |
diffstat | 2 files changed, 53 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/public/css/style.css Thu Feb 26 22:51:27 2015 +0100 +++ b/kallithea/public/css/style.css Tue Mar 03 21:33:04 2015 +0100 @@ -4670,6 +4670,10 @@ div.pr-closed { background-color: #eee; } +tr.pr-closed td { + background-color: #eee !important; + color: #555 !important; +} span.pr-closed-tag { margin-bottom: 1px;
--- a/kallithea/templates/pullrequests/pullrequest_data.html Thu Feb 26 22:51:27 2015 +0100 +++ b/kallithea/templates/pullrequests/pullrequest_data.html Tue Mar 03 21:33:04 2015 +0100 @@ -1,28 +1,56 @@ ## -*- coding: utf-8 -*- +<div class="table"> + <table> + <thead> + <tr> + <th></th> + <th class="left">${_('Title')}</th> + <th class="left">${_('Author')}</th> + <th class="left">${_('Date')}</th> + <th class="left">${_('From')}</th> + <th class="left">${_('To')}</th> + </tr> + </thead> % for pr in c.pullrequests_pager: - <div class="pr ${'pr-closed' if pr.is_closed() else ''}"> - <div> - %if pr.last_review_status: - <i class="icon-circle changeset-status-${pr.last_review_status}" title="${_("Someone voted: %s") % pr.last_review_status}"></i> - %else: - <i class="icon-circle changeset-status-not_reviewed" title="${_("Nobody voted")}"></i> - %endif - <a href="${pr.url()}"> - ${pr.title or _("(no title)")} - %if pr.is_closed(): - <span class="pr-closed-tag">${_('Closed')}</span> - %endif - </a> - ${_('opened on %s from') % (h.fmt_date(pr.created_on))} - <% org_ref_name=pr.org_ref.rsplit(':', 2)[-2] %> - <a href="${h.url('summary_home', repo_name=pr.org_repo.repo_name, anchor=org_ref_name)}"> - ${pr.org_repo.repo_name}#${org_ref_name} - </a> - </div> - </div> + <tr class="${'pr-closed' if pr.is_closed() else ''}"> + <td> + %if pr.last_review_status: + <i class="icon-circle changeset-status-${pr.last_review_status}" title="${_("Someone voted: %s") % pr.last_review_status}"></i> + %else: + <i class="icon-circle changeset-status-not_reviewed" title="${_("Nobody voted")}"></i> + %endif + </td> + <td> + <a href="${pr.url()}"> + ${pr.title or _("(no title)")} + %if pr.is_closed(): + <span class="pr-closed-tag">${_('Closed')}</span> + %endif + </a> + </td> + <td> + ${pr.author.username_and_name} + </td> + <td> + ${h.fmt_date(pr.created_on)} + </td> + <td> + <% org_ref_name=pr.org_ref.rsplit(':', 2)[-2] %> + <a href="${h.url('summary_home', repo_name=pr.org_repo.repo_name, anchor=org_ref_name)}"> + ${pr.org_repo.repo_name}#${org_ref_name} + </a> + </td> + <td> + <% other_ref_name=pr.other_ref.rsplit(':', 2)[-2] %> + <a href="${h.url('summary_home', repo_name=pr.other_repo.repo_name, anchor=other_ref_name)}"> + ${pr.other_repo.repo_name}#${other_ref_name} + </a> + </td> + </tr> % endfor - + </table> +</div> <div class="notification-paginator"> <div class="pagination-wh pagination-left">