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

_slack.html.haml « application_settings « admin « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e4f46fdf7f21ca717c10883c699228c2892170e9 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
- gitlab_com = Gitlab.com?
- expanded = integration_expanded?('slack_app_')

%section.settings.as-slack.no-animate#js-slack-settings{ class: ('expanded' if expanded) }
  .settings-header
    %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
      = s_('Integrations|GitLab for Slack app')
    = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
      = expanded ? _('Collapse') : _('Expand')
    %p
      = s_('SlackIntegration|Configure your GitLab for Slack app.')
      = link_to(_('Learn more.'), help_page_path('user/admin_area/settings/slack_app'), target: '_blank', rel: 'noopener noreferrer')

  .settings-content
    - unless gitlab_com
      %h5
        = s_('SlackIntegration|Step 1: Create your GitLab for Slack app')
      %p
        = s_('SlackIntegration|You must do this step only once.')
      %p
        = render Pajamas::ButtonComponent.new(href: slack_app_manifest_share_admin_application_settings_path) do
          = s_("SlackIntegration|Create Slack app")
      %hr
    %h5
      = s_('SlackIntegration|Step 2: Configure the app settings')
    %p
      - tag_pair_slack_apps = tag_pair(link_to('', 'https://api.slack.com/apps', target: '_blank', rel: 'noopener noreferrer'), :link_start, :link_end)
      - tag_pair_strong = tag_pair(tag.strong, :strong_open, :strong_close)
      = safe_format(s_('SlackIntegration|Copy the %{link_start}settings%{link_end} from %{strong_open}%{settings_heading}%{strong_close} in your GitLab for Slack app.'), tag_pair_slack_apps, tag_pair_strong, settings_heading: 'App Credentials')
      = link_to(_('Learn more.'), help_page_path('user/admin_area/settings/slack_app', anchor: 'configure-the-settings'), target: '_blank', rel: 'noopener noreferrer')
    = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-slack-settings'), html: { class: 'fieldset-form' } do |f|
      = form_errors(@application_setting) if expanded
      %fieldset
        .form-group
          = f.gitlab_ui_checkbox_component :slack_app_enabled, s_('ApplicationSettings|Enable GitLab for Slack app')
        .form-group
          = f.label :slack_app_id, s_('SlackIntegration|Client ID'), class: 'label-bold'
          = f.text_field :slack_app_id, class: 'form-control gl-form-input'
        .form-group
          = f.label :slack_app_secret, s_('SlackIntegration|Client secret'), class: 'label-bold'
          = f.text_field :slack_app_secret, class: 'form-control gl-form-input'
          .form-text.text-muted
            = s_('SlackIntegration|Used for authenticating OAuth requests from the GitLab for Slack app.')
        .form-group
          = f.label :slack_app_signing_secret, s_('SlackIntegration|Signing secret'), class: 'label-bold'
          = f.text_field :slack_app_signing_secret, class: 'form-control gl-form-input'
          .form-text.text-muted
            = s_('SlackIntegration|Used for authenticating API requests from the GitLab for Slack app.')
        .form-group
          = f.label :slack_app_verification_token, s_('SlackIntegration|Verification token'), class: 'label-bold'
          = f.text_field :slack_app_verification_token, class: 'form-control gl-form-input'
          .form-text.text-muted
            = s_('SlackIntegration|Used only for authenticating slash commands from the GitLab for Slack app. This method of authentication is deprecated by Slack.')
      = f.submit _('Save changes'), pajamas_button: true

    - unless gitlab_com
      %hr
      %h5
        = s_('SlackIntegration|Update your Slack app')
      %p
        = s_('SlackIntegration|When GitLab releases new features for the GitLab for Slack app, you might have to manually update your copy to use the new features.')
        = link_to(_('Learn more.'), help_page_path('user/admin_area/settings/slack_app', anchor: 'update-the-gitlab-for-slack-app'), target: '_blank', rel: 'noopener noreferrer')
      %p
        = render Pajamas::ButtonComponent.new(href: slack_app_manifest_download_admin_application_settings_path, icon: 'download') do
          = s_("SlackIntegration|Download latest manifest file")