diff mercurial/templates/monoblue/map @ 18046:40374059d227

hgwebdir: do not show RSS and Atom links for plain directories Up until now the templates that show RSS and Atom feeds on the "repository lists" (i.e. gitweb and monoblue) showed them for all entries, including regular folders. Clicking on those "folder RSS" links would result in an error page being shown. This patch hides those links for regular folders.
author Angel Ezquerra <angel.ezquerra@gmail.com>
date Tue, 27 Nov 2012 22:24:02 +0100
parents 5c64ce6168da
children bebb05a7e249
line wrap: on
line diff
--- a/mercurial/templates/monoblue/map	Tue Dec 04 00:37:50 2012 +0100
+++ b/mercurial/templates/monoblue/map	Tue Nov 27 22:24:02 2012 +0100
@@ -247,10 +247,11 @@
     <td class="age">{lastchange|rfc822date}</td>
     <td class="indexlinks">{archives%indexarchiveentry}</td>
     <td>
-      <div class="rss_logo">
-        <a href="{url}rss-log">RSS</a>
-        <a href="{url}atom-log">Atom</a>
-      </div>
+        {if(isdirectory, '',
+            '<div class="rss_logo">
+                <a href="{url}rss-log">RSS</a> <a href="{url}atom-log">Atom</a>
+            </div>'
+            )}
     </td>
   </tr>\n'
 indexarchiveentry = '<a href="{url}archive/{node|short}{extension}">{type|escape}</a> '