mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
lk | moves notes, adds backup instructions, and shows asignees of bikes on bike page when they're present
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user