diff options
author | Felipe Leopoldo Sologuren GutiƩrrez <fsologureng@users.noreply.github.com> | 2023-01-27 19:40:17 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-28 00:40:17 +0200 |
commit | 74466eb1334386148caa50ccfd18b0f218e413d7 (patch) | |
tree | 925a51f8a780b38c4bffa957705fa590ca219546 /templates | |
parent | 51a92cb8218b6702a5a0c8f921eda02456332748 (diff) | |
download | gitea-74466eb1334386148caa50ccfd18b0f218e413d7.tar.gz gitea-74466eb1334386148caa50ccfd18b0f218e413d7.zip |
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)
-->
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/commit_statuses.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index d682709082..4fe644ff0a 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -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}} |