changeset 7199:0bec9f92745a

git: let links to git submodules be real links that can open in new tabs - not just in-page navigation Submodules should not be loaded with 'ypjax-link' because they point to a place outside the repository or maybe even outside the kallithea instance.
author domruf <dominikruf@gmail.com>
date Mon, 20 Nov 2017 23:18:38 +0100
parents 1c56ba483b84
children eb1182919890
files kallithea/templates/files/files_browser.html kallithea/tests/other/test_vcs_operations.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/templates/files/files_browser.html	Sun Mar 11 17:35:11 2018 +0100
+++ b/kallithea/templates/files/files_browser.html	Mon Nov 20 23:18:38 2017 +0100
@@ -72,7 +72,7 @@
             %for cnt,node in enumerate(c.file):
                 <tr class="parity${cnt%2}">
                      <td>
-                         ${h.link_to(file_name(node),file_url(node,c),class_=file_class(node)+" ypjax-link")}
+                         ${h.link_to(file_name(node),file_url(node,c),class_=file_class(node)+(" ypjax-link" if not node.is_submodule() else ""))}
                      </td>
                      <td>
                      %if node.is_file():
--- a/kallithea/tests/other/test_vcs_operations.py	Sun Mar 11 17:35:11 2018 +0100
+++ b/kallithea/tests/other/test_vcs_operations.py	Mon Nov 20 23:18:38 2017 +0100
@@ -689,7 +689,7 @@
                                     revision='tip',
                                     f_path='/'))
         # BUG: the link to testsubmodule doesn't work - it should probably point at the submodule URL
-        response.mustcontain('<a class="submodule-dir ypjax-link" href="testsubmodule"><i class="icon-file-submodule"></i><span>testsubmodule @ ')
+        response.mustcontain('<a class="submodule-dir" href="testsubmodule"><i class="icon-file-submodule"></i><span>testsubmodule @ ')
 
         # check that following a submodule link actually works - and redirects
         response = self.app.get(url(controller='files', action='index',