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

_providers.html.haml « accounts « profiles « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 73a437a0702e5b9629420d60ddb3f5ae4661891d (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
- button_class = 'btn btn-default gl-button gl-mb-3 gl-mr-3'

%label.label-bold
  = s_('Profiles|Connected Accounts')
  %p= s_('Profiles|Click on icon to activate signin with one of the following services')
  - providers.each do |provider|
    - unlink_allowed = unlink_provider_allowed?(provider)
    - link_allowed = link_provider_allowed?(provider)
    - has_icon = provider_has_icon?(provider)
    - if unlink_allowed || link_allowed
      - if auth_active?(provider)
        - if unlink_allowed
          = link_to unlink_profile_account_path(provider: provider), method: :delete, class: button_class do
            - if has_icon
              .social-provider-btn-image.gl-button-icon= provider_image_tag(provider)
            .gl-button-text
              = s_('Profiles|Disconnect %{provider}') % { provider: label_for_provider(provider) }
        - else
          %a{ class: button_class }
            .gl-button-text
              = s_('Profiles|%{provider} Active') % { provider: label_for_provider(provider) }
      - elsif link_allowed
        = link_to omniauth_authorize_path(:user, provider), method: :post, class: button_class do
          - if has_icon
            .social-provider-btn-image.gl-button-icon= provider_image_tag(provider)
          .gl-button-text
            = s_('Profiles|Connect %{provider}') % { provider: label_for_provider(provider) }
  = render_if_exists 'profiles/accounts/group_saml_unlink_buttons', group_saml_identities: group_saml_identities