[PATCH 2 of 2 V3] hgweb, paper: add (Atom) subscribe links to the repository index
Angel Ezquerra
angel.ezquerra at gmail.com
Thu Dec 20 21:33:01 UTC 2012
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1356027732 -3600
# Node ID 7ce1d060b2b5086435561a9e945cf07081ca6537
# Parent a6a46c80a4847eea523cb8b82403571185b3488d
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 -r a6a46c80a484 -r 7ce1d060b2b5 mercurial/templates/paper/index.tmpl
--- a/mercurial/templates/paper/index.tmpl Tue Dec 04 00:41:29 2012 +0100
+++ b/mercurial/templates/paper/index.tmpl Thu Dec 20 19:22:12 2012 +0100
@@ -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 -r a6a46c80a484 -r 7ce1d060b2b5 mercurial/templates/paper/map
--- a/mercurial/templates/paper/map Tue Dec 04 00:41:29 2012 +0100
+++ b/mercurial/templates/paper/map Thu Dec 20 19:22:12 2012 +0100
@@ -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