File: _form.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (29 lines) | stat: -rw-r--r-- 1,743 bytes parent folder | download
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
- if lookup_context.template_exists?('top', "shared/integrations/#{integration.to_param}", true)
  = render "shared/integrations/#{integration.to_param}/top", integration: integration

- if integration.activate_disabled_reason.present? && integration.activate_disabled_reason[:trackers].any?
  -# When using integration.activate_disabled_reason[:trackers], it's potentially insecure to use the raw records
  -# when passed directly to the frontend. Only use specific fields that are needed for render.
  -# For example, we can get the link to each tracker with scoped_edit_integration_path(tracker, tracker.project)
  = render Pajamas::AlertComponent.new(title: s_('ExternalIssueIntegration|Another issue tracker is already in use'),
    variant: :warning,
    dismissible: false) do |c|
    - c.with_body do
      = s_('ExternalIssueIntegration|Only one issue tracker integration can be active at a time. Please disable the active tracker first and try again.')

- if integration.to_param === 'slack'
  = render 'shared/integrations/slack_notifications_deprecation_alert'

.gl-flex.gl-items-center.gl-gap-3
  = render Pajamas::AvatarComponent.new(integration, size: 64, alt: '')
  %h2.gl-m-0
    = integration.title
    - if integration.operating?
      = render Pajamas::BadgeComponent.new(_('Active'), variant: 'success', icon: 'status-success')
    - elsif integration.persisted?
      = render Pajamas::BadgeComponent.new(_('Inactive'), variant: 'neutral', icon: 'status-paused')

= render 'shared/integration_settings', integration: integration
- if lookup_context.template_exists?('show', "shared/integrations/#{integration.to_param}", true)
  %hr
  = render "shared/integrations/#{integration.to_param}/show", integration: integration