gitlabhq/app/views/admin/hooks/index.html.haml

40 lines
1.1 KiB
Plaintext
Raw Normal View History

2012-07-12 21:10:34 +02:00
.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"}
2012-07-12 21:10:34 +02:00
2012-08-23 23:04:43 +02:00
= form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-inline' } do |f|
2012-07-12 21:10:34 +02:00
-if @hook.errors.any?
2013-01-30 15:53:18 +01:00
.alert.alert-error
2012-07-12 21:10:34 +02:00
- @hook.errors.full_messages.each do |msg|
%p= msg
.clearfix
= f.label :url, "URL:"
.input
= f.text_field :url, class: "text_field xxlarge"
2012-07-12 21:10:34 +02:00
 
2013-01-29 21:18:19 +01:00
= f.submit "Add System Hook", class: "btn btn-primary"
2012-07-12 21:10:34 +02:00
%hr
-if @hooks.any?
%h3
Hooks
%small (#{@hooks.count})
%br
2012-09-03 20:53:16 +02:00
%table
2012-07-12 21:10:34 +02:00
%tr
%th URL
%th Method
%th
- @hooks.each do |hook|
%tr
%td
= link_to admin_hook_path(hook) do
%strong= hook.url
2013-01-30 15:40:43 +01:00
= link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small pull-right"
2012-07-12 21:10:34 +02:00
%td POST
%td
2013-01-30 15:40:43 +01:00
= link_to 'Remove', admin_hook_path(hook), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small pull-right"