gitlab-org--gitlab-foss/app/views/projects/hooks/index.html.haml

35 lines
1.2 KiB
Plaintext
Raw Normal View History

2012-01-28 10:40:17 +00:00
- if can? current_user, :admin_project, @project
2012-04-26 17:43:12 +00:00
.alert.alert-info
%span
Post receive hooks for binding events when someone push to repository.
%br
Read more about web hooks
%strong #{link_to "here", help_web_hooks_path, class: "vlink"}
2012-01-08 11:20:20 +00:00
2012-08-23 21:04:43 +00:00
= form_for [@project, @hook], as: :hook, url: project_hooks_path(@project), html: { class: 'form-inline' } do |f|
2012-04-26 17:43:12 +00:00
-if @hook.errors.any?
2013-01-30 14:53:18 +00:00
.alert.alert-error
2012-04-26 17:43:12 +00:00
- @hook.errors.full_messages.each do |msg|
%p= msg
.control-group
2012-04-26 17:43:12 +00:00
= f.label :url, "URL:"
.controls
2013-08-08 08:57:34 +00:00
= f.text_field :url, class: "text_field input-xxlarge input-xpadding", placeholder: 'http://example.com/trigger-ci.json'
2012-04-26 17:43:12 +00:00
 
= f.submit "Add Web Hook", class: "btn btn-create"
2012-04-26 17:43:12 +00:00
%hr
2012-03-05 22:29:40 +00:00
-if @hooks.any?
2013-06-19 19:55:49 +00:00
.ui-box
2013-07-13 17:36:21 +00:00
.title
2013-06-19 19:55:49 +00:00
Hooks (#{@hooks.count})
%ul.well-list
- @hooks.each do |hook|
%li
%span.badge.badge-info POST
→
%span.monospace= hook.url
2013-01-30 14:40:43 +00:00
.pull-right
2013-01-29 20:29:21 +00: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"