summaryrefslogtreecommitdiff
path: root/app/views/admin/hooks/index.html.haml
diff options
context:
space:
mode:
authorValeriy Sizov <vsv2711@gmail.com>2012-07-12 22:10:34 +0300
committerValeriy Sizov <vsv2711@gmail.com>2012-07-19 00:25:10 +0300
commitc38578428b19b6375f24266ea5f4a98ca290eb58 (patch)
treea4a9a975f6baed118a011805e5d1da7d73b06f8a /app/views/admin/hooks/index.html.haml
parent65dc68b35c0ad455336abf33def5d920166f7c83 (diff)
downloadgitlab-ce-c38578428b19b6375f24266ea5f4a98ca290eb58.tar.gz
System Hooks: CRUD has done
Diffstat (limited to 'app/views/admin/hooks/index.html.haml')
-rw-r--r--app/views/admin/hooks/index.html.haml39
1 files changed, 39 insertions, 0 deletions
diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml
new file mode 100644
index 00000000000..030e6136b1f
--- /dev/null
+++ b/app/views/admin/hooks/index.html.haml
@@ -0,0 +1,39 @@
+.alert.alert-info
+ %span
+ Post receive hooks for binding events.
+ %br
+ Read more about system hooks
+ %strong #{link_to "here", help_system_hooks_path, :class => "vlink"}
+
+= form_for @hook, :as => :hook, :url => admin_hooks_path do |f|
+ -if @hook.errors.any?
+ .alert-message.block-message.error
+ - @hook.errors.full_messages.each do |msg|
+ %p= msg
+ .clearfix
+ = f.label :url, "URL:"
+ .input
+ = f.text_field :url, :class => "text_field xxlarge"
+ &nbsp;
+ = f.submit "Add System Hook", :class => "btn primary"
+%hr
+
+-if @hooks.any?
+ %h3
+ Hooks
+ %small (#{@hooks.count})
+ %br
+ %table.admin-table
+ %tr
+ %th URL
+ %th Method
+ %th
+ - @hooks.each do |hook|
+ %tr
+ %td
+ = link_to admin_hook_path(hook) do
+ %strong= hook.url
+ = link_to 'Test Hook', admin_hook_test_path(hook), :class => "btn small right"
+ %td POST
+ %td
+ = link_to 'Remove', admin_hook_path(hook), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn small right"