refactor(templates): remove ctxData from tmpl files, use ctx.RootData instead (#37567)
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>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings new webhook")}}
|
||||
{{template "org/settings/layout_head" (dict "pageClass" "organization settings new webhook")}}
|
||||
<div class="org-setting-content">
|
||||
{{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}}
|
||||
{{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}}
|
||||
{{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}}
|
||||
{{template "webhook/new" (dict "CustomHeaderTitle" $CustomHeaderTitle)}}
|
||||
</div>
|
||||
{{template "org/settings/layout_footer" .}}
|
||||
|
||||
Reference in New Issue
Block a user