From 3f51128e24e1ca3247169066aa6a03090df98dd6 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 17 Jun 2013 01:26:35 -0700 Subject: start of new ui - css changes, layout changes, navigation changes. --- app/views/layouts/_footer.html.haml | 0 app/views/layouts/_header.html.haml | 3 +++ app/views/layouts/_masthead.html.haml | 4 ++++ app/views/layouts/_masthead_large.html.haml | 3 +++ app/views/layouts/_navigation.html.haml | 17 +++++++++++----- app/views/layouts/application.html.haml | 30 ++++++++++++++++++++--------- 6 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 app/views/layouts/_footer.html.haml create mode 100644 app/views/layouts/_header.html.haml create mode 100644 app/views/layouts/_masthead.html.haml create mode 100644 app/views/layouts/_masthead_large.html.haml (limited to 'app/views/layouts') diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml new file mode 100644 index 0000000..e69de29 diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml new file mode 100644 index 0000000..aa4054b --- /dev/null +++ b/app/views/layouts/_header.html.haml @@ -0,0 +1,3 @@ +- if user + %strong.user_address + = user.email_address diff --git a/app/views/layouts/_masthead.html.haml b/app/views/layouts/_masthead.html.haml new file mode 100644 index 0000000..280f2c2 --- /dev/null +++ b/app/views/layouts/_masthead.html.haml @@ -0,0 +1,4 @@ +.title + %span.sitename + = APP_CONFIG[:domain] + = t(:user_control_panel) \ No newline at end of file diff --git a/app/views/layouts/_masthead_large.html.haml b/app/views/layouts/_masthead_large.html.haml new file mode 100644 index 0000000..6bb1943 --- /dev/null +++ b/app/views/layouts/_masthead_large.html.haml @@ -0,0 +1,3 @@ +.title + %span.sitename + = APP_CONFIG[:domain] \ No newline at end of file diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index b75eed7..7cd0f38 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -1,6 +1,13 @@ -= link_to "Leap Web", root_path, :class => 'brand' -%ul.nav - // = render '/tickets/nav' +//= link_to "Leap Web", root_path, :class => 'brand' +//%ul.nav +// // = render '/tickets/nav' +// +//%ul.nav.pull-right +// = render '/sessions/nav' -%ul.nav.pull-right - = render '/sessions/nav' +%ul.nav.sidenav + = link_to_navigation t(:overview), user_overview_path(user), :active => controller?(:overviews) + = link_to_navigation t(:account_settings), edit_user_path(user), :active => controller?(:users) + =# link_to_navigation t(:email_settings), edit_email_path(user), :active => controller?(:emails) + = link_to_navigation t(:support_tickets), tickets_path, :active => controller?(:tickets) + = link_to_navigation t(:logout), logout_path, :method => :delete diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index e6d22f0..719d699 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -9,15 +9,27 @@ = csrf_meta_tags = yield(:head) %body - %header.navbar.navbar-fixed-top - %nav.navbar-inner - .container - = render 'layouts/navigation' - #main{:role => "main"} - .container - .content - .row + #masthead + - if logged_in? + = render 'layouts/masthead' + - else + = render 'layouts/masthead_large' + #main + .container-fluid + - if logged_in? + .row-fluid .span12 + = render 'layouts/header' + .row-fluid + .span2 + = render 'layouts/navigation' + .span10 = render 'layouts/messages' = yield - %footer + - else + .row-fluid + .span12 + = render 'layouts/messages' + = yield + #footer + = render 'layouts/footer' -- cgit v1.2.3 From 1dcec6ed912b075f5bdaa069bb5725b0ff06fe41 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 19 Jun 2013 00:36:02 -0700 Subject: added html_title helper - use @title to set page title. --- app/views/layouts/application.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/layouts') diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 719d699..71364fc 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -2,7 +2,7 @@ %html %head %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"} - %title= content_for?(:title) ? yield(:title) : "Leap Web" + %title= html_title %meta{:content => content_for?(:description) ? yield(:description) : "Leap Web", :name => "description"} = stylesheet_link_tag "application", :media => "all" = javascript_include_tag "application" -- cgit v1.2.3 From 4863ce5e78d880f1ca8a1874cd03022afb061f4a Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 28 Jun 2013 20:38:14 -0700 Subject: new layout for the home buttons --- app/views/layouts/_masthead_large.html.haml | 3 --- app/views/layouts/_masthead_noauth.html.haml | 3 +++ app/views/layouts/_messages.html.haml | 2 +- app/views/layouts/application.html.haml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 app/views/layouts/_masthead_large.html.haml create mode 100644 app/views/layouts/_masthead_noauth.html.haml (limited to 'app/views/layouts') diff --git a/app/views/layouts/_masthead_large.html.haml b/app/views/layouts/_masthead_large.html.haml deleted file mode 100644 index 6bb1943..0000000 --- a/app/views/layouts/_masthead_large.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -.title - %span.sitename - = APP_CONFIG[:domain] \ No newline at end of file diff --git a/app/views/layouts/_masthead_noauth.html.haml b/app/views/layouts/_masthead_noauth.html.haml new file mode 100644 index 0000000..6bb1943 --- /dev/null +++ b/app/views/layouts/_masthead_noauth.html.haml @@ -0,0 +1,3 @@ +.title + %span.sitename + = APP_CONFIG[:domain] \ No newline at end of file diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml index 80e34d4..a3bbbac 100644 --- a/app/views/layouts/_messages.html.haml +++ b/app/views/layouts/_messages.html.haml @@ -2,4 +2,4 @@ - if msg.is_a?(String) %div{:class => "alert alert-#{name == :notice ? "success" : "error"}"} %a.close{"data-dismiss" => "alert"} × - = content_tag :div, msg, :id => "flash_#{name}" + = content_tag :div, format_flash(msg), :id => "flash_#{name}" diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 71364fc..e185f26 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -12,8 +12,8 @@ #masthead - if logged_in? = render 'layouts/masthead' - - else - = render 'layouts/masthead_large' + - elsif params[:controller] != 'home' + = render 'layouts/masthead_noauth' #main .container-fluid - if logged_in? -- cgit v1.2.3 From b8c44acfa5b1fbc8b35e812bd6c23aa6d824c4b1 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 2 Jul 2013 23:19:38 -0700 Subject: cleaned up application layout and some minor css. --- app/views/layouts/_content.html.haml | 19 +++++++++++++++++++ app/views/layouts/_header.html.haml | 10 ++++++++-- app/views/layouts/_messages.html.haml | 11 ++++++----- app/views/layouts/application.html.haml | 14 +++----------- 4 files changed, 36 insertions(+), 18 deletions(-) create mode 100644 app/views/layouts/_content.html.haml (limited to 'app/views/layouts') diff --git a/app/views/layouts/_content.html.haml b/app/views/layouts/_content.html.haml new file mode 100644 index 0000000..19af627 --- /dev/null +++ b/app/views/layouts/_content.html.haml @@ -0,0 +1,19 @@ +-# +-# Partial for displaying the page content. This is the only place that content should be displayed. +-# + +- if content_for?(:content) + - content = yield(:content) +- else + - content = yield + +- if @show_navigation + .span2 + = render 'layouts/navigation' + .span10 + = render 'layouts/messages' + = content +- else + .span12 + = render 'layouts/messages' + = content diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index aa4054b..854ab40 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -1,3 +1,9 @@ -- if user - %strong.user_address +- if admin? + %ul.nav.nav-tabs + %li{:class => ("active" if controller?('users', 'email_settings', 'overviews') || params[:user_id])} + = link_to t(:users), users_path + %li{:class => ("active" if controller?('tickets') && !params[:user_id])} + = link_to t(:tickets), tickets_path +- if user && @show_navigation + .user_heading = user.email_address diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml index a3bbbac..7ff985f 100644 --- a/app/views/layouts/_messages.html.haml +++ b/app/views/layouts/_messages.html.haml @@ -1,5 +1,6 @@ -- flash.each do |name, msg| - - if msg.is_a?(String) - %div{:class => "alert alert-#{name == :notice ? "success" : "error"}"} - %a.close{"data-dismiss" => "alert"} × - = content_tag :div, format_flash(msg), :id => "flash_#{name}" +#messages + - flash.each do |name, msg| + - if msg.is_a?(String) + %div{:class => "alert alert-#{name == :notice ? "success" : "error"}"} + %a.close{"data-dismiss" => "alert"} × + = content_tag :div, format_flash(msg), :id => "flash_#{name}" diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index e185f26..db612b7 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,3 +1,4 @@ +- @show_navigation = true if @show_navigation.nil? !!! %html %head @@ -20,16 +21,7 @@ .row-fluid .span12 = render 'layouts/header' - .row-fluid - .span2 - = render 'layouts/navigation' - .span10 - = render 'layouts/messages' - = yield - - else - .row-fluid - .span12 - = render 'layouts/messages' - = yield + .row-fluid + = render 'layouts/content' #footer = render 'layouts/footer' -- cgit v1.2.3 From 0cd386e0144601f5478f90bbdb401d55c019c828 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 3 Jul 2013 11:11:10 -0700 Subject: better ticket view navigation: tickets are now either global in scope (for admins) or stay as a nested resource for a particular user (for normal users and when you visit the tickets list of a particular user). --- app/views/layouts/_navigation.html.haml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'app/views/layouts') diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index 7cd0f38..cbe6d3a 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -1,13 +1,6 @@ -//= link_to "Leap Web", root_path, :class => 'brand' -//%ul.nav -// // = render '/tickets/nav' -// -//%ul.nav.pull-right -// = render '/sessions/nav' - %ul.nav.sidenav = link_to_navigation t(:overview), user_overview_path(user), :active => controller?(:overviews) = link_to_navigation t(:account_settings), edit_user_path(user), :active => controller?(:users) - =# link_to_navigation t(:email_settings), edit_email_path(user), :active => controller?(:emails) - = link_to_navigation t(:support_tickets), tickets_path, :active => controller?(:tickets) + = link_to_navigation t(:email_settings), edit_user_email_settings_path(user), :active => controller?(:email_settings) + = link_to_navigation t(:support_tickets), auto_tickets_path(user), :active => controller?(:tickets) = link_to_navigation t(:logout), logout_path, :method => :delete -- cgit v1.2.3 From adacb11c8ff6395f38c3c05bea4e6d276285118f Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 4 Jul 2013 01:35:49 -0700 Subject: help - fix ticket navigation & links (use @user, not user). --- app/views/layouts/_header.html.haml | 6 ++++-- app/views/layouts/_navigation.html.haml | 8 ++++---- app/views/layouts/application.html.haml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'app/views/layouts') diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 854ab40..b459545 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -4,6 +4,8 @@ = link_to t(:users), users_path %li{:class => ("active" if controller?('tickets') && !params[:user_id])} = link_to t(:tickets), tickets_path -- if user && @show_navigation + %li + = link_to t(:logout), logout_path, :method => :delete +- if @user && @show_navigation .user_heading - = user.email_address + = @user.email_address diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index cbe6d3a..b42c1fe 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -1,6 +1,6 @@ %ul.nav.sidenav - = link_to_navigation t(:overview), user_overview_path(user), :active => controller?(:overviews) - = link_to_navigation t(:account_settings), edit_user_path(user), :active => controller?(:users) - = link_to_navigation t(:email_settings), edit_user_email_settings_path(user), :active => controller?(:email_settings) - = link_to_navigation t(:support_tickets), auto_tickets_path(user), :active => controller?(:tickets) + = link_to_navigation t(:overview), user_overview_path(@user), :active => controller?(:overviews) + = link_to_navigation t(:account_settings), edit_user_path(@user), :active => controller?(:users) + = link_to_navigation t(:email_settings), edit_user_email_settings_path(@user), :active => controller?(:email_settings) + = link_to_navigation t(:support_tickets), auto_tickets_path(@user), :active => controller?(:tickets) = link_to_navigation t(:logout), logout_path, :method => :delete diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index db612b7..d5adca9 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,4 +1,4 @@ -- @show_navigation = true if @show_navigation.nil? +- @show_navigation = true if @show_navigation.nil? && logged_in? !!! %html %head -- cgit v1.2.3 From 315ccfa22f9747a2cd98bccec18011b62b299960 Mon Sep 17 00:00:00 2001 From: elijah Date: Sat, 6 Jul 2013 23:10:16 -0700 Subject: minor - remove masthead_noauth partial --- app/views/layouts/_masthead_noauth.html.haml | 3 --- app/views/layouts/application.html.haml | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 app/views/layouts/_masthead_noauth.html.haml (limited to 'app/views/layouts') diff --git a/app/views/layouts/_masthead_noauth.html.haml b/app/views/layouts/_masthead_noauth.html.haml deleted file mode 100644 index 6bb1943..0000000 --- a/app/views/layouts/_masthead_noauth.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -.title - %span.sitename - = APP_CONFIG[:domain] \ No newline at end of file diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index d5adca9..380f92d 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -11,10 +11,8 @@ = yield(:head) %body #masthead - - if logged_in? + - if params[:controller] != 'home' = render 'layouts/masthead' - - elsif params[:controller] != 'home' - = render 'layouts/masthead_noauth' #main .container-fluid - if logged_in? -- cgit v1.2.3