mirror of
https://codeberg.org/forgejo-aneksajo/forgejo-aneksajo.git
synced 2025-07-29 05:00:05 +02:00

**Backport:** https://codeberg.org/forgejo/forgejo/pulls/7581 Followup to _many PRs_ where the old switches were converted to this one. The main change here is to the switch with counter. It was missing a gap. Additionally, it removes tailwind helpers the other switches retained from before switch refactors, because they are now using gap. Co-authored-by: 0ko <0ko@noreply.codeberg.org> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7589 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org> Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
22 lines
952 B
Go HTML Template
22 lines
952 B
Go HTML Template
<div class="switch">
|
|
<a class="{{if eq .State "open"}}active {{end}}item" href="{{.OpenLink}}" data-test-name="open-issue-count">
|
|
{{if .PageIsMilestones}}
|
|
{{svg "octicon-milestone" 16}}
|
|
{{else if .PageIsPullList}}
|
|
{{svg "octicon-git-pull-request" 16}}
|
|
{{else}}
|
|
{{svg "octicon-issue-opened" 16}}
|
|
{{end}}
|
|
{{ctx.Locale.PrettyNumber .OpenCount}} {{ctx.Locale.Tr "repo.issues.open_title"}}
|
|
</a>
|
|
<a class="{{if eq .State "closed"}}active {{end}}item" href="{{.ClosedLink}}" data-test-name="closed-issue-count">
|
|
{{svg "octicon-issue-closed" 16}}
|
|
{{ctx.Locale.PrettyNumber .ClosedCount}} {{ctx.Locale.Tr "repo.issues.closed_title"}}
|
|
</a>
|
|
{{if not .PageIsMilestones}}
|
|
<a class="{{if eq .State "all"}}active {{end}}item" href="{{.AllStatesLink}}" data-test-name="all-issue-count">
|
|
{{svg "octicon-eye" 16}}
|
|
{{ctx.Locale.PrettyNumber (.AllCount)}} {{ctx.Locale.Tr "repo.issues.all_title"}}
|
|
</a>
|
|
{{end}}
|
|
</div>
|