Changeset - a7bbf4e18ec3
[Not reviewed]
default
0 2 0
Thomas De Schampheleire - 11 years ago 2015-03-03 21:33:04
thomas.de.schampheleire@gmail.com
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.
2 files changed with 38 insertions and 6 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -4670,6 +4670,10 @@ div.pr-desc {
 
div.pr-closed {
 
    background-color: #eee;
 
}
 
tr.pr-closed td {
 
    background-color: #eee !important;
 
    color: #555 !important;
 
}
 

	
 
span.pr-closed-tag {
 
    margin-bottom: 1px;
kallithea/templates/pullrequests/pullrequest_data.html
Show inline comments
 
## -*- 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>
 
    <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>
 
            ${_('opened on %s from') % (h.fmt_date(pr.created_on))}
 
      </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>
 
    </div>
 
      </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>
 
% endfor
 

	
 

	
 
<div class="notification-paginator">
 
  <div class="pagination-wh pagination-left">
0 comments (0 inline, 0 general)