Files
grecia/app/views/devise/_omniauth_form.html.erb
2017-01-17 19:13:31 +01:00

79 lines
2.9 KiB
Plaintext

<% if feature?(:twitter_login) || feature?(:facebook_login) || feature?(:google_login) %>
<% if current_page?(new_user_session_path) %>
<div class="row">
<div class="small-12 column">
<div class="margin-bottom">
<strong><%= t("omniauth.info_sign_in") %></strong>
</div>
</div>
<% if feature? :twitter_login %>
<div class="small-12 medium-6 large-4 column end">
<%= link_to t("omniauth.twitter.name"), user_omniauth_authorize_path(:twitter),
title: t("omniauth.twitter.sign_in"),
class: "button-twitter button expanded" %>
</div>
<% end %>
<% if feature? :facebook_login %>
<div class="small-12 medium-6 large-4 column end">
<%= link_to t("omniauth.facebook.name"), user_omniauth_authorize_path(:facebook),
title: t("omniauth.facebook.sign_in"),
class: "button-facebook button expanded" %>
</div>
<% end %>
<% if feature? :google_login %>
<div class="small-12 medium-6 large-4 column end">
<%= link_to t("omniauth.google_oauth2.name"), user_omniauth_authorize_path(:google_oauth2),
title: t("omniauth.google_oauth2.sign_in"),
class: "button-google button expanded" %>
</div>
<% end %>
<div class="small-12 column auth-divider">
<span><%= t("omniauth.or_fill") %></span>
</div>
</div>
<% elsif current_page?(new_user_registration_path) %>
<div class="row">
<div class="small-12 column">
<div class="margin-bottom">
<strong><%= t("omniauth.info_sign_up") %></strong>
</div>
</div>
<% if feature? :twitter_login %>
<div class="small-12 medium-6 large-4 column end">
<%= link_to t("omniauth.twitter.name"), user_omniauth_authorize_path(:twitter),
title: t("omniauth.twitter.sign_up"),
class: "button-twitter button expanded" %>
</div>
<% end %>
<% if feature? :facebook_login %>
<div class="small-12 medium-6 large-4 column end">
<%= link_to t("omniauth.facebook.name"), user_omniauth_authorize_path(:facebook),
title: t("omniauth.facebook.sign_up"),
class: "button-facebook button expanded" %>
</div>
<% end %>
<% if feature? :google_login %>
<div class="small-12 medium-6 large-4 column end">
<%= link_to t("omniauth.google_oauth2.name"), user_omniauth_authorize_path(:google_oauth2),
title: t("omniauth.google_oauth2.sign_up"),
class: "button-google button expanded" %>
</div>
<% end %>
<div class="small-12 column auth-divider">
<span><%= t("omniauth.or_fill") %></span>
</div>
</div>
<% end %>
<% end %>