Show dropdown with all statuses for commit (#13977)
* Show dropdown with all statuses for commit * Use popups * Remove unnecessary change * Style popup * Use divided list * As per @silverwind * Refactor GetLastCommitStatus * Missing dropdown on repo home and commit page * Fix tests * Make status icon be a part of a link on PR list * Fix missing translation call * Indent fix Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>tokarchuk/v1.17
parent
029836c34c
commit
f3c4baa84b
@ -1,15 +1,15 @@ |
||||
{{if eq .State "pending"}} |
||||
<a class="commit-status-link" href="{{.TargetURL}}" target="_blank" rel="noopener noreferrer"><i class="commit-status circle icon yellow"></i></a> |
||||
<i class="commit-status circle icon yellow"></i> |
||||
{{end}} |
||||
{{if eq .State "success"}} |
||||
<a class="commit-status-link" href="{{.TargetURL}}" target="_blank" rel="noopener noreferrer"><i class="commit-status check icon green"></i></a> |
||||
<i class="commit-status check icon green"></i> |
||||
{{end}} |
||||
{{if eq .State "error"}} |
||||
<a class="commit-status-link" href="{{.TargetURL}}" target="_blank" rel="noopener noreferrer"><i class="commit-status warning icon red"></i></a> |
||||
<i class="commit-status warning icon red"></i> |
||||
{{end}} |
||||
{{if eq .State "failure"}} |
||||
<a class="commit-status-link" href="{{.TargetURL}}" target="_blank" rel="noopener noreferrer"><i class="commit-status remove icon red"></i></a> |
||||
<i class="commit-status remove icon red"></i> |
||||
{{end}} |
||||
{{if eq .State "warning"}} |
||||
<a class="commit-status-link" href="{{.TargetURL}}" target="_blank" rel="noopener noreferrer"><i class="commit-status warning sign icon yellow"></i></a> |
||||
<i class="commit-status warning sign icon yellow"></i> |
||||
{{end}} |
||||
|
@ -0,0 +1,14 @@ |
||||
<a class="ui link commit-statuses-trigger">{{template "repo/commit_status" .Status}}</a> |
||||
<div class="ui popup very wide fixed basic commit-statuses"> |
||||
<div class="ui relaxed list divided"> |
||||
{{range .Statuses}} |
||||
<div class="ui item singular-status"> |
||||
<span>{{template "repo/commit_status" .}}</span> |
||||
<span class="ui">{{.Context}} <span class="text grey">{{.Description}}</span></span> |
||||
{{if .TargetURL}} |
||||
<div class="ui right"><a href="{{.TargetURL}}" target="_blank" rel="noopener noreferrer">{{$.root.i18n.Tr "repo.pulls.status_checks_details"}}</a></div> |
||||
{{end}} |
||||
</div> |
||||
{{end}} |
||||
</div> |
||||
</div> |
Loading…
Reference in new issue