Patchwork [2,of,2,V3] hgweb, paper: add (Atom) subscribe links to the repository index

login
register
mail settings
Submitter Angel Ezquerra
Date Dec. 20, 2012, 9:33 p.m.
Message ID <7ce1d060b2b508643556.1356039181@Angel-PC.localdomain>
Download mbox | patch
Permalink /patch/226/
State Superseded
Commit 2efc6536ea43618042494eb22ab1c27dbe5508ba
Headers show

Comments

Angel Ezquerra - Dec. 20, 2012, 9:33 p.m.
# 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.

Patch

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>&nbsp;</th>
+        <th>&nbsp;</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}">&nbsp;&darr;{type|escape}</a>'
 index = index.tmpl