changeset 4611:36de86c1087f

files_browser: augment file_class def with submodule case
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 31 Oct 2014 14:03:49 -0700
parents 29325637d1d2
children 48d9f65d3b77
files kallithea/templates/files/files_browser.html
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/templates/files/files_browser.html	Tue Sep 02 15:00:34 2014 +0200
+++ b/kallithea/templates/files/files_browser.html	Fri Oct 31 14:03:49 2014 -0700
@@ -1,6 +1,8 @@
 <%def name="file_class(node)">
     %if node.is_file():
         <%return "browser-file" %>
+    %elif node.is_submodule():
+        <%return "submodule-dir"%>
     %else:
         <%return "browser-dir"%>
     %endif
@@ -65,7 +67,7 @@
                 <tr class="parity${cnt%2}">
                      <td>
                         %if node.is_submodule():
-                           ${h.link_to(node.name,node.url or '#',class_="submodule-dir ypjax-link")}
+                           ${h.link_to(node.name,node.url or '#',class_=file_class(node)+" ypjax-link")}
                         %else:
                           ${h.link_to(node.name, h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=h.safe_unicode(node.path)),class_=file_class(node)+" ypjax-link")}
                         %endif: