[PATCH STABLE] monoblue: show relative age of bookmarks

Anton Shestakov av6 at dwimlabs.net
Fri Jul 24 02:19:59 CDT 2015


# HG changeset patch
# User Anton Shestakov <av6 at dwimlabs.net>
# Date 1436764397 -28800
#      Mon Jul 13 13:13:17 2015 +0800
# Branch stable
# Node ID 7f78c41324cf6efeef7a4a86178d72e96a804f3c
# Parent  a74e9806d17d777595f02bef912da25b876cb56f
monoblue: show relative age of bookmarks

In b24e5a708fad, age calculation was made dynamic (i.e. in javascript), but for
some reason bookmarkentry template in monoblue/map got a wrong class. It
resulted in /summary and /bookmarks pages always showing exact dates for
bookmarks, no age calculation was performed. Let's fix this by using "age"
class that is already used in branchentry and tagentry templates in the same
map file.

As usual, the exact date for such elements is still available in title
attribute, so it shows in a tooltip on hover.

diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map
--- a/mercurial/templates/monoblue/map
+++ b/mercurial/templates/monoblue/map
@@ -181,7 +181,7 @@ tagentry = '
 bookmarks = bookmarks.tmpl
 bookmarkentry = '
   <tr class="parity{parity}">
-    <td class="nowrap date">{date|rfc822date}</td>
+    <td class="nowrap age">{date|rfc822date}</td>
     <td><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{bookmark|escape}</a></td>
     <td class="nowrap">
       <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |


More information about the Mercurial-devel mailing list