mirror of
https://github.com/fspc/bike-database.git
synced 2025-02-23 09:33:23 -05:00
lk | improves field layout on new bike page
This commit is contained in:
parent
157712ac67
commit
3513bd3caf
@ -1,96 +1,87 @@
|
|||||||
- disabled ||= false
|
- disabled ||= false
|
||||||
.form-horizontal
|
.row
|
||||||
.form-group
|
.form-horizontal
|
||||||
= f.label "Log Number", class: "col-sm-2 control-label"
|
.col-sm-6
|
||||||
.col-sm-10
|
.form-group
|
||||||
= f.text_field :log_number, class: "form-control", disabled: disabled
|
= f.label "Log Number", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.text_field :log_number, class: "form-control", disabled: disabled
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= f.label "Brand:", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.text_field :brand, class: "form-control", disabled: disabled
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= f.label "Model:", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.text_field :model, class: "form-control", disabled: disabled
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
= f.label "Bike Entry Date:", class: "col-sm-2 control-label"
|
= f.label "Type:", class: "col-sm-4 control-label"
|
||||||
.col-sm-10
|
.col-sm-6
|
||||||
= f.text_field :entry_date, class: "form-control datepicker", disabled: disabled
|
= f.select :bike_type, [["BMX", "BMX"], ["Cruiser", "Cruiser"], ["Hybrid", "Hybrid"], ["Mountain", "Mountain"], ["Road", "Road"], ["Touring", "Touring"], ["Track", "Track"], ["Utility", "Utility"]], {}, class: "selectpicker", disabled: disabled
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Brand:", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_field :brand, class: "form-control", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Color:", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_field :color, class: "form-control", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Top Tube Size:", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_field :top_tube_size, class: "form-control", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Seat Tube Size:", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_field :seat_tube_size, class: "form-control", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Model:", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_field :model, class: "form-control", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Type:", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.select :bike_type, [["BMX", "BMX"], ["Cruiser", "Cruiser"], ["Hybrid", "Hybrid"], ["Mountain", "Mountain"], ["Road", "Road"], ["Touring", "Touring"], ["Track", "Track"], ["Utility", "Utility"]], {}, class: "selectpicker", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Purpose:", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.select :purpose, [["Freecyclery", "Freecyclery"], ["Sale", "Sale"]], {}, class: "selectpicker", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Serial Number", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_field :serial_number, class: "form-control", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Notes", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_area :notes, class: "form-control", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
= f.label "Work Done:", class: "col-sm-2 control-label"
|
= f.label "Color:", class: "col-sm-4 control-label"
|
||||||
.col-sm-10
|
.col-sm-6
|
||||||
= f.text_area :work_done, class: "form-control", disabled: disabled
|
= f.text_field :color, class: "form-control", disabled: disabled
|
||||||
|
|
||||||
|
|
||||||
|
.col-sm-6
|
||||||
|
.form-group
|
||||||
|
= f.label "Mechanic:", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.text_field :mechanic, class: "form-control", disabled: disabled
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= f.label "Seat Tube Length:", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.text_field :seat_tube_size, class: "form-control", disabled: disabled
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= f.label "Top Tube Length:", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.text_field :top_tube_size, class: "form-control", disabled: disabled
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= f.label "Serial Number", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.text_field :serial_number, class: "form-control", disabled: disabled
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= f.label "Date Finished:", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.text_field :entry_date, class: "form-control datepicker", disabled: disabled
|
||||||
|
|
||||||
|
.col-sm-6
|
||||||
|
%br
|
||||||
|
%br
|
||||||
|
.form-group
|
||||||
|
= f.label "Purpose:", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.select :purpose, [["Freecyclery", "Freecyclery"], ["Sale", "Sale"]], {}, class: "selectpicker", disabled: disabled
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= f.label "Tag Info", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.text_area :tag_info, class: "form-control", placeholder: "+ New Component ", disabled: disabled
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= f.label "Notes", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.text_area :notes, class: "form-control", disabled: disabled
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= f.label "Date Sold:", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
= f.text_field :date_sold, class: "form-control datepicker", disabled: disabled
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= f.label "Price", class: "col-sm-4 control-label"
|
||||||
|
.col-sm-6
|
||||||
|
.input-group
|
||||||
|
%span.input-group-addon $
|
||||||
|
= f.text_field :price, class: "form-control", disabled: disabled
|
||||||
|
|
||||||
.form-group
|
%a{href: "http://www.bicyclebluebook.com/SearchBikes.aspx"} Look It Up
|
||||||
= f.label "New Parts:", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_area :new_parts, class: "form-control", disabled: disabled
|
|
||||||
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Tag Info", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_area :tag_info, class: "form-control", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Mechanic:", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_field :mechanic, class: "form-control", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Completion Date:", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_field :completion_date, class: "form-control datepicker", disabled: disabled
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Date Sold:", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
= f.text_field :date_sold, class: "form-control datepicker", disabled: disabled
|
|
||||||
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
= f.label "Price", class: "col-sm-2 control-label"
|
|
||||||
.col-sm-10
|
|
||||||
.input-group
|
|
||||||
%span.input-group-addon $
|
|
||||||
= f.text_field :price, class: "form-control", disabled: disabled
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
.container
|
= form_for @bike, html: {class: 'form-horizontal'} do |f|
|
||||||
= form_for @bike, html: {class: 'form-horizontal'} do |f|
|
- if @bike.errors.any?
|
||||||
- if @bike.errors.any?
|
#error_explanation
|
||||||
#error_explanation
|
%h2= pluralize(@bike.errors.count, "error") + " prohibited this bike from being saved:"
|
||||||
%h2= pluralize(@bike.errors.count, "error") + " prohibited this bike from being saved:"
|
%ul
|
||||||
%ul
|
- @bike.errors.full_messages.each do |msg|
|
||||||
- @bike.errors.full_messages.each do |msg|
|
%li= msg
|
||||||
%li= msg
|
= render 'fields', f: f
|
||||||
= render 'fields', f: f
|
|
||||||
.row
|
.row
|
||||||
.actions.col-sm-offset-2
|
.actions.col-sm-offset-2
|
||||||
= f.submit class: "btn btn-default"
|
= f.submit class: "btn btn-default"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
%h1 New bike
|
.container
|
||||||
= render 'form'
|
%h1 New bike
|
||||||
= link_to 'Back', bikes_path
|
= render 'form'
|
||||||
|
= link_to 'Back', bikes_path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user