diff --git a/Gemfile.lock b/Gemfile.lock index 048c0ce9..17e34a19 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/bterkuile/cmtool.git - revision: 2b0d4816b82ca202728893d5800f2fc13a17b63b + revision: 35296aa6532effd401b959655d57b9e0daea5c7b specs: cmtool (1.0.0) bourbon @@ -70,7 +70,7 @@ GEM active_attr (0.8.5) activemodel (>= 3.0.2, < 5.0) activesupport (>= 3.0.2, < 5.0) - active_decorator (0.5.0) + active_decorator (0.5.1) active_model_serializers (0.9.0) activemodel (>= 3.2) activejob (4.2.0) @@ -106,8 +106,7 @@ GEM thor builder (3.2.2) cancancan (1.10.1) - capistrano (3.3.5) - capistrano-stats (~> 1.1.0) + capistrano (3.4.0) i18n rake (>= 10.0.0) sshkit (~> 1.3) @@ -122,7 +121,6 @@ GEM capistrano-rvm (0.1.2) capistrano (~> 3.0) sshkit (~> 1.2) - capistrano-stats (1.1.1) capybara (2.4.4) mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -166,7 +164,7 @@ GEM responders thread_safe (~> 0.1) warden (~> 1.2.3) - devise-i18n (0.11.3) + devise-i18n (0.11.4) diff-lcs (1.2.5) docile (1.1.5) dotenv (1.0.2) @@ -206,7 +204,7 @@ GEM emblem-source (0.3.18) erubis (2.7.0) eventmachine (1.0.7) - execjs (2.3.0) + execjs (2.4.0) factory_girl (4.5.0) activesupport (>= 3.0.0) factory_girl_rails (4.5.0) @@ -274,7 +272,7 @@ GEM mini_magick (4.1.0) mini_portile (0.6.2) minitest (5.5.1) - multi_json (1.10.1) + multi_json (1.11.0) multi_xml (0.5.5) multipart-post (2.0.0) naught (1.0.0) @@ -393,7 +391,7 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (~> 1.1) - selenium-webdriver (2.45.0.dev3) + selenium-webdriver (2.45.0) childprocess (~> 0.5) multi_json (~> 1.0) rubyzip (~> 1.0) @@ -425,7 +423,7 @@ GEM actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) - sshkit (1.6.1) + sshkit (1.7.1) colorize (>= 0.7.0) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) @@ -446,7 +444,7 @@ GEM rspec (>= 2.14.0, < 4.0) tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (2.7.0) + uglifier (2.7.1) execjs (>= 0.3.0) json (>= 1.8.0) warden (1.2.3) diff --git a/app/assets/stylesheets/theme1/_theme_structure.css.sass b/app/assets/stylesheets/theme1/_theme_structure.css.sass index 59f7de3f..7ee46607 100644 --- a/app/assets/stylesheets/theme1/_theme_structure.css.sass +++ b/app/assets/stylesheets/theme1/_theme_structure.css.sass @@ -59,20 +59,20 @@ body font-size: 14px font-family: $font-family-content line-height: 1.5 - color: #848585 + color: $text-color position: relative h1 font-size: 28px padding: 0.5em 0 0.2em 0 line-height: 1.4 font-family: $font-family-headers - color: #AE571F + color: $header-color h2 font-size: 24px padding: 0.5em 0 0.2em 0 line-height: 1.2 font-family: $font-family-headers - color: #AE571F + color: $header-color background-image: image-url('theme1/wall-bg.jpg') background-position: center top diff --git a/app/assets/stylesheets/theme1/application.css.sass b/app/assets/stylesheets/theme1/application.css.sass index 06ec1ff4..354bd154 100644 --- a/app/assets/stylesheets/theme1/application.css.sass +++ b/app/assets/stylesheets/theme1/application.css.sass @@ -5,6 +5,8 @@ $content-max-width: 962px $cth-height: 48px $green-original: #99CB23 $green: #7BB459 //Heineken +$header-color: #AE571F +$text-color: #333 $font-family-content: Georgia, serif @import font-awesome @import ./mixins diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9223903a..deb4cea6 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -22,6 +22,7 @@ private headers['Access-Control-Allow-Methods'] = '*' end + #START CMTOOL def authorize_cmtool redirect_to new_administrator_session_path, alert: t('general.unauthorized') unless current_administrator.present? end @@ -34,6 +35,16 @@ private :en end + def page_path(record, locale: I18n.locale) + str = case record + when Page then record.name + else record + end + go_to_path(str, locale: locale) + end + helper_method :page_path + #END CMTOOL + def broadcast_user(uid, event, data = {}) Qwaiter.broadcast_user uid, event, data end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 277b64f8..9204fae0 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -162,14 +162,6 @@ module ApplicationHelper end end - def page_path(record) - str = case record - when Page then record.name - else record - end - go_to_path(str, locale: I18n.locale) - end - def find_page(name) Page.find_by_name_and_locale(name, I18n.locale) end diff --git a/app/views/theme1/_footer.html.slim b/app/views/theme1/_footer.html.slim index 7e26b8b3..fe64d911 100644 --- a/app/views/theme1/_footer.html.slim +++ b/app/views/theme1/_footer.html.slim @@ -3,9 +3,9 @@ .footer-content-container .footer-content = yield :footer - = link_to 'disclaimer', page_path('disclaimer') + = link_to 'disclaimer', go_to_path('disclaimer', locale: 'en') ' - = link_to 'privacy', page_path('privacy') + = link_to 'privacy', go_to_path('privacy', locale: 'en') ' - = link_to 'contact', page_path('contact') + = link_to 'contact', go_to_path('contact', locale: 'en') .footer-bottom © mozo.bar 2015 diff --git a/config/routes.rb b/config/routes.rb index 21d1189d..92fe62d5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -179,6 +179,7 @@ Qwaiter::Application.routes.draw do # /nl is not matched to pages#home with locale => nl get '/:locale' => 'pages#home', constraints: {locale: ALLOWED_LOCALES}, as: :go_to_locale + get '/sitemap(.:format)' => 'pages#sitemap' #devise_scope :supplier do #get '/:locale/suppliers/sign_up' => 'registrations#new', constraints: {locale: ALLOWED_LOCALES} #end