summaryrefslogtreecommitdiffstats
path: root/templates/repo/header.tmpl
diff options
context:
space:
mode:
authorDenys Konovalov <kontakt@denyskon.de>2023-10-16 23:06:15 +0200
committerGitHub <noreply@github.com>2023-10-16 23:06:15 +0200
commit0271114e6400fc003d96c8499f0c8e43bbb441f9 (patch)
treef2c666f02ee0a02c1b3cde1e2389889d9b8849f3 /templates/repo/header.tmpl
parent6c501b149809a7015e58d9627e84bfd593702f95 (diff)
downloadgitea-0271114e6400fc003d96c8499f0c8e43bbb441f9.tar.gz
gitea-0271114e6400fc003d96c8499f0c8e43bbb441f9.zip
cleanup repo details icons/labels (#27644)
Fix #27596 Change confusing behavior when showing information about a repo via labels and icons. Implement changes proposed by @lng2020 in https://github.com/go-gitea/gitea/pull/27627#pullrequestreview-1678787673.
Diffstat (limited to 'templates/repo/header.tmpl')
-rw-r--r--templates/repo/header.tmpl25
1 files changed, 9 insertions, 16 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 2eb9014cdd..895d18d6fd 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -11,25 +11,18 @@
<div class="gt-mx-2">/</div>
<a href="{{$.RepoLink}}">{{.Name}}</a>
<div class="labels gt-df gt-ac gt-fw">
- {{if .IsTemplate}}
- {{if .IsPrivate}}
- <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private_template"}}</span>
- {{else}}
- {{if .Owner.Visibility.IsPrivate}}
- <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal_template"}}</span>
- {{end}}
- {{end}}
+ {{if .IsArchived}}
+ <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
+ {{end}}
+ {{if .IsPrivate}}
+ <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
{{else}}
- {{if .IsPrivate}}
- <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
- {{else}}
- {{if .Owner.Visibility.IsPrivate}}
- <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
- {{end}}
+ {{if .Owner.Visibility.IsPrivate}}
+ <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
{{end}}
{{end}}
- {{if .IsArchived}}
- <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
+ {{if .IsTemplate}}
+ <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
{{end}}
</div>
{{if $.EnableFeed}}