frontend update

This commit is contained in:
2015-03-06 10:01:50 +01:00
parent e9b6cd627a
commit bbd3b0c6eb
7 changed files with 29 additions and 25 deletions
+9 -11
View File
@@ -1,6 +1,6 @@
GIT GIT
remote: git://github.com/bterkuile/cmtool.git remote: git://github.com/bterkuile/cmtool.git
revision: 2b0d4816b82ca202728893d5800f2fc13a17b63b revision: 35296aa6532effd401b959655d57b9e0daea5c7b
specs: specs:
cmtool (1.0.0) cmtool (1.0.0)
bourbon bourbon
@@ -70,7 +70,7 @@ GEM
active_attr (0.8.5) active_attr (0.8.5)
activemodel (>= 3.0.2, < 5.0) activemodel (>= 3.0.2, < 5.0)
activesupport (>= 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) active_model_serializers (0.9.0)
activemodel (>= 3.2) activemodel (>= 3.2)
activejob (4.2.0) activejob (4.2.0)
@@ -106,8 +106,7 @@ GEM
thor thor
builder (3.2.2) builder (3.2.2)
cancancan (1.10.1) cancancan (1.10.1)
capistrano (3.3.5) capistrano (3.4.0)
capistrano-stats (~> 1.1.0)
i18n i18n
rake (>= 10.0.0) rake (>= 10.0.0)
sshkit (~> 1.3) sshkit (~> 1.3)
@@ -122,7 +121,6 @@ GEM
capistrano-rvm (0.1.2) capistrano-rvm (0.1.2)
capistrano (~> 3.0) capistrano (~> 3.0)
sshkit (~> 1.2) sshkit (~> 1.2)
capistrano-stats (1.1.1)
capybara (2.4.4) capybara (2.4.4)
mime-types (>= 1.16) mime-types (>= 1.16)
nokogiri (>= 1.3.3) nokogiri (>= 1.3.3)
@@ -166,7 +164,7 @@ GEM
responders responders
thread_safe (~> 0.1) thread_safe (~> 0.1)
warden (~> 1.2.3) warden (~> 1.2.3)
devise-i18n (0.11.3) devise-i18n (0.11.4)
diff-lcs (1.2.5) diff-lcs (1.2.5)
docile (1.1.5) docile (1.1.5)
dotenv (1.0.2) dotenv (1.0.2)
@@ -206,7 +204,7 @@ GEM
emblem-source (0.3.18) emblem-source (0.3.18)
erubis (2.7.0) erubis (2.7.0)
eventmachine (1.0.7) eventmachine (1.0.7)
execjs (2.3.0) execjs (2.4.0)
factory_girl (4.5.0) factory_girl (4.5.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
factory_girl_rails (4.5.0) factory_girl_rails (4.5.0)
@@ -274,7 +272,7 @@ GEM
mini_magick (4.1.0) mini_magick (4.1.0)
mini_portile (0.6.2) mini_portile (0.6.2)
minitest (5.5.1) minitest (5.5.1)
multi_json (1.10.1) multi_json (1.11.0)
multi_xml (0.5.5) multi_xml (0.5.5)
multipart-post (2.0.0) multipart-post (2.0.0)
naught (1.0.0) naught (1.0.0)
@@ -393,7 +391,7 @@ GEM
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0) sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1) tilt (~> 1.1)
selenium-webdriver (2.45.0.dev3) selenium-webdriver (2.45.0)
childprocess (~> 0.5) childprocess (~> 0.5)
multi_json (~> 1.0) multi_json (~> 1.0)
rubyzip (~> 1.0) rubyzip (~> 1.0)
@@ -425,7 +423,7 @@ GEM
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
sshkit (1.6.1) sshkit (1.7.1)
colorize (>= 0.7.0) colorize (>= 0.7.0)
net-scp (>= 1.1.2) net-scp (>= 1.1.2)
net-ssh (>= 2.8.0) net-ssh (>= 2.8.0)
@@ -446,7 +444,7 @@ GEM
rspec (>= 2.14.0, < 4.0) rspec (>= 2.14.0, < 4.0)
tzinfo (1.2.2) tzinfo (1.2.2)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (2.7.0) uglifier (2.7.1)
execjs (>= 0.3.0) execjs (>= 0.3.0)
json (>= 1.8.0) json (>= 1.8.0)
warden (1.2.3) warden (1.2.3)
@@ -59,20 +59,20 @@ body
font-size: 14px font-size: 14px
font-family: $font-family-content font-family: $font-family-content
line-height: 1.5 line-height: 1.5
color: #848585 color: $text-color
position: relative position: relative
h1 h1
font-size: 28px font-size: 28px
padding: 0.5em 0 0.2em 0 padding: 0.5em 0 0.2em 0
line-height: 1.4 line-height: 1.4
font-family: $font-family-headers font-family: $font-family-headers
color: #AE571F color: $header-color
h2 h2
font-size: 24px font-size: 24px
padding: 0.5em 0 0.2em 0 padding: 0.5em 0 0.2em 0
line-height: 1.2 line-height: 1.2
font-family: $font-family-headers font-family: $font-family-headers
color: #AE571F color: $header-color
background-image: image-url('theme1/wall-bg.jpg') background-image: image-url('theme1/wall-bg.jpg')
background-position: center top background-position: center top
@@ -5,6 +5,8 @@ $content-max-width: 962px
$cth-height: 48px $cth-height: 48px
$green-original: #99CB23 $green-original: #99CB23
$green: #7BB459 //Heineken $green: #7BB459 //Heineken
$header-color: #AE571F
$text-color: #333
$font-family-content: Georgia, serif $font-family-content: Georgia, serif
@import font-awesome @import font-awesome
@import ./mixins @import ./mixins
+11
View File
@@ -22,6 +22,7 @@ private
headers['Access-Control-Allow-Methods'] = '*' headers['Access-Control-Allow-Methods'] = '*'
end end
#START CMTOOL
def authorize_cmtool def authorize_cmtool
redirect_to new_administrator_session_path, alert: t('general.unauthorized') unless current_administrator.present? redirect_to new_administrator_session_path, alert: t('general.unauthorized') unless current_administrator.present?
end end
@@ -34,6 +35,16 @@ private
:en :en
end 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 = {}) def broadcast_user(uid, event, data = {})
Qwaiter.broadcast_user uid, event, data Qwaiter.broadcast_user uid, event, data
end end
-8
View File
@@ -162,14 +162,6 @@ module ApplicationHelper
end end
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) def find_page(name)
Page.find_by_name_and_locale(name, I18n.locale) Page.find_by_name_and_locale(name, I18n.locale)
end end
+3 -3
View File
@@ -3,9 +3,9 @@
.footer-content-container .footer-content-container
.footer-content .footer-content
= yield :footer = 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 &copy; mozo.bar 2015 .footer-bottom &copy; mozo.bar 2015
+1
View File
@@ -179,6 +179,7 @@ Qwaiter::Application.routes.draw do
# /nl is not matched to pages#home with locale => nl # /nl is not matched to pages#home with locale => nl
get '/:locale' => 'pages#home', constraints: {locale: ALLOWED_LOCALES}, as: :go_to_locale get '/:locale' => 'pages#home', constraints: {locale: ALLOWED_LOCALES}, as: :go_to_locale
get '/sitemap(.:format)' => 'pages#sitemap'
#devise_scope :supplier do #devise_scope :supplier do
#get '/:locale/suppliers/sign_up' => 'registrations#new', constraints: {locale: ALLOWED_LOCALES} #get '/:locale/suppliers/sign_up' => 'registrations#new', constraints: {locale: ALLOWED_LOCALES}
#end #end