From d50c73c5396ef1b3ab602b4e9ba93cc0a0cde703 Mon Sep 17 00:00:00 2001 From: Brigitte Warner Date: Thu, 14 Aug 2014 21:16:55 -0400 Subject: [PATCH] only show menu if user signed in --- app/views/layouts/application.html.haml | 31 +++++++++++++------------ 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 5fa4ba6..736f034 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -22,27 +22,28 @@ %a{class:"navbar-brand", href:"/"} = image_tag 'velo_logo.png' - /[Collect the nav links, forms, and other content for toggling] - %div{class: "collapse navbar-collapse", id:"bs-example-navbar-collapse-1"} - %ul{class: "nav navbar-nav"} - %li - %a{href: new_time_entry_path} Add Time Entry - %li - %a{href: time_entries_path} View Timesheet - %li - %a{href: new_bike_path} Add Bike - %li - %a{href: bike_path(@bike)} View Your Bike - %ul{class: "nav navbar-nav navbar-right"} - - if user_signed_in? - %li - %input{id: "index_logout", value: "Logout", "data-url" => destroy_user_session_path } + - if user_signed_in? + /[Collect the nav links, forms, and other content for toggling] + %div{class: "collapse navbar-collapse", id:"bs-example-navbar-collapse-1"} + %ul{class: "nav navbar-nav"} + %li + %a{href: new_time_entry_path} Add Time Entry + %li + %a{href: time_entries_path} View Timesheet + %li + %a{href: new_bike_path} Add Bike + %li + %a{href: bike_path(@bike)} View Your Bike + %ul{class: "nav navbar-nav navbar-right"} + %li + %input{id: "index_logout", value: "Logout", "data-url" => destroy_user_session_path } .container - if flash[:notice] %p{:class => 'notice'}= flash[:notice] - if flash[:alert] %p{:class => 'alert'}= flash[:alert] + = yield %footer %p © BikeShed #{Time.now.year}