aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
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 /templates/repo
parent8bbaf9550aa6bbf0eef0105301545c6ab9287115 (diff)
downloadgitea-3e856928a2254c6409bf9370c88731fce8efc974.tar.gz
gitea-3e856928a2254c6409bf9370c88731fce8efc974.zip
add webhooks page ui
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/hooks.tmpl37
-rw-r--r--templates/repo/hooks_add.tmpl57
-rw-r--r--templates/repo/setting_nav.tmpl2
3 files changed, 95 insertions, 1 deletions
diff --git a/templates/repo/hooks.tmpl b/templates/repo/hooks.tmpl
new file mode 100644
index 0000000000..643686aae0
--- /dev/null
+++ b/templates/repo/hooks.tmpl
@@ -0,0 +1,37 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="body" class="container">
+ {{template "repo/setting_nav" .}}
+ <div id="repo-setting-container" class="col-md-10">
+ {{template "base/alert" .}}
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Webhooks
+ </div>
+ <div class="panel-body">
+ <p>Webhooks allow external services to be notified when certain events happen on GitHub. When the specified events happen, we'll send a POST request to each of the URLs you provide. Learn more in our Webhooks Guide.<br/>&nbsp;</p>
+ <ul id="repo-hooks-list" class="list-unstyled">
+ <li>
+ <span class="pull-left status text-success"><i class="fa fa-check"></i></span>
+ <a class="link" href="#">https://inbox-app.wercker.com/commits/11aea6e535af5eefc2a29bc25a23e89a</a>
+ <a href="{{$.RepoLink}}/settings/hooks?remove=" class="remove-hook pull-right"><i class="fa fa-times"></i></a>
+ <a href="{{$.RepoLink}}/settings/hooks/id" class="edit-hook pull-right"><i class="fa fa-pencil"></i></a>
+ </li>
+ <li>
+ <span class="pull-left status text-success"><i class="fa fa-check"></i></span>
+ <a class="link" href="#">https://inbox-app.wercker.com/commits/11aea6e535af5eefc2a29bc25a23e89a</a>
+ <a href="{{$.RepoLink}}/settings/hooks?remove=" class="remove-hook pull-right"><i class="fa fa-times"></i></a>
+ <a href="{{$.RepoLink}}/settings/hooks/id" class="edit-hook pull-right"><i class="fa fa-pencil"></i></a>
+ </li>
+ </ul>
+ </div>
+ <div class="panel-footer">
+ <a href="/{{.Owner.Name}}/{{.Repository.Name}}/settings/hooks/add"><button class="btn btn-primary">Add Webhook</button></a>
+ </div>
+ </div>
+
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/repo/hooks_add.tmpl b/templates/repo/hooks_add.tmpl
new file mode 100644
index 0000000000..174036d749
--- /dev/null
+++ b/templates/repo/hooks_add.tmpl
@@ -0,0 +1,57 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="body" class="container">
+ {{template "repo/setting_nav" .}}
+ <div id="repo-setting-container" class="col-md-10">
+ {{template "base/alert" .}}
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Add Webhook
+ </div>
+ <div class="panel-body">
+ <p>We’ll send a POST request to the URL below with details of any subscribed events.</p>
+ <hr/>
+ <form id="repo-hooks-add-form" action="/{{.Owner.Name}}/{{.Repository.Name}}/settings/hooks/add" method="post" class="col-md-7">
+ <div class="form-group">
+ <label for="payload-url">Payload URL</label>
+ <input id="payload-url" class="form-control" type="url" required="required" name="url"/>
+ </div>
+ <div class="form-group">
+ <label for="payload-version">Payload Version</label>
+ <select name="version" id="payload-version" class="form-control">
+ <option value="json">application/json</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <label for="payload-secret">Secret</label>
+ <input id="payload-secret" class="form-control" type="text" required="required" name="secret"/>
+ </div>
+ <hr/>
+ <div class="form-group">
+ <label>Which events would you like to trigger this webhook?</label>
+ <div class="radio">
+ <label>
+ <input class="form-control" type="radio" value="push" name="trigger"/> Just the <i>push</i> event.
+ </label>
+ </div>
+ </div>
+ <hr/>
+ <div class="form-group">
+ <label>
+ <input type="checkbox" name="active" value="Active" checked/>&nbsp;&nbsp;
+ Active
+ </label>
+ <p class="help-block">We will deliver event details when this hook is triggered.</p>
+ </div>
+ </form>
+ </div>
+ <div class="panel-footer">
+ <a href="/{{.Owner.Name}}/{{.Repository.Name}}/settings/hooks"><button class="btn btn-primary">Webhooks List</button></a>
+ </div>
+ </div>
+
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/repo/setting_nav.tmpl b/templates/repo/setting_nav.tmpl
index 4e558a76ef..489602b4cc 100644
--- a/templates/repo/setting_nav.tmpl
+++ b/templates/repo/setting_nav.tmpl
@@ -2,6 +2,6 @@
<ul class="list-group">
<li class="list-group-item{{if .IsRepoToolbarSetting}} active{{end}}"><a href="/{{.Owner.Name}}/{{.Repository.Name}}/settings">Options</a></li>
<li class="list-group-item{{if .IsRepoToolbarCollaboration}} active{{end}}"><a href="/{{.Owner.Name}}/{{.Repository.Name}}/settings/collaboration">Collaborators</a></li>
- <!--<li class="list-group-item"><a href="#">Notifications</a></li>-->
+ <li class="list-group-item{{if .IsRepoToolbarWebHooks}} active{{end}}"><a href="/{{.Owner.Name}}/{{.Repository.Name}}/settings/hooks">Webhooks</a></li>
</ul>
</div> \ No newline at end of file