lk | moves notes, adds backup instructions, and shows asignees of bikes on bike page when they're present

This commit is contained in:
Louis Knapp
2017-05-01 17:14:53 -05:00
parent f656c1af87
commit fa2c2ede08
5 changed files with 32 additions and 0 deletions
+1
View File
@@ -16,6 +16,7 @@ class BikesController < ApplicationController
def edit
@next_bike = Bike.where(log_number: @bike.log_number + 1).first
@previous_bike = Bike.where(log_number: @bike.log_number - 1).first
@client = @bike.client
end
def print_select
+6
View File
@@ -4,6 +4,12 @@
%h1 Edit bike
.col-sm-3.col-sm-offset-3
=button_to "Mark as sold", {action: "mark_as_sold", id: @bike.id}, method: :patch, class: "btn btn-default", disabled: @bike.sold?
- if @client
.row
.col-sm-12
%h4
%span Assigned To
= link_to @client.name, edit_client_path(@client)
= render 'edit_form'
.bottom-nav-links
- if @previous_bike