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

47 lines
1.7 KiB
Plaintext
Raw Normal View History

2022-11-24 09:31:30 +00:00
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @properties.each do |property| %>
<tr>
<td>
<% if can_edit_or_delete?(property) %>
<a href="<%= admin_property_hire_path(property) %>"><%= property.title %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
<li><a href="<%= edit_admin_property_hire_path(property, :page => params[:page]) %>"><%= t(:edit) %></a></li>
2024-05-14 00:59:52 +00:00
<li><a href="<%= copy_admin_property_hire_path(property, :page => params[:page]) %>"><%= t("property_hire.copy") %></a></li>
2022-11-24 09:31:30 +00:00
<li><a href="<%= custom_fields_admin_property_hire_path(property) %>"><%= t("property_hire.custom_fields") %></a></li>
<li><a href="<%= fields_display_order_admin_property_hire_path(property) %>"><%= t("property_hire.fields_display_order") %></a></li>
<li><a href="<%= admin_property_hire_path(property.id, :page => params[:page]) %>" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
</ul>
</div>
<% else %>
<%= property.title %>
<% end %>
</td>
<td>
<%= property.category.title rescue nil %>
</td>
<td>
<%= property.get_location_name %>
</td>
<td>
2024-07-11 07:42:16 +00:00
<% if property.can_reserve %>
2022-11-24 09:31:30 +00:00
<span class="badge badge-success">Yes</span>
<% else %>
<span class="badge badge-important">No</span>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<div class="bottomnav clearfix">
<%= content_tag(:div, paginate(@properties), class: "pagination pagination-centered") %>
</div>