%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
  .control-group
    = f.label :url, "URL:"
    .controls
      = f.text_field :url, class: "text_field input-xxlarge input-xpadding"
      &nbsp;
      = f.submit "Add System Hook", class: "btn btn-create"
%hr

-if @hooks.any?
  %h3
    Hooks
    %small (#{@hooks.count})
  %br
  %table
    %tr
      %th URL
      %th Method
      %th
    - @hooks.each do |hook|
      %tr
        %td
          = link_to admin_hook_path(hook) do
            %strong= hook.url
          = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small pull-right"
        %td POST
        %td
          = link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-remove btn-small pull-right"

%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
  .control-group
    = f.label :url, "URL:"
    .controls
      = f.text_field :url, class: "text_field input-xxlarge input-xpadding"
      &nbsp;
      = 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

Fix broken UI for admin system hooks
Fix broken UI for admin system hooks

Signed-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>
