debian-mirror-gitlab/app/views/profiles/accounts/_providers.html.haml

29 lines
1.4 KiB
Text
Raw Normal View History

2021-03-11 19:13:27 +05:30
- button_class = 'btn btn-default gl-button gl-mb-3 gl-mr-3'
2019-07-07 11:18:12 +05:30
%label.label-bold
= s_('Profiles|Connected Accounts')
2022-04-04 11:22:00 +05:30
%p= s_('Profiles|Select a service to sign in with.')
2019-07-07 11:18:12 +05:30
- providers.each do |provider|
- unlink_allowed = unlink_provider_allowed?(provider)
- link_allowed = link_provider_allowed?(provider)
2022-01-26 12:08:38 +05:30
- has_icon = provider_has_icon?(provider)
2019-07-07 11:18:12 +05:30
- if unlink_allowed || link_allowed
2021-03-11 19:13:27 +05:30
- if auth_active?(provider)
- if unlink_allowed
= link_to unlink_profile_account_path(provider: provider), method: :delete, class: button_class do
2022-01-26 12:08:38 +05:30
- if has_icon
.social-provider-btn-image.gl-button-icon= provider_image_tag(provider)
2021-03-11 19:13:27 +05:30
.gl-button-text
2020-11-24 15:15:51 +05:30
= s_('Profiles|Disconnect %{provider}') % { provider: label_for_provider(provider) }
2021-03-11 19:13:27 +05:30
- else
%a{ class: button_class }
.gl-button-text
2020-11-24 15:15:51 +05:30
= s_('Profiles|%{provider} Active') % { provider: label_for_provider(provider) }
2021-03-11 19:13:27 +05:30
- elsif link_allowed
= link_to omniauth_authorize_path(:user, provider), method: :post, class: button_class do
2022-01-26 12:08:38 +05:30
- if has_icon
.social-provider-btn-image.gl-button-icon= provider_image_tag(provider)
2021-03-11 19:13:27 +05:30
.gl-button-text
2020-11-24 15:15:51 +05:30
= s_('Profiles|Connect %{provider}') % { provider: label_for_provider(provider) }
2019-07-07 11:18:12 +05:30
= render_if_exists 'profiles/accounts/group_saml_unlink_buttons', group_saml_identities: group_saml_identities