summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorFuXiaoHei <fuxiaohei@hexiaz.com>2014-05-02 22:07:34 +0800
committerFuXiaoHei <fuxiaohei@hexiaz.com>2014-05-02 22:07:34 +0800
commit3e856928a2254c6409bf9370c88731fce8efc974 (patch)
tree6051cc8ffa82855299b54945dc9f87c5e9e40fa0 /routers
parent8bbaf9550aa6bbf0eef0105301545c6ab9287115 (diff)
downloadgitea-3e856928a2254c6409bf9370c88731fce8efc974.tar.gz
gitea-3e856928a2254c6409bf9370c88731fce8efc974.zip
add webhooks page ui
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/setting.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go
index 8f7b84b694..aee3fe3a1d 100644
--- a/routers/repo/setting.go
+++ b/routers/repo/setting.go
@@ -204,3 +204,25 @@ func CollaborationPost(ctx *middleware.Context) {
ctx.Flash.Success("New collaborator has been added.")
ctx.Redirect(ctx.Req.RequestURI)
}
+
+func WebHooks(ctx *middleware.Context) {
+ if !ctx.Repo.IsOwner {
+ ctx.Handle(404, "repo.WebHooks", nil)
+ return
+ }
+
+ ctx.Data["IsRepoToolbarWebHooks"] = true
+ ctx.Data["Title"] = strings.TrimPrefix(ctx.Repo.RepoLink, "/") + " - Web Hooks"
+ ctx.HTML(200, "repo/hooks")
+}
+
+func WebHooksAdd(ctx *middleware.Context) {
+ if !ctx.Repo.IsOwner {
+ ctx.Handle(404, "repo.WebHooksAdd", nil)
+ return
+ }
+
+ ctx.Data["IsRepoToolbarWebHooks"] = true
+ ctx.Data["Title"] = strings.TrimPrefix(ctx.Repo.RepoLink, "/") + " - Add Web Hook"
+ ctx.HTML(200, "repo/hooks_add")
+}