Packages

A flexible authentication (and more) solution for Phoenix

Current section

Files

Jump to
haytni priv templates shared links.html.eex
Raw

priv/templates/shared/links.html.eex

<div class="form-group">
<%= if Haytni.plugin_enabled?(Haytni.AuthenticablePlugin) && HaytniWeb.Authenticable.SessionController != Phoenix.Controller.controller_module(@conn) do %>
<%= link dgettext("haytni", "Sign in"), to: session_path(@conn, :new) %><br />
<% end %>
<%= if Haytni.plugin_enabled?(Haytni.RegisterablePlugin) && HaytniWeb.Registerable.RegistrationController != Phoenix.Controller.controller_module(@conn) do %>
<%= link dgettext("haytni", "Sign up"), to: registration_path(@conn, :new) %><br />
<% end %>
<%= if Haytni.plugin_enabled?(Haytni.RecoverablePlugin) && HaytniWeb.Recoverable.PasswordController != Phoenix.Controller.controller_module(@conn) do %>
<%= link dgettext("haytni", "Forgot your password?"), to: password_path(@conn, :new) %><br />
<% end %>
<%= if Haytni.plugin_enabled?(Haytni.ConfirmablePlugin) && HaytniWeb.Confirmable.ConfirmationController != Phoenix.Controller.controller_module(@conn) do %>
<%= link dgettext("haytni", "Didn't receive confirmation instructions?"), to: confirmation_path(@conn, :new) %><br />
<% end %>
<%= if Haytni.plugin_enabled?(Haytni.LockablePlugin) && Haytni.LockablePlugin.email_strategy_enabled? && HaytniWeb.Lockable.UnlockController != Phoenix.Controller.controller_module(@conn) do %>
<%= link dgettext("haytni", "Didn't receive unlock instructions?"), to: unlock_path(@conn, :new) %><br />
<% end %>
<%#=
for {value, href} <- Haytni.shared_links(@TODO), into: [] do
link value, to: href
end
%>
</div>