mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-08 16:43:39 +02:00
Sub-templates have direct access to `ctx.RootData` (the root data map), so there is no need for callers to explicitly pass it as `ctxData` via `dict`. Also fix #37569 by the way --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
15 lines
733 B
Handlebars
15 lines
733 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 class="ui icon button compact mini link-action" 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}}
|