Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_index.html.haml « web_hooks « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0ea6a0307baf97845c8b03204e6d0fe9f63409f0 (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
= render Pajamas::CardComponent.new(card_options: { id: 'webhooks-index', class: 'gl-new-card js-toggle-container' }, header_options: { class: 'gl-new-card-header'}, body_options: { class: 'gl-new-card-body'}) do |c|
  - c.with_header do
    .gl-new-card-title-wrapper
      %h3.gl-new-card-title
        = hook_class.underscore.humanize.titleize.pluralize
        %span.gl-new-card-count
          = sprite_icon('hook', css_class: 'gl-mr-2')
          #{hooks.size}
    = render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'js-toggle-button js-toggle-content' }) do
      = _('Add new webhook')
  - c.with_body do
    .gl-new-card-content
      = gitlab_ui_form_for @hook, as: :hook, url: url, html: { class: 'js-webhook-form gl-new-card-add-form gl-mb-3 gl-display-none js-toggle-content' } do |f|
        = render partial: partial, locals: { form: f, hook: @hook }
        = f.submit _('Add webhook'), pajamas_button: true, data: { qa_selector: "create_webhook_button" }
        = render Pajamas::ButtonComponent.new(button_options: { type: 'reset', class: 'js-webhook-edit-close gl-ml-2 js-toggle-button' }) do
          = _('Cancel')
      - if hooks.any?
        %ul.content-list{ class: 'gl-my-n3!' }
          - hooks.each do |hook|
            = render 'shared/web_hooks/hook', hook: hook
      - else
        %p.gl-new-card-empty.gl-text-center
          = _('No webhooks enabled. Select trigger events above.')