Files
gitea/templates/repo/issue/view_content/comments_delete_time.tmpl
T
3296046b4a fix: focus confirm button and use red for delete confirmations (#39350)
Fixes https://github.com/go-gitea/gitea/issues/39347

1. Focus the confirm button in generic confirm modals so `Enter` runs
the highlighted action.
2. Delete actions that lacked the risky flag now get it, so their
confirm button is red.

---------

Co-authored-by: silverwind <me@silverwind.io>
2026-09-18 19:42:22 +00:00

15 lines
756 B
Handlebars

{{if and .comment.Time (ctx.RootData.Repository.IsTimetrackerEnabled ctx)}} {{/* compatibility with time comments made before v1.14 */}}
{{if (not .comment.Time.Deleted)}}
{{if (or ctx.RootData.IsAdmin (and ctx.RootData.IsSigned (eq ctx.RootData.SignedUserID .comment.PosterID)))}}
<span class="tw-ml-auto">
<button type="button" class="ui icon button compact mini link-action negative" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.del_time"}}"
data-url="{{ctx.RootData.RepoLink}}/issues/{{ctx.RootData.Issue.Index}}/times/{{.comment.TimeID}}/delete?id={{.comment.Time.ID}}"
data-modal-confirm="{{ctx.Locale.Tr "repo.issues.del_time"}}"
>
{{svg "octicon-trash"}}
</button>
</span>
{{end}}
{{end}}
{{end}}