diff options
author | yp05327 <576951401@qq.com> | 2023-03-19 21:44:48 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-19 14:44:48 +0200 |
commit | 1a4efa0ee9a49d48549be7479a46be133b9bc260 (patch) | |
tree | 8be773cdf4ea88c662196e8e469b50bb997e3307 /templates/repo/projects | |
parent | 0206882e8a9ee226092ffd0d4d39de494d2f9b80 (diff) | |
download | gitea-1a4efa0ee9a49d48549be7479a46be133b9bc260.tar.gz gitea-1a4efa0ee9a49d48549be7479a46be133b9bc260.zip |
Use `project.IconName` instead of repeated unreadable `if-else` chains (#23538)
The project type will be changed in
https://github.com/go-gitea/gitea/pull/23353, so the old fix
https://github.com/go-gitea/gitea/pull/23325 will not work as well.
And I also found that there were some problems in the old fix....
---------
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'templates/repo/projects')
-rw-r--r-- | templates/repo/projects/list.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/projects/list.tmpl b/templates/repo/projects/list.tmpl index 6833b7d785..2350a3af54 100644 --- a/templates/repo/projects/list.tmpl +++ b/templates/repo/projects/list.tmpl @@ -40,7 +40,7 @@ <div class="milestone list"> {{range .Projects}} <li class="item"> - {{svg "octicon-project"}} <a href="{{.Link}}">{{.Title}}</a> + {{svg .IconName}} <a href="{{.Link}}">{{.Title}}</a> <div class="meta"> {{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}} {{if .IsClosed}} |