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

login
register
mail settings
Submitter Angel Ezquerra
Date Dec. 20, 2012, 6:25 p.m.
Message ID <c824ca9bcf8fea01b7ae.1356027907@Lucia-PC>
Download mbox | patch
Permalink /patch/222/
State Superseded
Commit 2efc6536ea43618042494eb22ab1c27dbe5508ba
Headers show

Comments

Angel Ezquerra - Dec. 20, 2012, 6:25 p.m.
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1356027732 -3600
# Node ID c824ca9bcf8fea01b7ae6b2af066dd36c7ea4a5c
# Parent  5a516a9dd2b5367c1537180ec207bc0688235c11
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 --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>&nbsp;</th>
+        <th>&nbsp;</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}">&nbsp;&darr;{type|escape}</a>'
 index = index.tmpl