mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 16:41:38 -04:00
lk | removes show action for clients
This commit is contained in:
@@ -63,7 +63,10 @@
|
||||
.form-group
|
||||
= f.label "Bike:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.select :bike_id, options_for_select( Bike.available_for_freecyclery.collect{|b| [ b.name, b.id ]}, @client.bike_id ), {include_blank: 'None'}, class: "selectpicker", disabled: disabled
|
||||
- if @client.bike_id
|
||||
= f.select :bike_id, options_for_select( Bike.available_for_freecyclery.collect{|b| [ b.name, b.id ]} + [[@client.bike.name, @client.bike_id]], @client.bike_id ), {include_blank: 'None'}, class: "selectpicker", disabled: disabled
|
||||
- else
|
||||
= f.select :bike_id, options_for_select( Bike.available_for_freecyclery.collect{|b| [ b.name, b.id ]}, @client.bike_id ), {include_blank: 'None'}, class: "selectpicker", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Agency:", class: "col-sm-2 control-label"
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
.container
|
||||
%h1 Edit client
|
||||
= render 'form'
|
||||
= link_to 'Show', @client
|
||||
|
|
||||
= render 'form'
|
||||
= link_to 'Back', clients_path
|
||||
|
||||
@@ -8,25 +8,21 @@
|
||||
%thead
|
||||
%tr
|
||||
%th Number
|
||||
%th First Name
|
||||
%th First Name
|
||||
%th Last Name
|
||||
%th Application Date
|
||||
%th Agency
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
- @waiting_list.each_with_index do |client, index|
|
||||
%tr
|
||||
%td= index + 1
|
||||
%td= client.first_name
|
||||
%td= client.last_name
|
||||
%td= client.first_name
|
||||
%td= client.last_name
|
||||
%td= client.application_date
|
||||
%td= client.agency.agency_name if client.agency
|
||||
%td= link_to 'Show', client
|
||||
%td= link_to 'Edit', edit_client_path(client)
|
||||
%td= link_to 'Destroy', client, method: :delete, data: { confirm: 'Are you sure?' }
|
||||
|
||||
|
||||
%br
|
||||
.row
|
||||
%h1 All Clients
|
||||
@@ -34,20 +30,16 @@
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%tr
|
||||
%th First Name
|
||||
%th First Name
|
||||
%th Last Name
|
||||
%th Agency
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
- @clients.each do |client|
|
||||
%tr
|
||||
%td= client.first_name
|
||||
%td= client.last_name
|
||||
%td= client.first_name
|
||||
%td= client.last_name
|
||||
%td= client.agency.agency_name if client.agency
|
||||
%td= link_to 'Show', client
|
||||
%td= link_to 'Edit', edit_client_path(client)
|
||||
%td= link_to 'Destroy', client, method: :delete, data: { confirm: 'Are you sure?' }
|
||||
|
||||
|
||||
%br
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
.container
|
||||
%p#notice= notice
|
||||
= form_for(@client) do |f|
|
||||
= render 'fields', f: f, disabled: true
|
||||
= link_to 'Edit', edit_client_path(@client)
|
||||
|
|
||||
= link_to 'Back', clients_path
|
||||
Reference in New Issue
Block a user