2013-03-18 13:35:27 -04:00
|
|
|
= render "projects/settings_nav"
|
2012-01-03 19:07:56 -05:00
|
|
|
|
2012-01-28 05:40:17 -05:00
|
|
|
- if can? current_user, :admin_project, @project
|
2012-04-26 13:43:12 -04:00
|
|
|
.alert.alert-info
|
|
|
|
%span
|
|
|
|
Post receive hooks for binding events when someone push to repository.
|
|
|
|
%br
|
2012-06-03 18:37:27 -04:00
|
|
|
Read more about web hooks
|
2012-08-10 18:07:50 -04:00
|
|
|
%strong #{link_to "here", help_web_hooks_path, class: "vlink"}
|
2012-01-08 06:20:20 -05:00
|
|
|
|
2012-08-23 17:04:43 -04:00
|
|
|
= form_for [@project, @hook], as: :hook, url: project_hooks_path(@project), html: { class: 'form-inline' } do |f|
|
2012-04-26 13:43:12 -04:00
|
|
|
-if @hook.errors.any?
|
2013-01-30 09:53:18 -05:00
|
|
|
.alert.alert-error
|
2012-04-26 13:43:12 -04:00
|
|
|
- @hook.errors.full_messages.each do |msg|
|
|
|
|
%p= msg
|
|
|
|
.clearfix
|
|
|
|
= f.label :url, "URL:"
|
|
|
|
.input
|
2012-08-10 18:07:50 -04:00
|
|
|
= f.text_field :url, class: "text_field xxlarge"
|
2012-04-26 13:43:12 -04:00
|
|
|
|
2013-03-14 16:24:27 -04:00
|
|
|
= f.submit "Add Web Hook", class: "btn btn-create"
|
2012-04-26 13:43:12 -04:00
|
|
|
%hr
|
2012-03-28 03:46:51 -04:00
|
|
|
|
2012-03-05 17:29:40 -05:00
|
|
|
-if @hooks.any?
|
2012-12-14 00:14:05 -05:00
|
|
|
%h3.page_title
|
|
|
|
Hooks (#{@hooks.count})
|
2012-04-26 13:43:12 -04:00
|
|
|
%br
|
2012-09-03 14:53:16 -04:00
|
|
|
%table
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th URL
|
|
|
|
%th
|
2012-03-05 17:29:40 -05:00
|
|
|
- @hooks.each do |hook|
|
|
|
|
%tr
|
|
|
|
%td
|
2012-12-14 00:14:05 -05:00
|
|
|
%span.badge.badge-info POST
|
2013-01-19 05:50:44 -05:00
|
|
|
→
|
|
|
|
%span.monospace= hook.url
|
2012-03-05 17:29:40 -05:00
|
|
|
%td
|
2013-01-30 09:40:43 -05:00
|
|
|
.pull-right
|
2013-01-29 15:29:21 -05:00
|
|
|
= link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped"
|
|
|
|
= link_to 'Remove', project_hook_path(@project, hook), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small grouped"
|