From c22f9114c7e0874e99fd1504131423517905c9c1 Mon Sep 17 00:00:00 2001 From: "Sl@ny" Date: Wed, 28 Dec 2016 17:35:52 +0100 Subject: Implementation of Folder Jumping --- templates/repo/view_list.tmpl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'templates/repo/view_list.tmpl') diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index f1cbf58a4a..82167de64a 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -43,8 +43,21 @@ {{else}} - - {{$entry.Name}} + {{if $entry.IsDir}} + {{$subJumpablePathName := $entry.GetSubJumpablePathName}} + {{$subJumpablePath := SubJumpablePath $subJumpablePathName}} + + + {{if eq (len $subJumpablePath) 2}} + {{index $subJumpablePath 0}}{{index $subJumpablePath 1}} + {{else}} + {{index $subJumpablePath 0}} + {{end}} + + {{else}} + + {{$entry.Name}} + {{end}} {{end}} -- cgit v1.2.3