1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-04-04 05:33:22 -04:00
BikeShed-1/app/views/bikes/show.html.haml
2016-12-22 23:47:11 +06:00

40 lines
844 B
Plaintext

- btn = if @show_add_bike
- capture do
= link_to 'Add Another Bike?', new_bike_path, class: 'btn btn-default'
= top_menu link_to_dashboard, btn
%h1 #{@bike.shop_id}: #{@bike.bike_brand}
%h4= @bike.model
%dl.dl-horizontal
%dt Type
%dd= @bike.bike_style
%dt Wheel Size
%dd= @bike.bike_wheel_size.display_string
%dt Condition
%dd= @bike.bike_condition
%dt Seat Tube (cm)
%dd= @bike.seat_tube_height
%dt Purpose
%dd= @bike.bike_purpose
- unless @bike.value.nil?
%dt Value
%dd= @bike.value
- unless @bike.color.nil?
%dt Color
%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}