Velocipede's User, Sales, and Bike Inventory Web App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.7 KiB

8 years ago
- 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
8 years ago
%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
8 years ago
- unless @bike.value.nil?
.form-group
%label.col-sm-2.control-label Value
.col-sm-10.form-control-static= @bike.value
8 years ago
- 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
8 years ago
- 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}