application nav WIP

This commit is contained in:
Brigitte Warner
2014-08-14 20:06:44 -04:00
parent 91a5b7c64c
commit 9df3dfcfd5
5 changed files with 94 additions and 48 deletions
+36 -20
View File
@@ -5,31 +5,47 @@
%meta{ name: "viewport", content: "width=device-width", "initial-scale" => "1.0"}
%title= content_for?(:title) ? yield(:title) : "Velocipede"
= csrf_meta_tags
= stylesheet_link_tag "bootstrap_and_overrides", "datepicker", "bootstrap-timepicker", :media => "all"
= stylesheet_link_tag "bootstrap", "application", :media => "all"
/[if lt IE 9]
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
:css
body {
padding-top: 5px;
}
.x-boundlist-item {
white-space: nowrap;
}
%body
%nav{class: "navbar navbar-default", role: "navigation"}
%div{class: "container-fluid"}
/[Brand and toggle get grouped for better mobile display]
%div{class: "navbar-header"}
%button{type: "button", class: "navbar-toggle", 'data-toggle' => "collapse", 'data-target' => "#bs-example-navbar-collapse-1"}
%span{class: "sr-only"} Toggle navigation
%span.icon-bar
%span.icon-bar
%span.icon-bar
%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 }
.container
- if flash[:notice]
%p{:class => 'notice'}= flash[:notice]
- if flash[:alert]
%p{:class => 'alert'}= flash[:alert]
.content
- if flash[:notice]
%p{:class => 'notice'}= flash[:notice]
- if flash[:alert]
%p{:class => 'alert'}= flash[:alert]
.row
.span12
= yield
%footer
%p © BikeShed #{Time.now.year}
%footer
%p © BikeShed #{Time.now.year}
= javascript_include_tag "application"
= javascript_include_tag params[:controller]
-21
View File
@@ -1,21 +0,0 @@
= stylesheet_link_tag "bootstrap_and_overrides", :media => "all"
%h2 Dashboard
%p
%p
%a{class: "btn btn-lg btn-block btn-primary", href: new_time_entry_path} Add Time Entry
%p
%a{class: "btn btn-lg btn-block btn-primary", href: time_entries_path} View Timesheet
- if can? :manage, Bike
%p
%a{class: "btn btn-lg btn-block btn-primary", href: new_bike_path} Add Bike
- if !@bike.nil?
%p
%a{class: "btn btn-lg btn-block btn-primary", href: bike_path(@bike)} View Your Bike
%p
%p
%a{class: "btn btn-lg btn-block btn-primary hidden-xs", href: admin_index_path} Desktop View
%p
%input{id: "index_logout", value: "Logout", type: "button", class: "btn btn-lg btn-block btn-danger", "data-url" => destroy_user_session_path }