[PATCH 2 of 2 V4] hgweb, paper: add (Atom) subscribe links to the repository index
Angel Ezquerra
angel.ezquerra at gmail.com
Thu Dec 20 16:33:36 CST 2012
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1356027732 -3600
# Node ID 3966b50841edb1adbe0d06a0a042e28ca7d14f80
# Parent f23502de9cfbcc24c8c6a450dad7eacad40d65f2
hgweb, paper: add (Atom) subscribe links to the repository index
This is similar to the subscribe links that already exist in other templates.
Rather than the usual RSS and Atom links a single feed icon linking to the
atom-log is shown.
diff --git a/mercurial/templates/paper/index.tmpl b/mercurial/templates/paper/index.tmpl
--- a/mercurial/templates/paper/index.tmpl
+++ b/mercurial/templates/paper/index.tmpl
@@ -18,6 +18,7 @@
<th><a href="?sort={sort_contact}">Contact</a></th>
<th><a href="?sort={sort_lastchange}">Last modified</a></th>
<th> </th>
+ <th> </th>
</tr>
{entries%indexentry}
</table>
diff --git a/mercurial/templates/paper/map b/mercurial/templates/paper/map
--- a/mercurial/templates/paper/map
+++ b/mercurial/templates/paper/map
@@ -213,6 +213,13 @@
<td>{contact|obfuscate}</td>
<td class="age">{lastchange|rfc822date}</td>
<td class="indexlinks">{archives%indexarchiveentry}</td>
+ <td>
+ {if(isdirectory, '',
+ '<a href="{url}atom-log" title="subscribe to repository atom feed">
+ <img class="atom-logo" src="{staticurl}feed-icon-14x14.png" alt="subscribe to repository atom feed">
+ </a>'
+ )}
+ </td>
</tr>\n'
indexarchiveentry = '<a href="{url}archive/{node|short}{extension|urlescape}"> ↓{type|escape}</a>'
index = index.tmpl
More information about the Mercurial-devel
mailing list