diff options
author | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-05-02 22:07:34 +0800 |
---|---|---|
committer | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-05-02 22:07:34 +0800 |
commit | 3e856928a2254c6409bf9370c88731fce8efc974 (patch) | |
tree | 6051cc8ffa82855299b54945dc9f87c5e9e40fa0 /routers | |
parent | 8bbaf9550aa6bbf0eef0105301545c6ab9287115 (diff) | |
download | gitea-3e856928a2254c6409bf9370c88731fce8efc974.tar.gz gitea-3e856928a2254c6409bf9370c88731fce8efc974.zip |
add webhooks page ui
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/setting.go | 22 |
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") +} |