Changeset - 6ec5fd198084
[Not reviewed]
default
0 2 0
Thomas De Schampheleire - 11 years ago 2015-05-10 21:51:44
thomas.de.schampheleire@gmail.com
pullrequest/compare: add logical changeset index to clarify the order

Is the parent-most changeset in a changeset the one at the top or at the
bottom? When the revision numbers are not shown, it is not obvious to
determine this.

This commit adds a logical changeset index to the commit list in a
pullrequest or compare view. The index starts at 1 (the parent-most commit)
and has no relation whatsoever with the commit hash or revision number.
2 files changed with 23 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -2304,12 +2304,20 @@ h3.files_location {
 

	
 
.changeset_id {
 
    color: #666666;
 
    margin-right: -3px;
 
}
 

	
 
.changeset-logical-index {
 
    color: #666666;
 
    font-style: italic;
 
    font-size: 85%;
 
    padding-right: 0.5em;
 
    text-align: right;
 
}
 

	
 
.changeset_hash {
 
    color: #000000;
 
}
 

	
 
#changeset_content {
 
    border-left: 1px solid #CCC;
kallithea/templates/compare/compare_cs.html
Show inline comments
 
@@ -33,12 +33,27 @@
 
                          <i class="icon-comment"></i>
 
                      </a>
 
                  </div>
 
              </div>
 
          %endif
 
        </td>
 
        <td class="changeset-logical-index">
 
          <%
 
              num_cs = len(c.cs_ranges)
 
              index = num_cs - cnt
 
              if index == 1:
 
                  title = _('First (oldest) changeset in this list')
 
              elif index == num_cs:
 
                  title = _('Last (most recent) changeset in this list')
 
              else:
 
                  title = _('Position in this list of changesets')
 
          %>
 
          <span class="tooltip" title="${title}">
 
            ${index}
 
          </span>
 
        </td>
 
        <td style="width: 140px"><span class="tooltip" title="${h.tooltip(h.age(cs.date))}">${cs.date}</span></td>
 
        <td><div class="gravatar" commit_id="${cs.raw_id}">${h.gravatar(h.email_or_none(cs.author), size=14)}</div></td>
 
        <td><div class="author">${h.person(cs.author)}</div></td>
 
        <td>${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}</td>
 
        <td>
 
        %if cs.branch:
0 comments (0 inline, 0 general)