summaryrefslogtreecommitdiffstats
path: root/templates/repo/settings
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-28 23:36:13 +0800
committerUnknwon <u@gogs.io>2015-08-28 23:36:13 +0800
commitf509c59ac13dffdff6a246572de04150ee295314 (patch)
tree3be3923779cedce3058f28f1d32604226985be03 /templates/repo/settings
parenta541ca16b67d492340ac55b84ff190d2a52fc39d (diff)
downloadgitea-f509c59ac13dffdff6a246572de04150ee295314.tar.gz
gitea-f509c59ac13dffdff6a246572de04150ee295314.zip
new create webhook event
Diffstat (limited to 'templates/repo/settings')
-rw-r--r--templates/repo/settings/hook_history.tmpl2
-rw-r--r--templates/repo/settings/hook_settings.tmpl52
2 files changed, 46 insertions, 8 deletions
diff --git a/templates/repo/settings/hook_history.tmpl b/templates/repo/settings/hook_history.tmpl
index 4c5207ebf6..d81c317cb5 100644
--- a/templates/repo/settings/hook_history.tmpl
+++ b/templates/repo/settings/hook_history.tmpl
@@ -28,7 +28,7 @@
{{if .IsSucceed}}
<span class="ui green label">{{.ResponseInfo.Status}}</span>
{{else}}
- <span class="ui red label">500</span>
+ <span class="ui red label">{{.ResponseInfo.Status}}</span>
{{end}}
{{else}}
<span class="ui label">N/A</span>
diff --git a/templates/repo/settings/hook_settings.tmpl b/templates/repo/settings/hook_settings.tmpl
index c1435acca1..18a480e016 100644
--- a/templates/repo/settings/hook_settings.tmpl
+++ b/templates/repo/settings/hook_settings.tmpl
@@ -1,14 +1,52 @@
<div class="field">
<h4>{{.i18n.Tr "repo.settings.event_desc"}}</h4>
- <div class="grouped fields">
- <div class="field">
- <div class="ui radio checkbox checked">
- <input class="hidden" name="push_only" type="radio" {{if or .PageIsSettingsHooksNew .Webhook.PushOnly}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.event_push_only" | Str2html}}</label>
- </div>
- </div>
+ <div class="grouped event type fields">
+ <div class="field">
+ <div class="ui radio non-events checkbox">
+ <input class="hidden" name="events" type="radio" value="push_only" {{if or .PageIsSettingsHooksNew .Webhook.PushOnly}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.event_push_only" | Str2html}}</label>
+ </div>
+ </div>
+ <div class="field">
+ <div class="ui radio non-events checkbox">
+ <input class="hidden" name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.event_send_everything" | Str2html}}</label>
+ </div>
+ </div>
+ <div class="field">
+ <div class="ui radio events checkbox">
+ <input class="hidden" name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.event_choose" | Str2html}}</label>
+ </div>
+ </div>
</div>
+
+ <div class="events fields ui grid" {{if not .Webhook.ChooseEvents}}style="display:none"{{end}}>
+ <!-- Create -->
+ <div class="seven wide column">
+ <div class="field">
+ <div class="ui checkbox">
+ <input class="hidden" name="create" type="checkbox" tabindex="0" {{if .Webhook.Create}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.event_create"}}</label>
+ <span class="help">{{.i18n.Tr "repo.settings.event_create_desc"}}</span>
+ </div>
+ </div>
+ </div>
+ <!-- Push -->
+ <div class="seven wide column">
+ <div class="field">
+ <div class="ui checkbox">
+ <input class="hidden" name="push" type="checkbox" tabindex="0" {{if .Webhook.Push}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.event_push"}}</label>
+ <span class="help">{{.i18n.Tr "repo.settings.event_push_desc"}}</span>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
+
+<div class="ui divider"></div>
+
<div class="inline field">
<div class="ui checkbox">
<input class="hidden" name="active" type="checkbox" tabindex="0" {{if or .PageIsSettingsHooksNew .Webhook.IsActive}}checked{{end}}>