|
|
|
- btn = if @show_add_bike
|
|
|
|
- capture do
|
|
|
|
= link_to 'Add Another Bike?', new_bike_path, class: 'btn btn-default navbar-btn hidden-xs'
|
|
|
|
= link_to new_bike_path, class: 'navbar-brand visible-xs', title: 'Add Another Bike?' do
|
|
|
|
%i.glyphicon.glyphicon-plus
|
|
|
|
|
|
|
|
= top_menu btn
|
|
|
|
|
|
|
|
%h1 #{@bike.shop_id}: #{@bike.bike_brand}
|
|
|
|
%h4= @bike.model
|
|
|
|
|
|
|
|
.form-horizontal
|
|
|
|
- if @bike.photo?
|
|
|
|
.form-group
|
|
|
|
%label.col-sm-2.control-label Photo
|
|
|
|
.col-sm-10
|
|
|
|
= link_to @bike.photo.url, target: '_blank' do
|
|
|
|
%img{src: @bike.photo.url(:thumb), class: 'img-thumbnail'}
|
|
|
|
|
|
|
|
.form-group
|
|
|
|
%label.col-sm-2.control-label Type
|
|
|
|
.col-sm-10.form-control-static= @bike.bike_style
|
|
|
|
|
|
|
|
.form-group
|
|
|
|
%label.col-sm-2.control-label Wheel Size
|
|
|
|
.col-sm-10.form-control-static= @bike.bike_wheel_size.display_string
|
|
|
|
|
|
|
|
.form-group
|
|
|
|
%label.col-sm-2.control-label Condition
|
|
|
|
.col-sm-10.form-control-static= @bike.bike_condition
|
|
|
|
|
|
|
|
.form-group
|
|
|
|
%label.col-sm-2.control-label Seat Tube (cm)
|
|
|
|
.col-sm-10.form-control-static= @bike.seat_tube_height
|
|
|
|
|
|
|
|
.form-group
|
|
|
|
%label.col-sm-2.control-label Purpose
|
|
|
|
.col-sm-10.form-control-static= @bike.bike_purpose
|
|
|
|
|
|
|
|
- unless @bike.value.nil?
|
|
|
|
.form-group
|
|
|
|
%label.col-sm-2.control-label Value
|
|
|
|
.col-sm-10.form-control-static= @bike.value
|
|
|
|
|
|
|
|
- unless @bike.color.nil?
|
|
|
|
.form-group
|
|
|
|
%label.col-sm-2.control-label Color
|
|
|
|
.col-sm-10.form-control-static
|
|
|
|
.bike-color(style="background-color: ##{@bike.color}")= @bike.color
|
|
|
|
|
|
|
|
- if @task_list
|
|
|
|
- tasks = @task_list.tasks.to_a
|
|
|
|
.form-group
|
|
|
|
%label.col-sm-2.control-label Task list
|
|
|
|
.col-sm-10.form-control-static
|
|
|
|
= link_to edit_task_list_path(@task_list.id) do
|
|
|
|
#{tasks.select(&:done).count}/#{tasks.count}
|