From 503fa755ee7f5ec52e833a05fb640b1c16e89a5f Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 13 May 2014 14:45:49 +0200 Subject: move User Control Panel heading out of masthead the masthead can only handle content of a limited width. Alternatively we could make the masthead title wider and add padding on the left so it still aligns nicely with the mask. However the wider we make it the worse it looks on small width displays. Another option would be to make the masthead contain multiple lines. However vertical aligment to the middle of 1 OR 2 lines of text is a real pain. So I went with a super simple masthead and the Caption goes below. --- app/views/layouts/_header.html.haml | 2 +- app/views/layouts/_masthead.html.haml | 2 -- app/views/layouts/application.html.haml | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'app/views/layouts') diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 157f1df..a1dd47a 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -8,5 +8,5 @@ %li = link_to t(:logout), logout_path, :method => :delete - if @user && @show_navigation - .user_heading + .lead = @user.email_address diff --git a/app/views/layouts/_masthead.html.haml b/app/views/layouts/_masthead.html.haml index 35225a1..fde5915 100644 --- a/app/views/layouts/_masthead.html.haml +++ b/app/views/layouts/_masthead.html.haml @@ -2,5 +2,3 @@ .title %span.sitename %a{:href => home_path}= APP_CONFIG[:domain] - - if @show_navigation - = t(:user_control_panel) \ No newline at end of file diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 1cd4ec3..d213fe1 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -14,6 +14,9 @@ = render 'layouts/masthead' #main .container-fluid + - if @show_navigation + .row-fluid + %h1= t(:user_control_panel) - if logged_in? .row-fluid .span12 -- cgit v1.2.3 From 702e444e57d7904e429d1628e600d11e2e793a62 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 14 May 2014 19:47:26 +0200 Subject: check for presence of service_levels This way the pricing link will not be shown for an empty hash. Which is easier to get into the config file than nil. And we can later verify the configuration to have a hash as the service_levels. --- app/views/layouts/_footer.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/layouts') diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 5909bdd..340d36c 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -6,5 +6,5 @@ = link_to icon('info-sign') + t(:about), about_path - if lookup_context.exists?('pages/contact') = link_to icon('comment') + t(:contact), contact_path - - if APP_CONFIG[:service_levels] - = link_to icon('shopping-cart') + t(:pricing), pricing_path \ No newline at end of file + - if APP_CONFIG[:service_levels].present? + = link_to icon('shopping-cart') + t(:pricing), pricing_path -- cgit v1.2.3