summaryrefslogtreecommitdiff
path: root/app/views/admin/hooks/index.html.haml
blob: 681ba14f3d5f0741274832783e7f41b2b311d70d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
%h3.page-title
  System hooks

%p.light
  #{link_to "System hooks ", help_system_hooks_path, class: "vlink"} can be
  used for binding events when GitLab creates a User or Project.

%hr


= form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-inline' } do |f|
  -if @hook.errors.any?
    .alert.alert-error
      - @hook.errors.full_messages.each do |msg|
        %p= msg
  .form-group
    = f.label :url, "URL:"
    .col-sm-10
      = f.text_field :url, class: "text_field input-xxlarge input-xpadding"
       
      = f.submit "Add System Hook", class: "btn btn-create"
%hr

-if @hooks.any?
  .ui-box
    .title
      System hooks (#{@hooks.count})
    %ul.well-list
      - @hooks.each do |hook|
        %li
          .pull-right
            = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small"
            = link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-remove btn-small"
          = link_to admin_hook_path(hook) do
            %strong= hook.url