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

46 lines
1.6 KiB
Plaintext
Raw Normal View History

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>
<% @properties.each do |property| %>
<tr>
<td>
2018-01-17 08:17:23 +00:00
<% 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">
2017-01-20 09:02:50 +00:00
<li><a href="<%= edit_admin_property_hire_path(property, :page => params[:page]) %>"><%= t(:edit) %></a></li>
2021-09-06 16:45:14 +00:00
<li><a href="<%= custom_fields_admin_property_hire_path(property) %>"><%= t("property_hire.custom_fields") %></a></li>
2021-09-19 07:56:01 +00:00
<li><a href="<%= fields_display_order_admin_property_hire_path(property) %>"><%= t("property_hire.fields_display_order") %></a></li>
2017-01-20 09:02:50 +00:00
<li><a href="<%= admin_property_hire_path(property.id, :page => params[:page]) %>" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
2018-01-17 08:17:23 +00:00
</ul>
</div>
<% else %>
<%= property.title %>
<% end %>
2017-01-20 09:02:50 +00:00
</td>
<td>
2020-03-23 17:26:52 +00:00
<%= property.category.title rescue nil %>
2017-01-20 09:02:50 +00:00
</td>
<td>
<%= property.get_location_name %>
</td>
<td>
<% if property.can_be_hired %>
<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>