1
0
mirror of https://github.com/fspc/bike-database.git synced 2025-02-22 09:13:23 -05:00
bike-database/app/views/clients/index.html.haml

54 lines
1.5 KiB
Plaintext

.container
.row
= link_to ' + New Client', new_client_path, class: "btn btn-default"
.row
%h1 Client Waiting List
%table.table.table-striped.table-bordered.table-hover
%thead
%tr
%th Number
%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.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
%table.table.table-striped.table-bordered.table-hover
%thead
%tr
%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.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