aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user/settings
diff options
context:
space:
mode:
authorKerwin Bryant <kerwin612@qq.com>2023-09-05 20:00:28 +0800
committerGitHub <noreply@github.com>2023-09-05 12:00:28 +0000
commit65588b732c087e191a8f03e240fdfc5dcfc24199 (patch)
tree1aea3c4361f4ce9ed499234575072b3637cf7def /templates/user/settings
parent6c73c0da530649d0d629359e13d0373b72568f41 (diff)
downloadgitea-65588b732c087e191a8f03e240fdfc5dcfc24199.tar.gz
gitea-65588b732c087e191a8f03e240fdfc5dcfc24199.zip
Extract common code to new template (#26903)
I noticed that the code of several new webhook pages is highly repetitive, so I pulled out the common parts to a new template, unified reference, unified maintenance --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'templates/user/settings')
-rw-r--r--templates/user/settings/hook_new.tmpl24
1 files changed, 1 insertions, 23 deletions
diff --git a/templates/user/settings/hook_new.tmpl b/templates/user/settings/hook_new.tmpl
index 83ae4801b4..4d3ddf0383 100644
--- a/templates/user/settings/hook_new.tmpl
+++ b/templates/user/settings/hook_new.tmpl
@@ -1,27 +1,5 @@
{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings new webhook")}}
<div class="user-setting-content">
- <div class="user-setting-content">
- <h4 class="ui top attached header">
- {{if .PageIsSettingsHooksNew}}{{.locale.Tr "repo.settings.add_webhook"}}{{else}}{{.locale.Tr "repo.settings.update_webhook"}}{{end}}
- <div class="ui right">
- {{template "shared/webhook/icon" .}}
- </div>
- </h4>
- <div class="ui attached segment">
- {{template "repo/settings/webhook/gitea" .}}
- {{template "repo/settings/webhook/gogs" .}}
- {{template "repo/settings/webhook/slack" .}}
- {{template "repo/settings/webhook/discord" .}}
- {{template "repo/settings/webhook/dingtalk" .}}
- {{template "repo/settings/webhook/telegram" .}}
- {{template "repo/settings/webhook/msteams" .}}
- {{template "repo/settings/webhook/feishu" .}}
- {{template "repo/settings/webhook/matrix" .}}
- {{template "repo/settings/webhook/wechatwork" .}}
- {{template "repo/settings/webhook/packagist" .}}
- </div>
-
- {{template "repo/settings/webhook/history" .}}
- </div>
+ {{template "webhook/new" .}}
</div>
{{template "user/settings/layout_footer" .}}