diff mercurial/templates/gitweb/map @ 29522:9c37df347485

hgweb: add link to parents of annotated revision in annotate view The link is embedded into a div with class="annotate-info" that only shows up upon hover of the annotate column. To avoid duplicate hover-overs (this new one and the one coming from link's title), drop "title" attribute from a element and put it in the annotate-info element.
author Denis Laxalde <denis.laxalde@logilab.fr>
date Tue, 28 Jun 2016 11:42:42 +0200
parents f694e20193f2
children 4b6afd1b445a
line wrap: on
line diff
--- a/mercurial/templates/gitweb/map	Mon Jul 11 13:53:35 2016 +0200
+++ b/mercurial/templates/gitweb/map	Tue Jun 28 11:42:42 2016 +0200
@@ -96,15 +96,21 @@
   <a href="#{lineid}"></a><span id="{lineid}">{strip(line|escape, '\r\n')}</span>'
 annotateline = '
   <tr id="{lineid}" style="font-family:monospace" class="parity{parity}{ifeq(node, originalnode, ' thisrev')}">
-    <td class="linenr" style="text-align: right;">
+    <td class="annotate linenr" style="text-align: right;">
       {if(blockhead,
-          '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}"
-              title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>',
-          '')}
+          '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">
+             {author|user}@{rev}
+           </a>')}
+      <div class="annotate-info">
+        <div>{node|short}: {desc|escape|firstline}</div>
+        <div>parents: {parents%annotateparent}</div>
+      </div>
     </td>
     <td><pre><a class="linenr" href="#{lineid}">{linenumber}</a></pre></td>
     <td><pre>{line|escape}</pre></td>
   </tr>'
+annotateparent = '
+  <a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rev}</a>'
 difflineplus = '
   <a href="#{lineid}"></a><span id="{lineid}" class="difflineplus">{strip(line|escape, '\r\n')}</span>'
 difflineminus = '