mirror of https://github.com/go-gitea/gitea.git
update
This commit is contained in:
parent
91a2a71eb3
commit
3c79139e44
|
|
@ -318,8 +318,7 @@ func prepareWorkflowList(ctx *context.Context, workflows []Workflow) {
|
||||||
ctx.Data["Page"] = pager
|
ctx.Data["Page"] = pager
|
||||||
ctx.Data["HasWorkflowsOrRuns"] = len(workflows) > 0 || len(runs) > 0
|
ctx.Data["HasWorkflowsOrRuns"] = len(workflows) > 0 || len(runs) > 0
|
||||||
|
|
||||||
ctx.Data["AllowDeleteWorkflowRuns"] = ctx.Repo.CanWrite(unit.TypeActions)
|
ctx.Data["CanWriteRepoUnitActions"] = ctx.Repo.CanWrite(unit.TypeActions)
|
||||||
ctx.Data["AllowCancelWorkflowRuns"] = ctx.Repo.CanWrite(unit.TypeActions)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// loadIsRefDeleted loads the IsRefDeleted field for each run in the list.
|
// loadIsRefDeleted loads the IsRefDeleted field for each run in the list.
|
||||||
|
|
|
||||||
|
|
@ -40,12 +40,12 @@
|
||||||
{{svg "octicon-kebab-horizontal"}}
|
{{svg "octicon-kebab-horizontal"}}
|
||||||
<div class="menu flex-items-menu">
|
<div class="menu flex-items-menu">
|
||||||
<a class="item" href="{{$run.Link}}/workflow">{{svg "octicon-play"}}{{ctx.Locale.Tr "actions.runs.view_workflow_file"}}</a>
|
<a class="item" href="{{$run.Link}}/workflow">{{svg "octicon-play"}}{{ctx.Locale.Tr "actions.runs.view_workflow_file"}}</a>
|
||||||
{{if and $.AllowCancelWorkflowRuns (not $run.Status.IsDone)}}
|
{{if and $.CanWriteRepoUnitActions (not $run.Status.IsDone)}}
|
||||||
<a class="item link-action" data-url="{{$run.Link}}/cancel">
|
<a class="item link-action" data-url="{{$run.Link}}/cancel">
|
||||||
{{svg "octicon-x"}}{{ctx.Locale.Tr "actions.runs.cancel"}}
|
{{svg "octicon-x"}}{{ctx.Locale.Tr "actions.runs.cancel"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and $.AllowDeleteWorkflowRuns $run.Status.IsDone}}
|
{{if and $.CanWriteRepoUnitActions $run.Status.IsDone}}
|
||||||
<a class="item link-action"
|
<a class="item link-action"
|
||||||
data-url="{{$run.Link}}/delete"
|
data-url="{{$run.Link}}/delete"
|
||||||
data-modal-confirm="{{ctx.Locale.Tr "actions.runs.delete.description"}}"
|
data-modal-confirm="{{ctx.Locale.Tr "actions.runs.delete.description"}}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue