mirror of
https://github.com/go-gitea/gitea
synced 2024-11-05 09:44:26 +00:00
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>
This commit is contained in:
parent
6befca1695
commit
6cef7a767b
@ -1026,10 +1026,8 @@ transfer.no_permission_to_reject = You do not have permission to reject this tra
|
|||||||
|
|
||||||
desc.private = Private
|
desc.private = Private
|
||||||
desc.public = Public
|
desc.public = Public
|
||||||
desc.private_template = Private template
|
desc.template = Template
|
||||||
desc.public_template = Template
|
|
||||||
desc.internal = Internal
|
desc.internal = Internal
|
||||||
desc.internal_template = Internal template
|
|
||||||
desc.archived = Archived
|
desc.archived = Archived
|
||||||
|
|
||||||
template.items = Template Items
|
template.items = Template Items
|
||||||
|
@ -55,29 +55,22 @@
|
|||||||
<td>
|
<td>
|
||||||
<a href="{{.Link}}">{{.Name}}</a>
|
<a href="{{.Link}}">{{.Name}}</a>
|
||||||
{{if .IsArchived}}
|
{{if .IsArchived}}
|
||||||
<span class="ui basic mini label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
|
<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 .Owner.Visibility.IsPrivate}}
|
||||||
|
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
|
||||||
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .IsTemplate}}
|
{{if .IsTemplate}}
|
||||||
{{if .IsPrivate}}
|
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
|
||||||
<span class="ui basic mini label">{{ctx.Locale.Tr "repo.desc.private_template"}}</span>
|
|
||||||
{{else}}
|
|
||||||
{{if .Owner.Visibility.IsPrivate}}
|
|
||||||
<span class="ui basic mini label">{{ctx.Locale.Tr "repo.desc.internal_template"}}</span>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{if .IsMirror}}
|
||||||
{{else}}
|
|
||||||
{{if .IsPrivate}}
|
|
||||||
<span class="ui basic mini label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
|
|
||||||
{{else}}
|
|
||||||
{{if .Owner.Visibility.IsPrivate}}
|
|
||||||
<span class="ui basic mini label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{if .IsFork}}
|
|
||||||
{{svg "octicon-repo-forked"}}
|
|
||||||
{{else if .IsMirror}}
|
|
||||||
{{svg "octicon-mirror"}}
|
{{svg "octicon-mirror"}}
|
||||||
|
{{else if .IsFork}}
|
||||||
|
{{svg "octicon-repo-forked"}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
<td>{{.NumWatches}}</td>
|
<td>{{.NumWatches}}</td>
|
||||||
|
@ -14,15 +14,6 @@
|
|||||||
{{if .IsArchived}}
|
{{if .IsArchived}}
|
||||||
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
|
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{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}}
|
|
||||||
{{else}}
|
|
||||||
{{if .IsPrivate}}
|
{{if .IsPrivate}}
|
||||||
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
|
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -30,13 +21,10 @@
|
|||||||
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
|
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{if .IsTemplate}}
|
||||||
|
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
{{if .IsFork}}
|
|
||||||
<span data-tooltip-content="{{ctx.Locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span>
|
|
||||||
{{else if .IsMirror}}
|
|
||||||
<span data-tooltip-content="{{ctx.Locale.Tr "mirror"}}">{{svg "octicon-mirror"}}</span>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-item-trailing">
|
<div class="flex-item-trailing">
|
||||||
{{if .PrimaryLanguage}}
|
{{if .PrimaryLanguage}}
|
||||||
|
@ -11,15 +11,9 @@
|
|||||||
<div class="gt-mx-2">/</div>
|
<div class="gt-mx-2">/</div>
|
||||||
<a href="{{$.RepoLink}}">{{.Name}}</a>
|
<a href="{{$.RepoLink}}">{{.Name}}</a>
|
||||||
<div class="labels gt-df gt-ac gt-fw">
|
<div class="labels gt-df gt-ac gt-fw">
|
||||||
{{if .IsTemplate}}
|
{{if .IsArchived}}
|
||||||
{{if .IsPrivate}}
|
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
|
||||||
<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}}
|
||||||
{{end}}
|
|
||||||
{{else}}
|
|
||||||
{{if .IsPrivate}}
|
{{if .IsPrivate}}
|
||||||
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
|
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -27,9 +21,8 @@
|
|||||||
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
|
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{if .IsTemplate}}
|
||||||
{{if .IsArchived}}
|
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
|
||||||
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{if $.EnableFeed}}
|
{{if $.EnableFeed}}
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
{{$avatarLink := .RelAvatarLink}}
|
{{$avatarLink := .RelAvatarLink}}
|
||||||
{{if $avatarLink}}
|
{{if $avatarLink}}
|
||||||
<img class="ui avatar gt-vm" src="{{$avatarLink}}" width="32" height="32" alt="{{.FullName}}">
|
<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}}
|
{{else if $.IsMirror}}
|
||||||
{{svg "octicon-mirror" 32}}
|
{{svg "octicon-mirror" 32}}
|
||||||
{{else if $.IsFork}}
|
{{else if $.IsFork}}
|
||||||
|
Loading…
Reference in New Issue
Block a user