lk | remove unused fields on bikes & fix some formatting

This commit is contained in:
Louis Knapp
2015-09-18 17:25:06 -05:00
parent f30e9c6fed
commit 2c98232f46
11 changed files with 36 additions and 20 deletions
+2 -3
View File
@@ -51,12 +51,12 @@ class BikesController < ApplicationController
end
def mark_as_sold
current_date = Time.new.strftime("%Y-%m-%d")
current_date = Time.new.strftime("%Y-%m-%d")
@bike = Bike.find(params[:id])
if @bike.update_attribute(:date_sold, current_date)
redirect_to bikes_url, notice: @bike.name + ' was marked as sold on ' + current_date + '.'
else
render action: edit, notice: 'Bike sale date could not be updated'
render action: edit, notice: 'Bike sale date could not be updated'
end
end
@@ -82,7 +82,6 @@ class BikesController < ApplicationController
:log_number,
:purpose,
:serial_number,
:notes,
:tag_info,
:mechanic,
:completion_date,
+1 -1
View File
@@ -22,7 +22,7 @@ class ClientsController < ApplicationController
if @client.save
redirect_to @client, notice: 'Client was successfully created.'
else
render action: 'new'
render action: 'new'
end
end
+4 -4
View File
@@ -67,14 +67,14 @@
= f.select :purpose, [["Freecyclery", "Freecyclery"], ["Sale", "Sale"]], {}, class: "selectpicker", disabled: disabled
.form-group
= f.label "Tag Info", class: "col-sm-4 control-label"
= f.label "New Parts", class: "col-sm-4 control-label"
.col-sm-6
= f.text_area :tag_info, class: "form-control", placeholder: "+ New Component ", disabled: disabled
= f.text_area :new_parts, class: "form-control", placeholder: "+ New Component ", disabled: disabled
.form-group
= f.label "Notes", class: "col-sm-4 control-label"
= f.label "Work Done", class: "col-sm-4 control-label"
.col-sm-6
= f.text_area :notes, class: "form-control", disabled: disabled
= f.text_area :work_done, class: "form-control", disabled: disabled
.form-group
= f.label "Date Sold:", class: "col-sm-4 control-label"
+2 -2
View File
@@ -15,10 +15,10 @@
.col-xs-6
.desc
.strong Work Done:
=bike.notes
=simple_format(bike.work_done)
.col-xs-6
.desc
.strong New Parts:
=bike.tag_info
=simple_format(bike.new_parts)
.row
.col-xs-9.col-xs-offset-3.small= "Log Number: " + bike.log_number.to_s
+2 -1
View File
@@ -69,7 +69,8 @@
.form-group
= f.label "Notes:", class: "col-sm-2 control-label"
.col-sm-10
= f.text_area :notes, class: "form-control", disabled: disabled
= f.text_area :notes, class: "form-control", disabled: disabled
.form-group
= f.label "Bike Fixed:", class: "col-sm-2 control-label"
.col-sm-10
+2 -2
View File
@@ -5,9 +5,9 @@
%br
= link_to "Log Bikes", new_bike_path
%br
= link_to "View All Bikes", bikes_path
= link_to "View Bikes", bikes_path
%br
= link_to "Print Sale Bike Labels", print_select_bikes_path
= link_to "Print Sale Labels", print_select_bikes_path
%br
%h2 Freecyclery
%br