mirror of https://github.com/fspc/BikeShed-1.git
Browse Source
-Moved bikes to User model instead of profile -User can copy user log to a bike log with new actsasloggable -Added user stats -some css was messing up checkboxes, need to figure out which stylesheet was doing thatdenney-disable-on-select
Jason Denney
12 years ago
15 changed files with 117 additions and 17 deletions
@ -0,0 +1,17 @@ |
|||||
|
class UserStats < Netzke::Base |
||||
|
|
||||
|
js_configure do |c| |
||||
|
c.body_padding = 15 |
||||
|
c.title = "User Stats" |
||||
|
bike = controller.current_user.bike |
||||
|
c.html = %Q( |
||||
|
<div id="user_stats_page"> |
||||
|
<p>Total Hours Worked: #{controller.current_user.total_hours}</p> |
||||
|
<p>Hours worked in #{Time.now.strftime('%B')}: #{controller.current_user.current_month_hours}</p> |
||||
|
<p>Current bike ID: #{bike.id if bike}</p> |
||||
|
<p>Current bike S/N: #{bike.serial_number if bike}</p> |
||||
|
</div> |
||||
|
) |
||||
|
end |
||||
|
end |
||||
|
|
@ -0,0 +1,30 @@ |
|||||
|
!!! 5 |
||||
|
%html{:lang => "en"} |
||||
|
%head |
||||
|
%meta{:charset => "utf-8"}/ |
||||
|
%title= content_for?(:title) ? yield(:title) : "Velocipede" |
||||
|
= load_netzke |
||||
|
= csrf_meta_tags |
||||
|
/[if lt IE 9] |
||||
|
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js" |
||||
|
:css |
||||
|
body { |
||||
|
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */ |
||||
|
} |
||||
|
|
||||
|
%body |
||||
|
.container |
||||
|
|
||||
|
.content |
||||
|
- if flash[:notice] |
||||
|
%p{:class => 'notice'}= flash[:notice] |
||||
|
- if flash[:alert] |
||||
|
%p{:class => 'alert'}= flash[:alert] |
||||
|
.row |
||||
|
.span13 |
||||
|
= yield |
||||
|
|
||||
|
%footer |
||||
|
%p © Velocipede 2013 |
||||
|
|
||||
|
= javascript_include_tag "application" |
Loading…
Reference in new issue