From 0a1aa06f2cc3210276b530988fd3cd941d263e92 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Sun, 8 Mar 2015 10:29:41 +0100 Subject: [PATCH] Better page previews --- Gemfile.lock | 2 +- app/controllers/application_controller.rb | 2 +- app/views/theme1/_footer.html.slim | 4 ++-- app/views/theme1/_header.html.slim | 4 ++-- app/views/theme1/_social.html.slim | 4 ++-- config/environments/production.rb | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 09fb6f98..58c9c49c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/bterkuile/cmtool.git - revision: 6a191e5d07469853dfa508bf41f9321359f32a8c + revision: ba76940007a7ef373b651f1053cc1e516e186140 specs: cmtool (1.0.0) bourbon diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index deb4cea6..6eb8e577 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -24,7 +24,7 @@ private #START CMTOOL def authorize_cmtool - redirect_to new_administrator_session_path, alert: t('general.unauthorized') unless current_administrator.present? + redirect_to main_app.new_administrator_session_path, alert: t('general.unauthorized') unless current_administrator.present? end def cmtool_user diff --git a/app/views/theme1/_footer.html.slim b/app/views/theme1/_footer.html.slim index 02b6b6ee..9bd964d2 100644 --- a/app/views/theme1/_footer.html.slim +++ b/app/views/theme1/_footer.html.slim @@ -6,7 +6,7 @@ = yield :footer /= link_to 'disclaimer', go_to_path('disclaimer', locale: 'en') /' - = link_to 'privacy', go_to_path('privacy', locale: 'en') + = link_to 'privacy', main_app.go_to_path('privacy', locale: 'en') ' - = link_to 'contact', go_to_path('contact', locale: 'en') + = link_to 'contact', main_app.go_to_path('contact', locale: 'en') .footer-bottom © mozo.bar 2015 diff --git a/app/views/theme1/_header.html.slim b/app/views/theme1/_header.html.slim index 1303f623..a3c1b83c 100644 --- a/app/views/theme1/_header.html.slim +++ b/app/views/theme1/_header.html.slim @@ -9,8 +9,8 @@ .container #header #header-right= render 'theme1/social' - #logo= link_to image_tag('icons/logo-text.png', alt: application_title), root_path - = link_to t('devise.registrations.link'), new_suppliers_path, class: 'signup-button' + #logo= link_to image_tag('icons/logo-text.png', alt: application_title), main_app.root_path + = link_to t('devise.registrations.link'), main_app.new_suppliers_path, class: 'signup-button' #nav-wrap .navbar .navbar-inner= render 'theme1/navigation' diff --git a/app/views/theme1/_social.html.slim b/app/views/theme1/_social.html.slim index 31b14bef..0629d37f 100644 --- a/app/views/theme1/_social.html.slim +++ b/app/views/theme1/_social.html.slim @@ -1,6 +1,6 @@ -= link_to t('devise.sign_in.link'), new_employee_session_path, class: 'theme-button' += link_to t('devise.sign_in.link'), main_app.new_employee_session_path, class: 'theme-button' - Rails.configuration.i18n.available_locales.each do |locale| - = link_to locale, go_to_locale_path(locale), class: ['locale-link', I18n.locale == locale ? 'active' : nil] + = link_to locale, main_app.go_to_locale_path(locale), class: ['locale-link', I18n.locale == locale ? 'active' : nil] a.social-link.facebook href="https://www.facebook.com/mozo.bar" target=:_blank /a.wsite-social-twitter href="https://twitter.com/mozo.bar" target=:_blank span.wsite-social-inner diff --git a/config/environments/production.rb b/config/environments/production.rb index 6a6a356a..ed7bb8a0 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -11,7 +11,7 @@ Qwaiter::Application.configure do config.eager_load = true # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = true + config.consider_all_requests_local = false config.action_controller.perform_caching = false config.action_controller.action_on_unpermitted_parameters = :log