Skip to content

Commit b6afdc6

Browse files
author
zsbahtiar
committed
refactor(run_list): change from button delete workflow to checkbox
1 parent aa8a3d0 commit b6afdc6

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

templates/repo/actions/runs_list.tmpl

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="flex-list run-list">
1+
<div id="action-actions" class="flex-list run-list">
22
{{if not .Runs}}
33
<div class="empty-placeholder">
44
{{svg "octicon-no-entry" 48}}
@@ -7,6 +7,7 @@
77
{{end}}
88
{{range .Runs}}
99
<div class="flex-item tw-items-center">
10+
<input type="checkbox" autocomplete="off" class="action-checkbox tw-mr-4 tw-ml-4" data-action-id={{.ID}} aria-label="{{ctx.Locale.Tr "repo.issues.action_check"}} &quot;{{.Title}}&quot;"{{if or (eq .Status 6) (eq .Status 5)}}disabled{{end}}>
1011
<div class="flex-item-leading">
1112
{{template "repo/actions/status" (dict "status" .Status.String)}}
1213
</div>
@@ -35,25 +36,9 @@
3536
<div class="run-list-item-right">
3637
<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{DateUtils.TimeSince .Updated}}</div>
3738
<div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div>
38-
{{if and (ne .Status 6) (ne .Status 5)}}
39-
<div class="run-list-meta">
40-
<button class="ui red tiny button delete-button name" data-modal-id="modal-delete-workflow" data-url="actions/runs/{{.ID}}" data-name="Delete workflow run {{.ID}}" data-method="delete" name="Delete Workflow {{.ID}}">Delete Workflow</button>
41-
</div>
42-
{{end}}
4339
</div>
4440
</div>
4541
</div>
4642
{{end}}
4743
</div>
48-
49-
<div class="ui g-modal-confirm delete modal" id="modal-delete-workflow">
50-
<div class="header">
51-
<i class="trash icon"></i>
52-
<span class="name"></span>
53-
</div>
54-
<div class="content">
55-
<p>Are you sure you want to permanently delete this workflow run? This action cannot be undone.</p>
56-
</div>
57-
{{template "base/modal_actions_confirm" .}}
58-
</div>
5944
{{template "base/paginate" .}}

0 commit comments

Comments
 (0)