diff options
author | 无闻 <joe2010xtmf@163.com> | 2014-09-07 19:30:51 -0400 |
---|---|---|
committer | 无闻 <joe2010xtmf@163.com> | 2014-09-07 19:30:51 -0400 |
commit | e79e4b158090bf7c5dd86ac21cd0dbf44fbc82bd (patch) | |
tree | aec4d8a53265080363b3ab7a4423bc0820133ea5 /templates/org | |
parent | 40bc130b19cf71a997d5073a2587ea2649128bf8 (diff) | |
parent | f7be61c81935a30c21797351db5da32183e3188d (diff) | |
download | gitea-e79e4b158090bf7c5dd86ac21cd0dbf44fbc82bd.tar.gz gitea-e79e4b158090bf7c5dd86ac21cd0dbf44fbc82bd.zip |
Merge pull request #442 from compressed/org_hook
Organization-level Webhooks
Diffstat (limited to 'templates/org')
-rw-r--r-- | templates/org/settings/hook_new.tmpl | 37 | ||||
-rw-r--r-- | templates/org/settings/hooks.tmpl | 38 | ||||
-rw-r--r-- | templates/org/settings/nav.tmpl | 3 |
3 files changed, 77 insertions, 1 deletions
diff --git a/templates/org/settings/hook_new.tmpl b/templates/org/settings/hook_new.tmpl new file mode 100644 index 0000000000..6e7ee53604 --- /dev/null +++ b/templates/org/settings/hook_new.tmpl @@ -0,0 +1,37 @@ +{{template "ng/base/head" .}} +{{template "ng/base/header" .}} +{{template "org/base/header" .}} +<div id="setting-wrapper" class="main-wrapper"> + <div id="org-setting" class="container clear"> + {{template "org/settings/nav" .}} + <div class="grid-4-5 left"> + <div class="setting-content"> + {{template "ng/base/alert" .}} + <div id="setting-content"> + <div id="repo-hooks-panel" class="panel panel-radius"> + <div class="panel-header"> + <strong>{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}</strong> + </div> + {{template "repo/settings/hook_types" .}} + {{template "repo/settings/hook_gogs" .}} + {{template "repo/settings/hook_slack" .}} + </div> + </div> + {{if .PageIsSettingsHooksEdit}} + <br> + <div id="setting-content"> + <div id="repo-hooks-history-panel" class="panel panel-radius"> + <div class="panel-header"> + <strong>{{.i18n.Tr "repo.settings.recent_deliveries"}}</strong> + </div> + <ul class="panel-body setting-list"> + <li>Coming soon!</li> + </ul> + </div> + </div> + {{end}} + </div> + </div> + </div> +</div> +{{template "ng/base/footer" .}} diff --git a/templates/org/settings/hooks.tmpl b/templates/org/settings/hooks.tmpl new file mode 100644 index 0000000000..713cfeb457 --- /dev/null +++ b/templates/org/settings/hooks.tmpl @@ -0,0 +1,38 @@ +{{template "ng/base/head" .}} +{{template "ng/base/header" .}} +{{template "org/base/header" .}} +<div id="setting-wrapper" class="main-wrapper"> + <div id="org-setting" class="container clear"> + {{template "org/settings/nav" .}} + <div class="grid-4-5 left"> + <div class="setting-content"> + {{template "ng/base/alert" .}} + <div id="setting-content"> + <div id="repo-hooks-panel" class="panel panel-radius"> + <div class="panel-header"> + <a class="btn btn-small btn-black btn-header btn-radius right" href="{{.OrgLink}}/settings/hooks/new">{{.i18n.Tr "repo.settings.add_webhook"}}</a> + <strong>{{.i18n.Tr "repo.settings.hooks"}}</strong> + </div> + <ul class="panel-body setting-list"> + <li>{{.i18n.Tr "org.settings.hooks_desc" | Str2html}}</li> + {{range .Webhooks}} + <li> + {{if .IsActive}} + <span class="left text-success"><i class="octicon octicon-check"></i></span> + {{else}} + <span class="left text-grey"><i class="octicon octicon-primitive-dot"></i></span> + {{end}} + <a class="link" href="{{$.OrgLink}}/settings/hooks/{{.Id}}">{{.Url}}</a> + <a href="{{$.OrgLink}}/settings/hooks?remove={{.Id}}" class="text-red right"><i class="fa fa-times"></i></a> + <a href="{{$.OrgLink}}/settings/hooks/{{.Id}}" class="text-blue right"><i class="fa fa-pencil"></i></a> + </li> + {{end}} + </ul> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +{{template "ng/base/footer" .}} diff --git a/templates/org/settings/nav.tmpl b/templates/org/settings/nav.tmpl index 950569d686..954893c6c2 100644 --- a/templates/org/settings/nav.tmpl +++ b/templates/org/settings/nav.tmpl @@ -5,7 +5,8 @@ <div class="panel-body"> <ul class="menu menu-vertical switching-list grid-1-5 left"> <li {{if .PageIsSettingsOptions}}class="current"{{end}}><a href="/org/{{.Org.LowerName}}/settings">{{.i18n.Tr "org.settings.options"}}</a></li> + <li {{if .PageIsSettingsHooks}}class="current"{{end}}><a href="/org/{{.Org.LowerName}}/settings/hooks">{{.i18n.Tr "repo.settings.hooks"}}</a></li> <li {{if .PageIsSettingsDelete}}class="current"{{end}}><a href="/org/{{.Org.LowerName}}/settings/delete">{{.i18n.Tr "org.settings.delete"}}</a></li> </ul> </div> -</div>
\ No newline at end of file +</div> |