Added Bike Status routes, Controller and views

This commit is contained in:
Jason Denney
2012-12-09 13:15:38 -05:00
parent 747b8d9c4b
commit 8d488c86a0
7 changed files with 86 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
= form_for bike_status, :html => { :class => 'form-horizontal' } do |f|
.control-group
= f.label :status, :class => 'control-label'
.controls
= f.text_field :status, :class => 'text_field'
.form-actions
= f.submit nil, :class => 'btn btn-primary'
= link_to t('.cancel', :default => t("helpers.links.cancel")), bike_statuses_path, :class => 'btn'
+4
View File
@@ -0,0 +1,4 @@
- model_class = bike_status.class
.page-header
%h1=t '.title', :default => t('helpers.titles.edit', :model => model_class.model_name.human, :default => "Edit #{model_class.model_name.human}")
= render :partial => "form"
+21
View File
@@ -0,0 +1,21 @@
- model_class = BikeStatus.new.class
.page-header
%h1=t '.title', :default => model_class.model_name.human.pluralize
%table.table.table-striped
%thead
%tr
%th= model_class.human_attribute_name(:id)
%th= model_class.human_attribute_name(:status)
%th= model_class.human_attribute_name(:created_at)
%th=t '.actions', :default => t("helpers.actions")
%tbody
- bike_statuses.each do |bike_status|
%tr
%td= link_to bike_status.id, bike_status_path(bike_status)
%td= bike_status.status
%td=l bike_status.created_at
%td
= link_to t('.edit', :default => t("helpers.links.edit")), edit_bike_status_path(bike_status), :class => 'btn btn-mini'
= link_to t('.destroy', :default => t("helpers.links.destroy")), bike_status_path(bike_status), :method => :delete, :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), :class => 'btn btn-mini btn-danger'
= link_to t('.new', :default => t("helpers.links.new")), new_bike_status_path, :class => 'btn btn-primary'
+4
View File
@@ -0,0 +1,4 @@
- model_class = bike_status.class
.page-header
%h1=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human, :default => "New #{model_class.model_name.human}")
= render :partial => "form"
+13
View File
@@ -0,0 +1,13 @@
- model_class = bike_status.class
.page-header
%h1=t '.title', :default => model_class.model_name.human
%p
%strong= model_class.human_attribute_name(:status) + ':'
%br
= bike_status.status
.form-actions
= link_to t('.back', :default => t("helpers.links.back")), bike_statuses_path, :class => 'btn'
= link_to t('.edit', :default => t("helpers.links.edit")), edit_bike_status_path(bike_status), :class => 'btn'
= link_to t('.destroy', :default => t("helpers.links.destroy")), bike_status_path(bike_status), :method => "delete", :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), :class => 'btn btn-danger'