diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/footer.tmpl | 18 | ||||
-rw-r--r-- | templates/base/head.tmpl | 18 | ||||
-rw-r--r-- | templates/repo/settings/hook_history.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/hook_settings.tmpl | 52 |
4 files changed, 64 insertions, 26 deletions
diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl index b643850889..a8176b50de 100644 --- a/templates/base/footer.tmpl +++ b/templates/base/footer.tmpl @@ -26,4 +26,22 @@ </div> </footer> </body> + + <!-- Third-party libraries --> + {{if .RequireHighlightJS}} + <link rel="stylesheet" href="{{AppSubUrl}}/css/highlight-8.7/default.css"> + <script src="{{AppSubUrl}}/js/libs/highlight-8.7.pack.js"></script> + {{end}} + {{if .RequireMinicolors}} + <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors-2.1.12.css"> + <script src="{{AppSubUrl}}/js/libs/jquery.minicolors-2.1.12.min.js"></script> + {{end}} + {{if .RequireDatetimepicker}} + <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.datetimepicker-2.4.5.css"> + <script src="{{AppSubUrl}}/js/libs/jquery.datetimepicker-2.4.5.js"></script> + {{end}} + {{if .RequireDropzone}} + <link rel="stylesheet" href="{{AppSubUrl}}/css/dropzone-4.0.1.css"> + <script src="{{AppSubUrl}}/js/libs/dropzone-4.0.1.js"></script> + {{end}} </html>
\ No newline at end of file diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 8657a52362..ebf98b891d 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -25,24 +25,6 @@ <script src="{{AppSubUrl}}/js/semantic-2.0.8.min.js"></script> <script src="{{AppSubUrl}}/js/gogs.js?v={{AppVer}}"></script> - <!-- Third-party libraries --> - {{if .RequireHighlightJS}} - <link rel="stylesheet" href="{{AppSubUrl}}/css/highlight-8.7/default.css"> - <script src="{{AppSubUrl}}/js/libs/highlight-8.7.pack.js"></script> - {{end}} - {{if .RequireMinicolors}} - <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors-2.1.12.css"> - <script src="{{AppSubUrl}}/js/libs/jquery.minicolors-2.1.12.min.js"></script> - {{end}} - {{if .RequireDatetimepicker}} - <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.datetimepicker-2.4.5.css"> - <script src="{{AppSubUrl}}/js/libs/jquery.datetimepicker-2.4.5.js"></script> - {{end}} - {{if .RequireDropzone}} - <link rel="stylesheet" href="{{AppSubUrl}}/css/dropzone-4.0.1.css"> - <script src="{{AppSubUrl}}/js/libs/dropzone-4.0.1.js"></script> - {{end}} - <title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title> </head> <body> 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}}> |