property_hire/app/views/admin/property_hires/show.html.erb

48 lines
1.6 KiB
Plaintext
Raw Normal View History

2018-01-17 07:53:58 +00:00
<%= csrf_meta_tag %>
2017-01-20 09:02:50 +00:00
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @bookings.each do |p_hire| %>
<tr>
<td>
<%= p_hire.hirer_name %>
</td>
<td>
<%= p_hire.reason_for_hire %>
</td>
<td>
<%= p_hire.hiring_person_number %>
</td>
<td>
<%= p_hire.period %>
</td>
<td>
<% if p_hire.passed %>
<span class="badge badge-success">Yes</span>
<% else %>
<span class="badge badge-important">No</span>
<% end %>
</td>
<td>
<a href="<%= show_booking_details_admin_property_hire_path(p_hire, :page => params[:page]) %>" class="btn btn-info">View</a>
<% if p_hire.passed %>
<a href="<%= pass_booking_admin_property_hire_path(p_hire, :page => params[:page], :status => "reject", :ref => "index") %>" class="btn btn-danger">Reject</a>
<% else %>
<a href="<%= pass_booking_admin_property_hire_path(p_hire, :page => params[:page], :status => "accept", :ref => "index") %>" class="btn btn-success">Accept</a>
<% end %>
2018-01-17 07:53:58 +00:00
<a href="<%= delete_booking_details_admin_property_hire_path(p_hire, :page => params[:page]) %>" class="btn btn-danger" data-method="delete" data-confirm="Are you sure?">Delete</a>
2017-01-20 09:02:50 +00:00
</td>
</tr>
<% end %>
</tbody>
</table>
<div class="bottomnav clearfix">
<a href="<%= admin_property_hires_path %>" class="btn btn-warning">Back</a>
<%= content_tag(:div, paginate(@bookings), class: "pagination pagination-centered") %>
</div>