summaryrefslogtreecommitdiffstats
path: root/templates/repo/view_list.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/view_list.tmpl')
-rw-r--r--templates/repo/view_list.tmpl17
1 files changed, 15 insertions, 2 deletions
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 @@
</td>
{{else}}
<td class="name">
- <span class="octicon octicon-file-{{if or $entry.IsDir}}directory{{else}}text{{end}}"></span>
- <a href="{{EscapePound $.TreeLink}}/{{EscapePound $entry.Name}}">{{$entry.Name}}</a>
+ {{if $entry.IsDir}}
+ {{$subJumpablePathName := $entry.GetSubJumpablePathName}}
+ {{$subJumpablePath := SubJumpablePath $subJumpablePathName}}
+ <span class="octicon octicon-file-directory"></span>
+ <a href="{{EscapePound $.TreeLink}}/{{EscapePound $subJumpablePathName}}">
+ {{if eq (len $subJumpablePath) 2}}
+ <span class="jumpable-path">{{index $subJumpablePath 0}}</span>{{index $subJumpablePath 1}}
+ {{else}}
+ {{index $subJumpablePath 0}}
+ {{end}}
+ </a>
+ {{else}}
+ <span class="octicon octicon-file-text"></span>
+ <a href="{{EscapePound $.TreeLink}}/{{EscapePound $entry.Name}}">{{$entry.Name}}</a>
+ {{end}}
</td>
{{end}}
<td class="message collapsing has-emoji">