mirror of
1
Fork 0

Fixes accessibility of empty repository commit status (#22632)

Avoid empty labelled anchor in repo without commits.

Contributed by @forgejo.

<!--

Please check the following:

1. Make sure you are targeting the `main` branch, pull requests on
release branches are only allowed for bug fixes.
2. Read contributing guidelines:
https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md
3. Describe what your pull request does and which issue you're targeting
(if any)

-->

(cherry picked from commit 638e6160e8)
This commit is contained in:
Felipe Leopoldo Sologuren Gutiérrez 2023-01-27 19:40:17 -03:00 committed by Loïc Dachary
parent 82edd2421c
commit 42e27a4559
No known key found for this signature in database
GPG Key ID: 992D23B392F9E4F2
1 changed files with 1 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<a class="ui link commit-statuses-trigger vm"{{if eq (len .Statuses) 1}}{{$status := index .Statuses 0}}{{if $status.TargetURL}} href="{{$status.TargetURL}}"{{end}}{{end}}>{{template "repo/commit_status" .Status}}</a>
{{if eq (len .Statuses) 1}}{{$status := index .Statuses 0}}{{if $status.TargetURL}}<a class="ui link commit-statuses-trigger vm" href="{{$status.TargetURL}}">{{template "repo/commit_status" .Status}}</a>{{end}}{{end}}
<div class="ui commit-statuses-popup commit-statuses tippy-target">
<div class="ui relaxed list divided">
{{range .Statuses}}