docbrown/app/views/users/_additional_authentication.html.erb
rhymes 2fff21f652
Add email panel to settings/account (#8727)
* Use crayons

* Add spec for Identity.email

* Refactor panels and ifs

* Update app/views/users/_account_providers_emails.html.erb

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Update app/views/users/_account_providers_emails.html.erb

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Update app/views/users/_account_providers_emails.html.erb

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
2020-06-18 13:08:46 +02:00

20 lines
763 B
Text

<% unless @user.authenticated_with_all_providers? %>
<div class="crayons-card mb-6 p-5">
<% authentication_enabled_providers.each do |provider| %>
<% unless @user.authenticated_through?(provider.provider_name) %>
<a
href="<%= provider.sign_in_path(state: "profile") %>"
class="crayons-btn crayons-btn--icon-left crayons-btn--brand-<%= provider.provider_name %> m-1"
data-no-instant>
<%= inline_svg_tag(
"#{provider.provider_name}.svg",
aria: true,
class: "crayons-icon",
title: provider.official_name,
) %>
Connect <%= provider.official_name %> Account
</a>
<% end %>
<% end %>
</div>
<% end %>