Mercurial > hg
changeset 18201:2efc6536ea43
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.
author | Angel Ezquerra <angel.ezquerra@gmail.com> |
---|---|
date | Thu, 20 Dec 2012 19:22:12 +0100 |
parents | b31266671918 |
children | 2c1276825e93 |
files | mercurial/templates/paper/index.tmpl mercurial/templates/paper/map tests/test-hgwebdir.t |
diffstat | 3 files changed, 186 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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>
--- 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
--- a/tests/test-hgwebdir.t Tue Dec 04 00:41:29 2012 +0100 +++ b/tests/test-hgwebdir.t Thu Dec 20 19:22:12 2012 +0100 @@ -207,6 +207,7 @@ <th><a href="?sort=contact">Contact</a></th> <th><a href="?sort=lastchange">Last modified</a></th> <th> </th> + <th> </th> </tr> <tr class="parity0"> @@ -215,6 +216,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/t/a/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -223,6 +229,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/b/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -231,6 +242,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/coll/a/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -239,6 +255,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/coll/a/.hg/patches/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -247,6 +268,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/coll/b/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -255,6 +281,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/coll/c/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -263,6 +294,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/coll/notrepo/e/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -271,6 +307,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/coll/notrepo/f/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -279,6 +320,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/rcoll/a/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -287,6 +333,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/rcoll/a/.hg/patches/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -295,6 +346,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/rcoll/b/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -303,6 +359,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/rcoll/b/d/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -311,6 +372,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/rcoll/c/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -319,6 +385,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/rcoll/notrepo/e/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -327,6 +398,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/rcoll/notrepo/e/e2/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -335,6 +411,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/rcoll/notrepo/f/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -343,6 +424,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/rcoll/notrepo/f/f2/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -351,6 +437,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/star/webdir/a/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -359,6 +450,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/star/webdir/a/.hg/patches/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -367,6 +463,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/star/webdir/b/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -375,6 +476,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/star/webdir/c/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -383,6 +489,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/star/webdir/notrepo/e/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -391,6 +502,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/star/webdir/notrepo/f/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -399,6 +515,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/starstar/webdir/a/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -407,6 +528,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/starstar/webdir/a/.hg/patches/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -415,6 +541,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/starstar/webdir/b/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -423,6 +554,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/starstar/webdir/b/d/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -431,6 +567,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/starstar/webdir/c/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -439,6 +580,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/starstar/webdir/notrepo/e/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -447,6 +593,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/starstar/webdir/notrepo/e/e2/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -455,6 +606,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/starstar/webdir/notrepo/f/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -463,6 +619,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/starstar/webdir/notrepo/f/f2/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity0"> @@ -471,6 +632,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/astar/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> <tr class="parity1"> @@ -479,6 +645,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/astar/.hg/patches/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> </table> @@ -532,6 +703,7 @@ <th><a href="?sort=contact">Contact</a></th> <th><a href="?sort=lastchange">Last modified</a></th> <th> </th> + <th> </th> </tr> <tr class="parity0"> @@ -540,6 +712,11 @@ <td>Foo Bar <foo.bar@example.com></td> <td class="age">*</td> (glob) <td class="indexlinks"></td> + <td> + <a href="/t/a/atom-log" title="subscribe to repository atom feed"> + <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> + </a> + </td> </tr> </table> @@ -899,6 +1076,7 @@ <th><a href="?sort=contact">Contact</a></th> <th><a href="?sort=lastchange">Last modified</a></th> <th> </th> + <th> </th> </tr> </table>