Actions list (#34530)

Closes #34524

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
NorthRealm 2025-05-26 20:02:47 +08:00 committed by GitHub
parent 9d4ebc1f2c
commit 9b295e984a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,17 +36,25 @@
<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{DateUtils.TimeSince $run.Updated}}</div> <div class="run-list-meta">{{svg "octicon-calendar" 16}}{{DateUtils.TimeSince $run.Updated}}</div>
<div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{$run.Duration}}</div> <div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{$run.Duration}}</div>
</div> </div>
{{if and ($.AllowDeleteWorkflowRuns) ($run.Status.IsDone)}} <div class="ui dropdown jump tw-p-2">
<button class="btn interact-bg link-action tw-p-2" {{svg "octicon-kebab-horizontal"}}
<div class="menu flex-items-menu">
<!-- TODO: This redundant link should be replaced by something else in future,
because have not figured out how to add "View Workflow" or anything similar to GitHub.
Related: https://github.com/go-gitea/gitea/pull/34530 -->
<a class="item" href="{{$run.Link}}">{{svg "octicon-play"}}{{ctx.Locale.Tr "view"}}</a>
{{if and $.AllowDeleteWorkflowRuns $run.Status.IsDone}}
<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"}}"
data-tooltip-content="{{ctx.Locale.Tr "actions.runs.delete"}}"
> >
{{svg "octicon-trash"}} {{svg "octicon-trash"}}{{ctx.Locale.Tr "actions.runs.delete"}}
</button> </a>
{{end}} {{end}}
</div> </div>
</div> </div>
</div>
</div>
{{end}} {{end}}
</div> </div>
{{template "base/paginate" .}} {{template "base/paginate" .}}