diff options
author | David Gay <david@davidgay.org> | 2021-04-25 13:07:25 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-04-25 13:07:25 -0400 |
commit | 8b517ea5ac6301bd513c18632aa34ce91545dd95 (patch) | |
tree | 7b4dc6f1e6d303ec6f5b02a27151c088bf5c72af /app/views/devise/shared | |
parent | 10f7bb7deb784be697aaff629d10b61d9cfe739d (diff) |
Adjust devise routes, views, and language
Diffstat (limited to 'app/views/devise/shared')
-rw-r--r-- | app/views/devise/shared/_error_messages.html.erb | 15 | ||||
-rw-r--r-- | app/views/devise/shared/_links.html.erb | 25 |
2 files changed, 40 insertions, 0 deletions
diff --git a/app/views/devise/shared/_error_messages.html.erb b/app/views/devise/shared/_error_messages.html.erb new file mode 100644 index 0000000..ba7ab88 --- /dev/null +++ b/app/views/devise/shared/_error_messages.html.erb @@ -0,0 +1,15 @@ +<% if resource.errors.any? %> + <div id="error_explanation"> + <h2> + <%= I18n.t("errors.messages.not_saved", + count: resource.errors.count, + resource: resource.class.model_name.human.downcase) + %> + </h2> + <ul> + <% resource.errors.full_messages.each do |message| %> + <li><%= message %></li> + <% end %> + </ul> + </div> +<% end %> diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb new file mode 100644 index 0000000..b87eaef --- /dev/null +++ b/app/views/devise/shared/_links.html.erb @@ -0,0 +1,25 @@ +<%- if controller_name != 'sessions' %> + <%= link_to "Log in", new_session_path(resource_name) %><br /> +<% end %> + +<%#- if devise_mapping.registerable? && controller_name != 'registrations' %> +<!-- <%#= link_to "Register", new_registration_path(resource_name) %><br />--> +<%# end %> + +<%#- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> +<!-- <%#= link_to "Forgot your password?", new_password_path(resource_name) %><br />--> +<%# end %> + +<%#- if devise_mapping.confirmable? && controller_name != 'confirmations' %> +<!-- <%#= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />--> +<%# end %> + +<%#- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> +<!-- <%#= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />--> +<%# end %> + +<%- if devise_mapping.omniauthable? %> + <%- resource_class.omniauth_providers.each do |provider| %> + <%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %><br /> + <% end %> +<% end %> |