System Hooks: CRUD has done
This commit is contained in:
parent
65dc68b35c
commit
c38578428b
9 changed files with 141 additions and 77 deletions
39
app/views/admin/hooks/index.html.haml
Normal file
39
app/views/admin/hooks/index.html.haml
Normal file
|
@ -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"
|
||||
|
||||
= 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"
|
Loading…
Add table
Add a link
Reference in a new issue