lk | removes show action for clients

This commit is contained in:
Louis Knapp
2015-10-11 13:47:40 -05:00
parent 1d1b417ba9
commit 9f9cf5e6ba
9 changed files with 32 additions and 63 deletions
+4 -1
View File
@@ -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 -3
View File
@@ -1,6 +1,4 @@
.container
%h1 Edit client
= render 'form'
= link_to 'Show', @client
|
= render 'form'
= link_to 'Back', clients_path
+8 -16
View File
@@ -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
-7
View File
@@ -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
@@ -5,15 +5,15 @@
%table.table.table-striped.table-bordered.table-hover
%thead
%tr
%th Name
%th Name
%th Voided
%th Completed
%th Show
%th Edit
%tbody
- @closed_applications.each do |client|
%tr
%td= client.name
%td= client.name
%td= client.application_voided
%td= client.completion_date
%td= link_to 'Show', client
%td= link_to 'Edit', edit_client_path(client)
%br
+6 -6
View File
@@ -3,7 +3,7 @@
.receipt
%h2
%strong= @client.bike.name
%br
%br
= 'Log Number: ' + @client.bike.log_number.to_s
%br
.horizontal-line
@@ -13,7 +13,7 @@
= @client.agency.agency_name
.horizontal-line
%br
= 'Paid $25 for lock and helmet' if @client.will_pay
= 'Paid $25 for lock and helmet' if @client.will_pay
%br
Includes:
%br
@@ -30,7 +30,7 @@
%br
________________
%br
Recyclery Volunteer Initials
Recyclery Volunteer Initials
%br
___
%br
@@ -40,7 +40,7 @@
.receipt
%h2
%strong= @client.bike.name
%br
%br
= 'Log Number: ' + @client.bike.log_number.to_s
%br
.horizontal-line
@@ -50,7 +50,7 @@
= @client.agency.agency_name
.horizontal-line
%br
= 'Paid $25 for lock and helmet' if @client.will_pay
= 'Paid $25 for lock and helmet' if @client.will_pay
%br
Includes:
%br
@@ -67,7 +67,7 @@
%br
________________
%br
Recyclery Volunteer Initials
Recyclery Volunteer Initials
%br
___
%br