# HG changeset patch # User Thomas De Schampheleire # Date 2015-05-10 21:51:44 # Node ID 6ec5fd19808461f8ec8834120de2728b2fe06c18 # Parent 4f4d2e899a02037a96f5847e099e2e21cb7d0ed7 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. diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css --- a/kallithea/public/css/style.css +++ b/kallithea/public/css/style.css @@ -2307,6 +2307,14 @@ h3.files_location { 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; } diff --git a/kallithea/templates/compare/compare_cs.html b/kallithea/templates/compare/compare_cs.html --- a/kallithea/templates/compare/compare_cs.html +++ b/kallithea/templates/compare/compare_cs.html @@ -36,6 +36,21 @@ %endif + + <% + 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') + %> + + ${index} + + ${cs.date}
${h.gravatar(h.email_or_none(cs.author), size=14)}
${h.person(cs.author)}