[PATCH 1 of 2] hgweb, monoblue: make RSS and Atom feed buttons link to the current page's feed

Angel Ezquerra angel.ezquerra at gmail.com
Thu Dec 20 17:07:23 CST 2012


# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1354577127 -3600
# Node ID 245fc832b8b2b6405c54e915797114a2d3340e28
# Parent  3966b50841edb1adbe0d06a0a042e28ca7d14f80
hgweb, monoblue: make RSS and Atom feed buttons link to the current page's feed

This patch removes the RSS and Atom feed button from the footer template of the
monoblue theme. Those buttons are moved to each of the theme page templates,
where they have been made to point to the corresponding page's feed.

For those pages that do not have their own feed page, the button has been
removed (e.g. help, helptopics, notfound, search). This has been done because
the user might get the wrong impression and believe that it could subscribe to
those pages (e.g. a file pages, the result of a search, etc), which is not
currently possible and in some cases does not even make sense (e.g. help, a
changeset page, not found page, error page).

Note that the feed buttons on the summary, shortlog, changelog, graph and
manifest pages all point to the main "log" feed.

diff --git a/mercurial/templates/monoblue/bookmarks.tmpl b/mercurial/templates/monoblue/bookmarks.tmpl
--- a/mercurial/templates/monoblue/bookmarks.tmpl
+++ b/mercurial/templates/monoblue/bookmarks.tmpl
@@ -35,4 +35,11 @@
 {entries%bookmarkentry}
     </table>
 
+    <div class="page-footer">
+        <ul class="rss-logo">
+            <li><a href="{url}rss-bookmarks">RSS</a></li>
+            <li><a href="{url}atom-bookmarks">Atom</a></li>
+        </ul>
+    </div>
+
 {footer}
diff --git a/mercurial/templates/monoblue/branches.tmpl b/mercurial/templates/monoblue/branches.tmpl
--- a/mercurial/templates/monoblue/branches.tmpl
+++ b/mercurial/templates/monoblue/branches.tmpl
@@ -35,4 +35,11 @@
 {entries%branchentry}
     </table>
 
+    <div class="page-footer">
+        <ul class="rss-logo">
+            <li><a href="{url}rss-branches">RSS</a></li>
+            <li><a href="{url}atom-branches">Atom</a></li>
+        </ul>
+    </div>
+
 {footer}
diff --git a/mercurial/templates/monoblue/changelog.tmpl b/mercurial/templates/monoblue/changelog.tmpl
--- a/mercurial/templates/monoblue/changelog.tmpl
+++ b/mercurial/templates/monoblue/changelog.tmpl
@@ -39,4 +39,11 @@
 {changenav%nav}
     </div>
 
+    <div class="page-footer">
+        <ul class="rss-logo">
+            <li><a href="{url}rss-log">RSS</a></li>
+            <li><a href="{url}atom-log">Atom</a></li>
+        </ul>
+    </div>
+
 {footer}
diff --git a/mercurial/templates/monoblue/filelog.tmpl b/mercurial/templates/monoblue/filelog.tmpl
--- a/mercurial/templates/monoblue/filelog.tmpl
+++ b/mercurial/templates/monoblue/filelog.tmpl
@@ -49,4 +49,11 @@
     {nav%filenav}
     </div>
 
+    <div class="page-footer">
+        <ul class="rss-logo">
+            <li><a href="{url}rss-log/{node|short}/{file|urlescape}">RSS</a></li>
+            <li><a href="{url}atom-log/{node|short}/{file|urlescape}">Atom</a></li>
+        </ul>
+    </div>
+
 {footer}
diff --git a/mercurial/templates/monoblue/footer.tmpl b/mercurial/templates/monoblue/footer.tmpl
--- a/mercurial/templates/monoblue/footer.tmpl
+++ b/mercurial/templates/monoblue/footer.tmpl
@@ -1,10 +1,6 @@
     <script type="text/javascript">process_dates()</script>
     <div class="page-footer">
         <p>Mercurial Repository: {repo|escape}</p>
-        <ul class="rss-logo">
-            <li><a href="{url}rss-log">RSS</a></li>
-            <li><a href="{url}atom-log">Atom</a></li>
-        </ul>
         {motd}
     </div>
 
diff --git a/mercurial/templates/monoblue/graph.tmpl b/mercurial/templates/monoblue/graph.tmpl
--- a/mercurial/templates/monoblue/graph.tmpl
+++ b/mercurial/templates/monoblue/graph.tmpl
@@ -104,4 +104,11 @@
         | {changenav%navgraph}
     </div>
 
+    <div class="page-footer">
+        <ul class="rss-logo">
+            <li><a href="{url}rss-log">RSS</a></li>
+            <li><a href="{url}atom-log">Atom</a></li>
+        </ul>
+    </div>
+
 {footer}
diff --git a/mercurial/templates/monoblue/manifest.tmpl b/mercurial/templates/monoblue/manifest.tmpl
--- a/mercurial/templates/monoblue/manifest.tmpl
+++ b/mercurial/templates/monoblue/manifest.tmpl
@@ -50,4 +50,11 @@
         {fentries%fileentry}
     </table>
 
+    <div class="page-footer">
+        <ul class="rss-logo">
+            <li><a href="{url}rss-log">RSS</a></li>
+            <li><a href="{url}atom-log">Atom</a></li>
+        </ul>
+    </div>
+
 {footer}
diff --git a/mercurial/templates/monoblue/shortlog.tmpl b/mercurial/templates/monoblue/shortlog.tmpl
--- a/mercurial/templates/monoblue/shortlog.tmpl
+++ b/mercurial/templates/monoblue/shortlog.tmpl
@@ -41,4 +41,11 @@
     {changenav%navshort}
     </div>
 
+    <div class="page-footer">
+        <ul class="rss-logo">
+            <li><a href="{url}rss-log">RSS</a></li>
+            <li><a href="{url}atom-log">Atom</a></li>
+        </ul>
+    </div>
+
 {footer}
diff --git a/mercurial/templates/monoblue/summary.tmpl b/mercurial/templates/monoblue/summary.tmpl
--- a/mercurial/templates/monoblue/summary.tmpl
+++ b/mercurial/templates/monoblue/summary.tmpl
@@ -73,4 +73,11 @@
           <td colspan="4"><a class="list"  href="#">...</a></td>
         </tr>
     </table>
+
+    <div class="page-footer">
+        <ul class="rss-logo">
+            <li><a href="{url}rss-log">RSS</a></li>
+            <li><a href="{url}atom-log">Atom</a></li>
+        </ul>
+    </div>
 {footer}
diff --git a/mercurial/templates/monoblue/tags.tmpl b/mercurial/templates/monoblue/tags.tmpl
--- a/mercurial/templates/monoblue/tags.tmpl
+++ b/mercurial/templates/monoblue/tags.tmpl
@@ -35,4 +35,10 @@
 {entries%tagentry}
     </table>
 
+    <div class="page-footer">
+        <ul class="rss-logo">
+            <li><a href="{url}rss-tags">RSS</a></li>
+            <li><a href="{url}atom-tags">Atom</a></li>
+        </ul>
+    </div>
 {footer}


More information about the Mercurial-devel mailing list