mirror of
https://github.com/go-gitea/gitea
synced 2024-11-16 07:04:25 +00:00
1454f9dafc
Part of #25042 1. Added actor and status dropdowns first in case something is offtrack and PR is too large. 2. Also added "No results matched." and "The workflow has no runs yet.", and "No results matched." will show if there is no filter results and there is no workflows (with [reference to github action](https://github.com/go-gitea/gitea/actions/workflows/files-changed.yml?query=actor%3AGiteaBot)) Demo: https://github.com/go-gitea/gitea/assets/17645053/6e76292c-4c1f-450d-8b48-99944cfc920c TODOs: - [x] Get available status (same as those in `aggregateJobStatus`) instead of getting from database - [x] Use `JOIN` to get actors, actors order by name - [x] Make self on top
39 lines
1.4 KiB
Handlebars
39 lines
1.4 KiB
Handlebars
<div class="issue list gt-m-0">
|
|
{{if eq (len .Runs) 0}}
|
|
<div class="empty center">
|
|
{{svg "octicon-no-entry" 48}}
|
|
<h2>{{if $.IsFiltered}}{{.locale.Tr "actions.runs.no_results"}}{{else}}{{.locale.Tr "actions.runs.no_runs"}}{{end}}</h2>
|
|
</div>
|
|
{{end}}
|
|
{{range .Runs}}
|
|
<li class="item gt-df gt-py-4">
|
|
<div class="issue-item-left issue-item-icon gt-df gt-items-start">
|
|
{{template "repo/actions/status" (dict "status" .Status.String "locale" $.locale)}}
|
|
</div>
|
|
<div class="issue-item-main action-item-main gt-f1 gt-fc gt-df gt-mr-3">
|
|
<div class="issue-item-top-row gt-mb-2">
|
|
<a class="index gt-no-underline title action-item-title" title="{{.Title}}" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
|
|
{{- .Title -}}
|
|
</a>
|
|
</div>
|
|
<div class="desc issue-item-bottom-row gt-df gt-ac gt-fw">
|
|
<b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>: {{$.locale.Tr "actions.runs.commit"}}
|
|
<a href="{{$.RepoLink}}/commit/{{.CommitSHA}}">{{ShortSha .CommitSHA}}</a>{{$.locale.Tr "actions.runs.pushed_by"}} {{.TriggerUser.GetDisplayName}}
|
|
<span class="ui label">
|
|
{{if .RefLink}}
|
|
<a href="{{.RefLink}}">{{.PrettyRef}}</a>
|
|
{{else}}
|
|
{{.PrettyRef}}
|
|
{{end}}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="issue-item-right">
|
|
<div>{{TimeSinceUnix .Updated $.locale}}</div>
|
|
<div>{{.Duration}}</div>
|
|
</div>
|
|
</li>
|
|
{{end}}
|
|
</div>
|
|
{{template "base/paginate" .}}
|