diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-07-02 17:33:38 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-07-23 16:20:12 +0300 |
commit | 70a3c165a9f3882a82cf8946a783ace091635797 (patch) | |
tree | 2d09f34639859b2eadf5b648ac42f55b2419ceb2 /app/views/devise/shared/_omniauth_box.html.haml | |
parent | 5dd4dea93baa6386ed860a50125dce3ca3890f16 (diff) |
Allow custom label to be set for authentication providers.
Diffstat (limited to 'app/views/devise/shared/_omniauth_box.html.haml')
-rw-r--r-- | app/views/devise/shared/_omniauth_box.html.haml | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/views/devise/shared/_omniauth_box.html.haml b/app/views/devise/shared/_omniauth_box.html.haml index f8ba9d80ae8..ecf680e7b23 100644 --- a/app/views/devise/shared/_omniauth_box.html.haml +++ b/app/views/devise/shared/_omniauth_box.html.haml @@ -1,10 +1,8 @@ %p %span.light Sign in with - - providers = additional_providers + - providers = button_based_providers - providers.each do |provider| %span.light - - if default_providers.include?(provider) - = link_to oauth_image_tag(provider), omniauth_authorize_path(resource_name, provider), method: :post, class: 'oauth-image-link' - - else - = link_to provider.to_s.titleize, omniauth_authorize_path(resource_name, provider), method: :post, class: "btn", "data-no-turbolink" => "true" + - has_icon = provider_has_icon?(provider) + = link_to provider_image_tag(provider), user_omniauth_authorize_path(provider), method: :post, class: (has_icon ? 'oauth-image-link' : 'btn'), "data-no-turbolink" => "true" |