mirror of
https://github.com/go-gitea/gitea
synced 2025-08-02 15:48:35 +00:00
Use label to describe repository type (#11891)
* Use label instead of icon to describe repository type when repo avatar is set * header_icon is not longer duplicated; move out of separate template * handle archived case too * use everywhere * public template -> template * bring back separate icon in better form * definitely was overthinking this * 32 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
committed by
GitHub
parent
daf62841f6
commit
d9aa007a9e
@@ -7,13 +7,26 @@
|
||||
{{end}}
|
||||
<a class="name" href="{{.Link}}">
|
||||
{{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
|
||||
{{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
|
||||
</a>
|
||||
{{if .IsPrivate}}
|
||||
<span class="middle text gold">{{svg "octicon-lock" 16}}</span>
|
||||
{{else if and (not .IsMirror) (not .IsFork) (.Owner.Visibility.IsPrivate) }}
|
||||
<span class="text gold">{{svg "octicon-internal-repo" 16}}</span>
|
||||
{{else if .IsFork}}
|
||||
{{if .IsArchived}}<span class="ui compact label">{{$.i18n.Tr "repo.desc.archived"}}</span>{{end}}
|
||||
{{if .IsTemplate}}
|
||||
{{if .IsPrivate}}
|
||||
<span class="ui basic label">{{$.i18n.Tr "repo.desc.private_template"}}</span>
|
||||
{{else}}
|
||||
{{if .Owner.Visibility.IsPrivate}}
|
||||
<span class="ui basic label">{{$.i18n.Tr "repo.desc.internal_template"}}</span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{if .IsPrivate}}
|
||||
<span class="ui basic label">{{$.i18n.Tr "repo.desc.private"}}</span>
|
||||
{{else}}
|
||||
{{if .Owner.Visibility.IsPrivate}}
|
||||
<span class="ui basic label">{{$.i18n.Tr "repo.desc.internal"}}</span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .IsFork}}
|
||||
<span class="middle">{{svg "octicon-repo-forked" 16}}</span>
|
||||
{{else if .IsMirror}}
|
||||
<span class="middle">{{svg "octicon-repo-clone" 16}}</span>
|
||||
|
Reference in New Issue
Block a user