mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-02-28 08:43:23 -05:00
BS3: show bike.
This commit is contained in:
parent
e8506f6fbc
commit
1106e08098
@ -15,4 +15,10 @@ fieldset, .fieldset {
|
|||||||
.form-group {
|
.form-group {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bike-color {
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: 6px;
|
||||||
|
padding-right: 6px;
|
||||||
}
|
}
|
@ -9,7 +9,7 @@ class BikesController < AuthenticatedController
|
|||||||
|
|
||||||
def show
|
def show
|
||||||
@bike = Bike.find_by_id(params[:id])
|
@bike = Bike.find_by_id(params[:id])
|
||||||
@task_list_id = @bike.task_list.id
|
@task_list = @bike.task_list
|
||||||
@show_add_bike = true if params[:add_bike]
|
@show_add_bike = true if params[:add_bike]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -4,24 +4,37 @@
|
|||||||
|
|
||||||
= top_menu link_to_dashboard, btn
|
= top_menu link_to_dashboard, btn
|
||||||
|
|
||||||
%h2 #{@bike.shop_id}: #{@bike.bike_brand}
|
%h1 #{@bike.shop_id}: #{@bike.bike_brand}
|
||||||
%h2 #{@bike.model}
|
%h4= @bike.model
|
||||||
|
|
||||||
%dl.dl-horizontal
|
%dl.dl-horizontal
|
||||||
%dt Type
|
%dt Type
|
||||||
%dd #{@bike.bike_style}
|
%dd= @bike.bike_style
|
||||||
|
|
||||||
%dt Wheel Size
|
%dt Wheel Size
|
||||||
%dd #{@bike.bike_wheel_size.display_string}
|
%dd= @bike.bike_wheel_size.display_string
|
||||||
|
|
||||||
%dt Condition
|
%dt Condition
|
||||||
%dd #{@bike.bike_condition}
|
%dd= @bike.bike_condition
|
||||||
|
|
||||||
%dt Seat Tube (cm)
|
%dt Seat Tube (cm)
|
||||||
%dd #{@bike.seat_tube_height}
|
%dd= @bike.seat_tube_height
|
||||||
|
|
||||||
%dt Purpose
|
%dt Purpose
|
||||||
%dd #{@bike.bike_purpose}
|
%dd= @bike.bike_purpose
|
||||||
- if !@bike.value.nil?
|
|
||||||
|
- unless @bike.value.nil?
|
||||||
%dt Value
|
%dt Value
|
||||||
%dd #{@bike.value}
|
%dd= @bike.value
|
||||||
- if !@bike.color.nil?
|
|
||||||
|
- unless @bike.color.nil?
|
||||||
%dt Color
|
%dt Color
|
||||||
%dd{ style: "width: 50px; background-color: ##{@bike.color}; border: black; border-width: 1px; border-style: solid;"} #{@bike.color}
|
%dd
|
||||||
%a{class: "btn btn-lg btn-block btn-primary", href: edit_task_list_path(@task_list_id) } View Checklist
|
.bike-color{style: "background-color: ##{@bike.color}"} #{@bike.color}
|
||||||
|
|
||||||
|
- if @task_list
|
||||||
|
- tasks = @task_list.tasks.to_a
|
||||||
|
%dt Task list
|
||||||
|
%dd
|
||||||
|
= link_to edit_task_list_path(@task_list.id) do
|
||||||
|
#{tasks.select(&:done).count}/#{tasks.count}
|
Loading…
x
Reference in New Issue
Block a user