summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-10-20 04:04:24 +0800
committerGitHub <noreply@github.com>2023-10-19 22:04:24 +0200
commit6cef7a767b649aa250ea902042c719d1c87d678d (patch)
tree4766aa57738098fce653673eb742d82a061c4588 /templates/repo
parent6befca169558283ff57bb86ccac81e83dd42eea7 (diff)
downloadgitea-6cef7a767b649aa250ea902042c719d1c87d678d.tar.gz
gitea-6cef7a767b649aa250ea902042c719d1c87d678d.zip
cleanup repo details icons/labels (#27644) (#27654)v1.21.0-rc2
Backport #27644 by @denyskon 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. Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/header.tmpl25
-rw-r--r--templates/repo/icon.tmpl4
2 files changed, 9 insertions, 20 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 5d4bc64734..814128fc99 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}}
diff --git a/templates/repo/icon.tmpl b/templates/repo/icon.tmpl
index 0568b74f63..3575e48683 100644
--- a/templates/repo/icon.tmpl
+++ b/templates/repo/icon.tmpl
@@ -1,10 +1,6 @@
{{$avatarLink := .RelAvatarLink}}
{{if $avatarLink}}
<img class="ui avatar gt-vm" src="{{$avatarLink}}" width="32" height="32" alt="{{.FullName}}">
-{{else if $.IsTemplate}}
- {{svg "octicon-repo-template" 32}}
-{{else if $.IsPrivate}}
- {{svg "octicon-lock" 32}}
{{else if $.IsMirror}}
{{svg "octicon-mirror" 32}}
{{else if $.IsFork}}