Files
grecia/app/views/devise/_omniauth_form.html.erb
Javi Martín b1c2a4a9f2 Make it easier to add new omniauth buttons
Since we're using the exact same logic for all existing buttons, we can
just get the list of available ones and loop through them.
2020-07-27 14:47:42 +02:00

23 lines
799 B
Plaintext

<% if feature?(:twitter_login) || feature?(:facebook_login) || feature?(:google_login) %>
<div class="row">
<div class="small-12 column">
<div class="margin-bottom">
<strong><%= t("omniauth.info.#{action}") %></strong>
</div>
</div>
<% oauth_logins.each do |login| %>
<div class="small-12 medium-6 large-4 column end">
<%= link_to t("omniauth.#{login}.name"), send("user_#{login}_omniauth_authorize_path"),
title: t("omniauth.#{login}.#{action}"),
class: "button-#{login.to_s.delete_suffix("_oauth2")} button expanded",
method: :post %>
</div>
<% end %>
<div class="small-12 column auth-divider">
<span><%= t("omniauth.or_fill") %></span>
</div>
</div>
<% end %>