index.html.haml 1.4 KB
Newer Older
D
Douwe Maan 已提交
1
- page_title "System Hooks"
2
%h3.page-title
3
  System hooks
4 5

%p.light
6
  #{link_to "System hooks ", help_page_path("system_hooks", "system_hooks"), class: "vlink"} can be
7 8 9 10
  used for binding events when GitLab creates a User or Project.

%hr

V
Valeriy Sizov 已提交
11

D
Dmitriy Zaporozhets 已提交
12
= form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-horizontal' } do |f|
V
Valeriy Sizov 已提交
13
  -if @hook.errors.any?
D
Dmitriy Zaporozhets 已提交
14
    .alert.alert-danger
V
Valeriy Sizov 已提交
15 16
      - @hook.errors.full_messages.each do |msg|
        %p= msg
D
Dmitriy Zaporozhets 已提交
17
  .form-group
D
Dmitriy Zaporozhets 已提交
18
    = f.label :url, "URL:", class: 'control-label'
D
Dmitriy Zaporozhets 已提交
19
    .col-sm-10
D
Dmitriy Zaporozhets 已提交
20
      = f.text_field :url, class: "form-control"
21 22 23 24 25 26 27
  .form-group
    = f.label :enable_ssl_verification, "SSL verification", class: 'control-label checkbox'
    .col-sm-10
      .checkbox
        = f.label :enable_ssl_verification do
          = f.check_box :enable_ssl_verification
          %strong Enable SSL verification
D
Dmitriy Zaporozhets 已提交
28 29
  .form-actions
    = f.submit "Add System Hook", class: "btn btn-create"
V
Valeriy Sizov 已提交
30 31 32
%hr

-if @hooks.any?
33
  .panel.panel-default
34
    .panel-heading
35 36 37 38
      System hooks (#{@hooks.count})
    %ul.well-list
      - @hooks.each do |hook|
        %li
39
          .list-item-name
R
Robert Speicher 已提交
40
            %strong= hook.url
41
            %p SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"}
42

43
          .pull-right
D
Dmitriy Zaporozhets 已提交
44 45
            = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-sm"
            = link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-remove btn-sm"