mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Implementation of Folder Jumping
This commit is contained in:
committed by
Kim "BKC" Carlbäcker
parent
331316894e
commit
c22f9114c7
@@ -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">
|
||||
|
Reference in New Issue
Block a user