diff --git a/app/views/devise/shared/_links.html.slim b/app/views/devise/shared/_links.html.slim index 95d6004..58e0871 100644 --- a/app/views/devise/shared/_links.html.slim +++ b/app/views/devise/shared/_links.html.slim @@ -1,24 +1,16 @@ br - if controller_name != 'sessions' - = link_to t('sessions.sign_in'), new_session_path(resource_name) + = link_to t('sessions.sign_in'), new_user_session_path br - if devise_mapping.registerable? && controller_name != 'registrations' - = link_to t('registrations.sign_up'), new_registration_path(resource_name) + = link_to t('registrations.sign_up'), new_user_registration_path br - if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' - = link_to t('passwords.forgotten_password'), new_password_path(resource_name) + = link_to t('passwords.forgotten_password'), new_user_password_path br - if devise_mapping.confirmable? && controller_name != 'confirmations' - = link_to t('confirmations.did_not_receive_confirmation_instructions'), new_confirmation_path(resource_name) + = link_to t('confirmations.did_not_receive_confirmation_instructions'), new_user_confirmation_path br - -- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' - = link_to t('unlocks.did_not_receive_unlock_instructions'), new_unlock_path(resource_name) - br - -- if devise_mapping.omniauthable? - - resource_class.omniauth_providers.each do |provider| - = link_to t('sessions.sign_in_with', provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider) diff --git a/lib/open_fest/app/assets/javascripts/open_fest/application.js b/lib/open_fest/app/assets/javascripts/open_fest/application.js index 8913b40..646c5ab 100644 --- a/lib/open_fest/app/assets/javascripts/open_fest/application.js +++ b/lib/open_fest/app/assets/javascripts/open_fest/application.js @@ -10,4 +10,6 @@ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details // about supported directives. // +//= require jquery +//= require jquery_ujs //= require_tree . diff --git a/lib/open_fest/app/views/layouts/open_fest/application.html.erb b/lib/open_fest/app/views/layouts/open_fest/application.html.erb index 9efb4fc..a4d91b4 100644 --- a/lib/open_fest/app/views/layouts/open_fest/application.html.erb +++ b/lib/open_fest/app/views/layouts/open_fest/application.html.erb @@ -15,6 +15,7 @@ <%= render 'open_fest/shared/nav' %>
+ <%= render 'open_fest/shared/flash_messages' %> <%= yield %>
diff --git a/lib/open_fest/app/views/open_fest/shared/_flash_messages.slim b/lib/open_fest/app/views/open_fest/shared/_flash_messages.slim new file mode 100644 index 0000000..c94abd1 --- /dev/null +++ b/lib/open_fest/app/views/open_fest/shared/_flash_messages.slim @@ -0,0 +1,3 @@ +div#flash_messages + - flash.each do |key, value| + = content_tag :div, value, class: "flash #{key}" diff --git a/lib/open_fest/app/views/open_fest/users/registrations/edit.slim b/lib/open_fest/app/views/open_fest/users/registrations/edit.slim index 4a654e6..000a638 100644 --- a/lib/open_fest/app/views/open_fest/users/registrations/edit.slim +++ b/lib/open_fest/app/views/open_fest/users/registrations/edit.slim @@ -1,6 +1,6 @@ - content_for(:title) { t :edit_speaker_profile } -= simple_form_for(resource, wrapper: :default, as: resource_name, url: open_fest.user_registration_path, html: { method: :put, multipart: true }) do |f| += simple_form_for(resource, wrapper: :default, as: :user, url: user_registration_path, html: { method: :put, multipart: true }) do |f| .form_inputs h2.entry-title = t :personal_profile = f.error_notification diff --git a/lib/open_fest/app/views/open_fest/users/registrations/new.slim b/lib/open_fest/app/views/open_fest/users/registrations/new.slim index 2fe8223..6f7c3fe 100644 --- a/lib/open_fest/app/views/open_fest/users/registrations/new.slim +++ b/lib/open_fest/app/views/open_fest/users/registrations/new.slim @@ -2,7 +2,7 @@ h2.entry-title = t :registration -= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| += simple_form_for(resource, as: resource_name, url: user_registration_path) do |f| = f.error_notification .form-inputs diff --git a/lib/open_fest/app/views/open_fest/users/sessions/new.slim b/lib/open_fest/app/views/open_fest/users/sessions/new.slim index b53c4ae..baeef8e 100644 --- a/lib/open_fest/app/views/open_fest/users/sessions/new.slim +++ b/lib/open_fest/app/views/open_fest/users/sessions/new.slim @@ -2,7 +2,7 @@ h2.entry-title = t :login -= simple_form_for(resource, wrapper: :default, as: resource_name, url: session_path(resource_name), ) do |f| += simple_form_for(resource, wrapper: :default, as: resource_name, url: user_session_path) do |f| .form-inputs = f.input :email, required: false, autofocus: true, hint: false = f.input :password, required: false, hint: false diff --git a/lib/open_fest/app/views/open_fest/users/shared/_links.slim b/lib/open_fest/app/views/open_fest/users/shared/_links.slim index 6f66289..fc5cdbd 100644 --- a/lib/open_fest/app/views/open_fest/users/shared/_links.slim +++ b/lib/open_fest/app/views/open_fest/users/shared/_links.slim @@ -1,23 +1,15 @@ - if controller_name != 'sessions' - = link_to t(:enter), new_session_path(resource_name) + = link_to t(:enter), new_user_session_path br - if devise_mapping.registerable? && controller_name != 'registrations' - = link_to t(:registration), new_registration_path(resource_name) + = link_to t(:registration), new_user_registration_path br - if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' - = link_to t(:lostpass), new_password_path(resource_name) + = link_to t(:lostpass), new_user_password_path br - if devise_mapping.confirmable? && controller_name != 'confirmations' - = link_to t(:did_not_get_confirmation), new_confirmation_path(resource_name) + = link_to t(:did_not_get_confirmation), new_user_confirmation_path br - -- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' - = link_to t(:did_not_get_unlock), new_unlock_path(resource_name) - br - -- if devise_mapping.omniauthable? - - resource_class.omniauth_providers.each do |provider| - = link_to t(:login_with, with: @provider.to_s.titleize), omniauth_authorize_path(resource_name, provider)