Author SHA1 Message Date
Jason Denney a7bdfd7a04 Merge pull request #107 from spacemunkay/brigitte-sass
Updated Sign In Page
2017-01-08 11:37:09 -08:00
15 changed files with 101 additions and 156 deletions
+3 -3
View File
@@ -22,9 +22,9 @@ gem 'jbuilder'
# in production environments by default.
group :assets do
gem 'coffee-rails'
gem 'sprockets-rails', '=2.0.0.backport1'
gem 'sprockets', '=2.2.2.backport2'
gem 'sass-rails', github: 'guilleiguaran/sass-rails', branch: 'backport'
# Use SCSS for stylesheets
gem 'sass-rails'
# Use bootstrap-sass for stylesheets
gem 'bootstrap-sass'
gem 'uglifier'
end
+15 -27
View File
@@ -1,13 +1,3 @@
GIT
remote: git://github.com/guilleiguaran/sass-rails.git
revision: 0393d9e1a6e4a776e61f16fb75f97971b9f4abd2
branch: backport
specs:
sass-rails (4.0.1)
railties (>= 3.2.0, < 5.0)
sass (>= 3.2.0)
sprockets-rails (~> 2.0.0.backport1)
GIT
remote: https://github.com/spacemunkay/acts_as_loggable.git
revision: 8484dc1f7a58699705c5ffb593ebdf700a9f374a
@@ -51,7 +41,7 @@ GEM
bcrypt (3.1.7)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
bootstrap-sass (3.2.0.1)
bootstrap-sass (3.2.0.0)
sass (~> 3.2)
bootstrap-will_paginate (0.0.10)
will_paginate
@@ -91,7 +81,7 @@ GEM
factory_girl_rails (4.4.1)
factory_girl (~> 4.4.0)
railties (>= 3.0.0)
faker (1.4.3)
faker (1.4.2)
i18n (~> 0.5)
ffi (1.9.3)
formatador (0.2.5)
@@ -157,7 +147,7 @@ GEM
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
polyglot (0.3.5)
pry (0.10.1)
pry (0.10.0)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
@@ -193,12 +183,12 @@ GEM
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-core (3.0.4)
rspec-core (3.0.3)
rspec-support (~> 3.0.0)
rspec-expectations (3.0.4)
rspec-expectations (3.0.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-mocks (3.0.4)
rspec-mocks (3.0.3)
rspec-support (~> 3.0.0)
rspec-rails (3.0.2)
actionpack (>= 3.0)
@@ -208,26 +198,26 @@ GEM
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-support (~> 3.0.0)
rspec-support (3.0.4)
sass (3.4.0)
rspec-support (3.0.3)
sass (3.3.10)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
slop (3.6.0)
spork (0.9.2)
sprockets (2.2.2.backport2)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.0.backport1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.2.2.backport2)
thor (0.19.1)
tilt (1.4.1)
timers (1.1.0)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.41)
tzinfo (0.3.40)
uglifier (2.5.3)
execjs (>= 0.3.0)
json (>= 1.8.0)
@@ -268,9 +258,7 @@ DEPENDENCIES
rails (= 3.2.19)
rb-fsevent
rspec-rails
sass-rails!
sass-rails
spork
sprockets (= 2.2.2.backport2)
sprockets-rails (= 2.0.0.backport1)
uglifier
will_paginate
@@ -9,33 +9,12 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require bootstrap
*= require datepicker
*= require bootstrap
*= require bootstrap-timepicker
*= require bootstrap_and_overrides
*/
@import 'bootstrap-sprockets';
@import 'bootstrap';
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
}
body {
background-color: #fff;
color: #333;
font-size: 13px;
line-height: 18px;
}
.x-boundlist-item {
white-space: nowrap;
}
.container {
max-width: 940px;
margin: 0 auto;
@@ -51,10 +30,6 @@ p {
padding: 20px 0;
}
a {
text-decoration: none;
}
.check_box {
width: 30px;
height: 30px;
@@ -64,36 +39,3 @@ text-decoration: none;
label {
font-size: x-large;
}
/* navigation styling */
.navbar-default {
background-color: #428bca;
border-color: #428bca;
border-radius: 0px;
}
.navbar > .container-fluid .navbar-brand {
margin-left: -15px;
}
.navbar-default .navbar-brand {
color: #ffffff;
}
.navbar-default .navbar-nav > li > a {
color: #ffffff;
list-style: none;
}
.navbar-brand {
float: left;
padding: 15px 15px;
font-size: 18px;
line-height: 20px;
height: 50px;
}
.navbar-default a:hover {
color: #d1b84a !important;
}
@@ -1,3 +1,9 @@
body {
padding-top: 60px;
padding-left: 20px;
}
// Set the correct sprite paths
$iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
$iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');
@@ -2,6 +2,4 @@ class ApplicationController < ActionController::Base
before_filter :authenticate_user!
protect_from_forgery
layout 'application'
end
@@ -1,10 +1,3 @@
class AuthenticatedController < ApplicationController
before_filter :authenticate_user!
before_filter :get_user_bike
def get_user_bike
@bike = current_user.bike
end
end
+6
View File
@@ -0,0 +1,6 @@
class SiteController < ApplicationController
def index
@bike = current_user.bike
end
end
+2
View File
@@ -1,3 +1,5 @@
%a{ class: "btn btn-default btn-lg", href: root_path}
%span{ class:"icon-home"}
%h2 Add Bike
%p
+2
View File
@@ -2,6 +2,8 @@
%p
%a{class: "btn btn-lg btn-block btn-info", href: new_bike_path} Add Another Bike?
%a{ class: "btn btn-default btn-lg", href: root_path}
%span{ class:"icon-home"}
%h2 #{@bike.shop_id}: #{@bike.bike_brand}
%h2 #{@bike.model}
+19 -36
View File
@@ -5,48 +5,31 @@
%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", "application", :media => "all"
= stylesheet_link_tag "bootstrap_and_overrides", "datepicker", "bootstrap-timepicker", :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'
- if user_signed_in?
/[Collect the nav links, forms, and other content for toggling]
#bs-example-navbar-collapse-1.collapse.navbar-collapse
%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
%a{href: destroy_user_session_path } Log Out
.container
- if flash[:notice]
%p{:class => 'notice'}= flash[:notice]
- if flash[:alert]
%p{:class => 'alert'}= flash[:alert]
= yield
%footer
%p &copy; BikeShed #{Time.now.year}
.content
- if flash[:notice]
%p{:class => 'notice'}= flash[:notice]
- if flash[:alert]
%p{:class => 'alert'}= flash[:alert]
.row
.span12
= yield
%footer
%p &copy; BikeShed #{Time.now.year}
= javascript_include_tag "application"
= javascript_include_tag params[:controller]
+21
View File
@@ -0,0 +1,21 @@
= 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 }
+2
View File
@@ -1,3 +1,5 @@
%a{ class: "btn btn-default btn-lg", href: root_path}
%span{ class:"icon-home"}
%h2 Task List
%h3
%a{ href: bike_path(@task_list.item)}#{@task_list.item.shop_id} #{@task_list.item.bike_brand}
+2
View File
@@ -1,3 +1,5 @@
%a{ class: "btn btn-default btn-lg", href: root_path}
%span{ class:"icon-home"}
%h2 Your Timesheet
%dl.dl-horizontal
+19 -18
View File
@@ -1,32 +1,33 @@
%a{ class: "btn btn-default btn-lg", href: root_path}
%span{ class:"icon-home"}
%h2 Add Time Entry
%p
.control-group
.controls.bootstrap-timepicker.col-xs-12.col-sm-12.col-md-12.input-group
.span{ class: "input-group-addon", style: "min-width: 100px; font-size: large"} Date
%input{id: "date_id", placeholder: "Date", type: "text", class: "datepicker input-large col-xs-12 col-sm-12 col-md-12 form-control" }
.controls
%input{id: "date_id", placeholder: "Date", type: "text", class: "datepicker input-small" }
.help-block
.control-group
.controls{ class: "bootstrap-timepicker col-xs-12 col-sm-12 col-md-12 input-group"}
.span{ class: "input-group-addon", style: "min-width: 100px; font-size: large"} Start
%input{id: "start_time_id", placeholder: "Time ID", type: "text", class: "input-large col-xs-12 col-sm-12 col-md-12 form-control" }
.controls{ class: "bootstrap-timepicker"}
%label Start
%input{id: "start_time_id", placeholder: "Time ID", type: "text", class: "input-small" }
.hidden{ id: "start_date" }
.help-block
.control-group
.controls{ class: "bootstrap-timepicker col-xs-12 col-sm-12 col-md-12 input-group"}
.span{ class: "input-group-addon", style: "min-width: 100px; font-size: large"} End
%input{id: "end_time_id", placeholder: "Time ID", type: "text", class: "input-large col-xs-9 col-sm-9 col-md-9 form-control"}
.controls
%label End
%input{id: "end_time_id", placeholder: "Time ID", type: "text", class: "input-small" }
.hidden{ id: "end_date" }
.help-block
.control-group{ class: "col-xs-12 col-sm-12 col-md-12"}
.control-group
.controls
.btn-group{ "data-toggle" => "buttons-radio", class: "btn-group btn-group-justified"}
%label{ class: "btn-lg col-xs-4 col-sm-4 col-md-4"}
%input{ type: "radio", name: "action_id", value: 1, radius: 20} Volunteer
%label{ class: "btn-lg col-xs-4 col-sm-4 col-md-4"}
%input{ type: "radio", name: "action_id", value: 2, radius: 20} Personal
%label{ class: "btn-lg col-xs-4 col-sm-4 col-md-4"}
%input{ type: "radio", name: "action_id", value: 3, radius: 20} Staff
.btn-group{ "data-toggle" => "buttons-radio"}
%label{ class: "btn btn-default"}
%input{ type: "radio", name: "action_id", value: 1} Volunteer
%label{ class: "btn btn-default"}
%input{ type: "radio", name: "action_id", value: 2} Personal
%label{ class: "btn btn-default"}
%input{ type: "radio", name: "action_id", value: 3} Staff
.hidden{ id: "log_action_id" }
.help-block
.control-group
@@ -35,7 +36,7 @@
= select_tag(:bike_id, options_for_select(@bikes))
.control-group
.controls
%textarea{id: "description_id", placeholder: "Work description", class: "input-lg col-xs-12 col-sm-12 col-md-12" }
%textarea{id: "description_id", placeholder: "Work description", class: "input-lg" }
.control-group
.controls
%input{id: "add_time_entry_submit", value: "Add Time Entry", type: "button", class: "btn btn-lg btn-block btn-primary", "data-url" => "#{api_create_time_entry_path}", "data-forward" => "#{"."}"}
+1 -2
View File
@@ -3,8 +3,7 @@ Velocipede::Application.routes.draw do
devise_for :users
netzke
root :to => 'time_entries#new'
root :to => 'site#index'
get 'admin/index', to: 'panel#index', as: "admin_index"
get 'bikes/new', to: 'bikes#new', as: "new_bike"