diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-02 21:38:32 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-04 13:37:17 +0200 |
commit | 0687ecb66d52868db27ef89a18e4109abc70b935 (patch) | |
tree | 762ed62b03345b179871ab5a48aaaada239d1096 /app/views/projects/hooks | |
parent | 169b4ce0ca2ef04d37deb6bdb054cb8124a9db61 (diff) | |
download | gitlab-ce-0687ecb66d52868db27ef89a18e4109abc70b935.tar.gz |
UI with event types for Project WebHooks
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/hooks')
-rw-r--r-- | app/views/projects/hooks/index.html.haml | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml index f748eb29294..e1166742b2e 100644 --- a/app/views/projects/hooks/index.html.haml +++ b/app/views/projects/hooks/index.html.haml @@ -1,9 +1,9 @@ %h3.page-title - Post-receive hooks + Web hooks %p.light - #{link_to "Post-receive hooks ", help_web_hooks_path, class: "vlink"} can be - used for binding events when someone pushes to the repository. + #{link_to "Web hooks ", help_web_hooks_path, class: "vlink"} can be + used for binding events when something happends to the the project. %hr.clearfix @@ -13,23 +13,50 @@ - @hook.errors.full_messages.each do |msg| %p= msg .control-group - = f.label :url, "URL:" + = f.label :url, "URL" .controls = f.text_field :url, class: "text_field input-xxlarge input-xpadding", placeholder: 'http://example.com/trigger-ci.json' = f.submit "Add Web Hook", class: "btn btn-create" + .control-group + = f.label :url, "Trigger" + .controls + %div + = f.check_box :push_events, class: 'pull-left' + .prepend-left-20 + = f.label :push_events, class: 'list-label' do + %strong Push events + %p.light + This url will be triggered in case of push to repository + %div + = f.check_box :issues_events, class: 'pull-left' + .prepend-left-20 + = f.label :issues_events, class: 'list-label' do + %strong Issues events + %p.light + This url will be triggered for created issues + %div + = f.check_box :merge_requests_events, class: 'pull-left' + .prepend-left-20 + = f.label :merge_requests_events, class: 'list-label' do + %strong Merge Request events + %p.light + This url will be triggered for created merge requests %hr -if @hooks.any? .ui-box .title - Hooks (#{@hooks.count}) + Web Hooks (#{@hooks.count}) %ul.well-list - @hooks.each do |hook| %li - %span.badge.badge-info POST - → - %span.monospace= hook.url .pull-right = 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" + .clearfix + %span.monospace= hook.url + %p + - %w(push_events issues_events merge_requests_events).each do |trigger| + - if hook.send(trigger) + %span.label.label-gray= trigger.titleize |