mirror of
				https://github.com/fspc/BikeShed-1.git
				synced 2025-10-31 08:55:36 -04:00 
			
		
		
		
	only show menu if user signed in
This commit is contained in:
		
							parent
							
								
									1862f5dbc1
								
							
						
					
					
						commit
						d50c73c539
					
				| @ -22,27 +22,28 @@ | |||||||
|           %a{class:"navbar-brand", href:"/"} |           %a{class:"navbar-brand", href:"/"} | ||||||
|           = image_tag 'velo_logo.png' |           = image_tag 'velo_logo.png' | ||||||
| 
 | 
 | ||||||
|         /[Collect the nav links, forms, and other content for toggling] |         - if user_signed_in? | ||||||
|         %div{class: "collapse navbar-collapse", id:"bs-example-navbar-collapse-1"} |           /[Collect the nav links, forms, and other content for toggling] | ||||||
|           %ul{class: "nav navbar-nav"} |           %div{class: "collapse navbar-collapse", id:"bs-example-navbar-collapse-1"} | ||||||
|             %li |             %ul{class: "nav navbar-nav"} | ||||||
|               %a{href: new_time_entry_path} Add Time Entry |               %li | ||||||
|             %li |                 %a{href: new_time_entry_path} Add Time Entry | ||||||
|               %a{href: time_entries_path} View Timesheet |               %li | ||||||
|             %li |                 %a{href: time_entries_path} View Timesheet | ||||||
|               %a{href: new_bike_path} Add Bike |               %li | ||||||
|             %li |                 %a{href: new_bike_path} Add Bike | ||||||
|               %a{href: bike_path(@bike)} View Your Bike |               %li | ||||||
|           %ul{class: "nav navbar-nav navbar-right"} |                 %a{href: bike_path(@bike)} View Your Bike | ||||||
|           - if user_signed_in? |             %ul{class: "nav navbar-nav navbar-right"} | ||||||
|             %li |               %li | ||||||
|               %input{id: "index_logout", value: "Logout", "data-url" => destroy_user_session_path } |                 %input{id: "index_logout", value: "Logout", "data-url" => destroy_user_session_path } | ||||||
| 
 | 
 | ||||||
|     .container |     .container | ||||||
|       - if flash[:notice] |       - if flash[:notice] | ||||||
|         %p{:class => 'notice'}= flash[:notice] |         %p{:class => 'notice'}= flash[:notice] | ||||||
|       - if flash[:alert] |       - if flash[:alert] | ||||||
|         %p{:class => 'alert'}= flash[:alert] |         %p{:class => 'alert'}= flash[:alert] | ||||||
|  |       = yield | ||||||
| 
 | 
 | ||||||
|     %footer |     %footer | ||||||
|       %p © BikeShed #{Time.now.year} |       %p © BikeShed #{Time.now.year} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user