[PATCH 5 of 5] spartan: skip empty table cells in annotate view, use rowspan on block heads

Anton Shestakov av6 at dwimlabs.net
Thu Jul 14 03:31:30 EDT 2016


# HG changeset patch
# User Anton Shestakov <av6 at dwimlabs.net>
# Date 1468478472 -28800
#      Thu Jul 14 14:41:12 2016 +0800
# Node ID 8a0f3344abaec09b4d4a742718a358571f8e3126
# Parent  c48435e7d668adc05c4f2fd3ae4d8b8575639c54
spartan: skip empty table cells in annotate view, use rowspan on block heads

diff --git a/mercurial/templates/spartan/map b/mercurial/templates/spartan/map
--- a/mercurial/templates/spartan/map
+++ b/mercurial/templates/spartan/map
@@ -55,11 +55,11 @@ filelogentry = filelogentry.tmpl
 # all table rows have equal height.
 annotateline = '
   <tr class="parity{parity}{ifeq(node, originalnode, ' thisrev')}">
-    <td class="annotate">
-      {if(blockhead,
-          '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">
-             {rev}
-           </a>')}
+    {if(blockhead, '
+    <td class="annotate parity{blockparity}" rowspan="{rowspan}">
+      <a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">
+        {rev}
+      </a>
       <div class="annotate-info">
         <div>
           <a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">
@@ -72,6 +72,7 @@ annotateline = '
         <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
       </div>
     </td>
+    ')}
     <td>
       <a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>
     </td>


More information about the Mercurial-devel mailing list