<% content_for :page_title do %> <%= plural_resource_name(Spree::Property) %> <% end %> <% content_for :page_actions do %> <%= button_link_to Spree.t(:new_property), new_object_url, { class: "btn-success", icon: 'add.svg', 'data-update' => 'new_property', id: 'new_property_link' } %> <% end if can?(:create, Spree::Property) %> <% content_for :table_filter do %>
<%= search_form_for [:admin, @search] do |f| %> <%- locals = {f: f} %>
<%= f.label :name_cont, Spree.t(:name) %> <%= f.text_field :name_cont, class: "form-control js-quick-search-target js-filterable" %>
<%= f.label :presentation_cont, Spree.t(:presentation) %> <%= f.text_field :presentation_cont, class: "form-control js-filterable" %>
<%= button Spree.t(:search), 'search.svg' %>
<% end %>
<% end %> <% if @properties.any? %>
<% @properties.each do |property| %> <% end %>
<%= Spree.t(:name) %> <%= Spree.t(:presentation) %>
<%= property.name %> <%= property.presentation %> <%= link_to_edit(property, no_text: true) if can?(:edit, property) %> <%= link_to_delete(property, no_text: true) if can?(:delete, property) %>
<% else %>
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Property)) %>, <%= link_to Spree.t(:add_one), new_object_url if can?(:create, Spree::OptionType) %>!
<% end %> <%= paginate @collection, theme: 'admin-twitter-bootstrap-4' %>