mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
Rename variables
This commit is contained in:
parent
a0055b660e
commit
14e2e08b24
@ -225,7 +225,7 @@ func List(ctx *context.Context) {
|
||||
runs = append(runs, run)
|
||||
}
|
||||
|
||||
ctx.Data["Runs"] = runs
|
||||
ctx.Data["WorkflowActionRuns"] = runs
|
||||
|
||||
actors, err := actions_model.GetActors(ctx, ctx.Repo.Repository.ID)
|
||||
if err != nil {
|
||||
|
@ -1,47 +1,46 @@
|
||||
<div class="flex-list run-list">
|
||||
{{if not .Runs}}
|
||||
{{if not .WorkflowActionRuns}}
|
||||
<div class="empty-placeholder">
|
||||
{{svg "octicon-no-entry" 48}}
|
||||
<h2>{{if $.IsFiltered}}{{ctx.Locale.Tr "actions.runs.no_results"}}{{else}}{{ctx.Locale.Tr "actions.runs.no_runs"}}{{end}}</h2>
|
||||
</div>
|
||||
{{end}}
|
||||
{{range .Runs}}
|
||||
{{$CurWorkflow := $.CurWorkflow}}
|
||||
{{$WorkflowName := .Workflow.Name}}
|
||||
{{with .ActionRun}}
|
||||
<div class="flex-item tw-items-center">
|
||||
<div class="flex-item-leading">
|
||||
{{template "repo/actions/status" (dict "status" .Status.String)}}
|
||||
</div>
|
||||
<div class="flex-item-main">
|
||||
<a class="flex-item-title" title="{{.Title}}" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
|
||||
{{if .Title}}{{.Title}}{{else}}{{ctx.Locale.Tr "actions.runs.empty_commit_message"}}{{end}}
|
||||
</a>
|
||||
<div class="flex-item-body">
|
||||
<span><b>{{if not $CurWorkflow}}{{$WorkflowName}} {{end}}#{{.Index}}</b>:</span>
|
||||
{{- if .ScheduleID -}}
|
||||
{{ctx.Locale.Tr "actions.runs.scheduled"}}
|
||||
{{- else -}}
|
||||
{{ctx.Locale.Tr "actions.runs.commit"}}
|
||||
<a href="{{$.RepoLink}}/commit/{{.CommitSHA}}">{{ShortSha .CommitSHA}}</a>
|
||||
{{ctx.Locale.Tr "actions.runs.pushed_by"}}
|
||||
<a href="{{.TriggerUser.HomeLink}}">{{.TriggerUser.GetDisplayName}}</a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-item-trailing">
|
||||
{{if .RefLink}}
|
||||
<a class="ui label run-list-ref gt-ellipsis" href="{{.RefLink}}">{{.PrettyRef}}</a>
|
||||
{{else}}
|
||||
<span class="ui label run-list-ref gt-ellipsis">{{.PrettyRef}}</span>
|
||||
{{end}}
|
||||
<div class="run-list-item-right">
|
||||
<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated ctx.Locale}}</div>
|
||||
<div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div>
|
||||
</div>
|
||||
{{range $run := .WorkflowActionRuns}}
|
||||
{{$actionRun := $run.ActionRun}}
|
||||
{{$workflow := $run.Workflow}}
|
||||
|
||||
<div class="flex-item tw-items-center">
|
||||
<div class="flex-item-leading">
|
||||
{{template "repo/actions/status" (dict "status" $actionRun.Status.String)}}
|
||||
</div>
|
||||
<div class="flex-item-main">
|
||||
<a class="flex-item-title" title="{{$actionRun.Title}}" href="{{if $actionRun.Link}}{{$actionRun.Link}}{{else}}{{$.Link}}/{{$actionRun.Index}}{{end}}">
|
||||
{{if $actionRun.Title}}{{$actionRun.Title}}{{else}}{{ctx.Locale.Tr "actions.runs.empty_commit_message"}}{{end}}
|
||||
</a>
|
||||
<div class="flex-item-body">
|
||||
<span><b>{{if not $.CurWorkflow}}{{$workflow.Name}} {{end}}#{{$actionRun.Index}}</b>:</span>
|
||||
{{- if $actionRun.ScheduleID -}}
|
||||
{{ctx.Locale.Tr "actions.runs.scheduled"}}
|
||||
{{- else -}}
|
||||
{{ctx.Locale.Tr "actions.runs.commit"}}
|
||||
<a href="{{$.RepoLink}}/commit/{{$actionRun.CommitSHA}}">{{ShortSha $actionRun.CommitSHA}}</a>
|
||||
{{ctx.Locale.Tr "actions.runs.pushed_by"}}
|
||||
<a href="{{$actionRun.TriggerUser.HomeLink}}">{{$actionRun.TriggerUser.GetDisplayName}}</a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="flex-item-trailing">
|
||||
{{if $actionRun.RefLink}}
|
||||
<a class="ui label run-list-ref gt-ellipsis" href="{{$actionRun.RefLink}}">{{$actionRun.PrettyRef}}</a>
|
||||
{{else}}
|
||||
<span class="ui label run-list-ref gt-ellipsis">{{$actionRun.PrettyRef}}</span>
|
||||
{{end}}
|
||||
<div class="run-list-item-right">
|
||||
<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{TimeSinceUnix $actionRun.Updated ctx.Locale}}</div>
|
||||
<div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{$actionRun.Duration}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{template "base/paginate" .}}
|
||||
|
Loading…
Reference in New Issue
Block a user