diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2025-03-10 15:57:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-10 15:57:17 +0800 |
commit | 34e5df6d300f92bc132df9fceca2f7fc65982c4c (patch) | |
tree | ea7125c0a8f901ef0fbc55382fa3d685d38309ec /templates | |
parent | ae63568ce38f0b4248227c74d6872c1ff2bb06a7 (diff) | |
download | gitea-34e5df6d300f92bc132df9fceca2f7fc65982c4c.tar.gz gitea-34e5df6d300f92bc132df9fceca2f7fc65982c4c.zip |
Add material icons for file list (#33837)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/view_list.tmpl | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 7540931010..b4d27fb1e3 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -15,8 +15,8 @@ {{$commit := $item.Commit}} {{$submoduleFile := $item.SubmoduleFile}} <div class="repo-file-cell name {{if not $commit}}notready{{end}}"> + {{ctx.RenderUtils.RenderFileIcon $entry}} {{if $entry.IsSubModule}} - {{svg "octicon-file-submodule"}} {{$submoduleLink := $submoduleFile.SubmoduleWebLink ctx}} {{if $submoduleLink}} <a class="muted" href="{{$submoduleLink.RepoWebLink}}">{{$entry.Name}}</a> <span class="at">@</span> <a href="{{$submoduleLink.CommitWebLink}}">{{ShortSha $submoduleFile.RefID}}</a> @@ -26,7 +26,6 @@ {{else}} {{if $entry.IsDir}} {{$subJumpablePathName := $entry.GetSubJumpablePathName}} - {{svg "octicon-file-directory-fill"}} <a class="muted" href="{{$.TreeLink}}/{{PathEscapeSegments $subJumpablePathName}}" title="{{$subJumpablePathName}}"> {{$subJumpablePathFields := StringUtils.Split $subJumpablePathName "/"}} {{$subJumpablePathFieldLast := (Eval (len $subJumpablePathFields) "-" 1)}} @@ -38,7 +37,6 @@ {{end}} </a> {{else}} - {{svg (printf "octicon-%s" (EntryIcon $entry))}} <a class="muted" href="{{$.TreeLink}}/{{PathEscapeSegments $entry.Name}}" title="{{$entry.Name}}">{{$entry.Name}}</a> {{end}} {{end}} |