diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-06-19 15:46:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-19 15:46:50 +0800 |
commit | a1c5057fe81c25dfd1777e9625eb5480c45897ea (patch) | |
tree | 5e25321082e6f3e5b5255132af825cb0b3a3248e /templates | |
parent | 51c2aebe1f5124f1a93f7ccd082792c26e6da291 (diff) | |
download | gitea-a1c5057fe81c25dfd1777e9625eb5480c45897ea.tar.gz gitea-a1c5057fe81c25dfd1777e9625eb5480c45897ea.zip |
Batch delete issue and improve tippy opts (#25253)
1. Add "batch delete" button for selected issues, close #22273
2. Address the review in
https://github.com/go-gitea/gitea/pull/25219#discussion_r1229266083
Diffstat (limited to 'templates')
-rw-r--r-- | templates/devtest/fetch-action.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/issue/list.tmpl | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/templates/devtest/fetch-action.tmpl b/templates/devtest/fetch-action.tmpl index 2fb7289ebe..70844a8751 100644 --- a/templates/devtest/fetch-action.tmpl +++ b/templates/devtest/fetch-action.tmpl @@ -8,7 +8,9 @@ It might be renamed to "link-fetch-action" to match the "form-fetch-action". </div> <div> - <button class="link-action" data-url="fetch-action-test?k=1">test</button> + <button class="link-action" data-url="fetch-action-test?k=1">test action</button> + <button class="link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with confirm</button> + <button class="ui red button link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with risky confirm</button> </div> </div> <div> diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 5c9a5937a1..12eb31acdc 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -282,9 +282,15 @@ {{if not .Repository.IsArchived}} <!-- Action Button --> {{if .IsShowClosed}} - <button class="ui green active basic button issue-action gt-ml-auto" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_open"}}</button> + <button class="ui green basic button issue-action gt-ml-auto" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_open"}}</button> {{else}} - <button class="ui red active basic button issue-action gt-ml-auto" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_close"}}</button> + <button class="ui red basic button issue-action gt-ml-auto" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_close"}}</button> + {{end}} + {{if $.IsRepoAdmin}} + <button class="ui red button issue-action gt-ml-auto" + data-action="delete" data-url="{{$.RepoLink}}/issues/delete" + data-action-delete-confirm="{{.locale.Tr "confirm_delete_selected"}}" + >{{.locale.Tr "repo.issues.delete"}}</button> {{end}} <!-- Labels --> <div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item"> |