BS3: show bike.

This commit is contained in:
Ilya Konanykhin
2016-12-22 23:47:11 +06:00
parent e8506f6fbc
commit 1106e08098
3 changed files with 32 additions and 13 deletions
+25 -12
View File
@@ -4,24 +4,37 @@
= top_menu link_to_dashboard, btn
%h2 #{@bike.shop_id}: #{@bike.bike_brand}
%h2 #{@bike.model}
%h1 #{@bike.shop_id}: #{@bike.bike_brand}
%h4= @bike.model
%dl.dl-horizontal
%dt Type
%dd #{@bike.bike_style}
%dd= @bike.bike_style
%dt Wheel Size
%dd #{@bike.bike_wheel_size.display_string}
%dd= @bike.bike_wheel_size.display_string
%dt Condition
%dd #{@bike.bike_condition}
%dd= @bike.bike_condition
%dt Seat Tube (cm)
%dd #{@bike.seat_tube_height}
%dd= @bike.seat_tube_height
%dt Purpose
%dd #{@bike.bike_purpose}
- if !@bike.value.nil?
%dd= @bike.bike_purpose
- unless @bike.value.nil?
%dt Value
%dd #{@bike.value}
- if !@bike.color.nil?
%dd= @bike.value
- unless @bike.color.nil?
%dt Color
%dd{ style: "width: 50px; background-color: ##{@bike.color}; border: black; border-width: 1px; border-style: solid;"} #{@bike.color}
%a{class: "btn btn-lg btn-block btn-primary", href: edit_task_list_path(@task_list_id) } View Checklist
%dd
.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}