<% content_for :page_title do %> <%= Spree.t(:prototypes) %> <% end %> <% content_for :page_actions do %> <% if can?(:create, Spree::Prototype) %> <% end %> <% end %> <%= image_tag 'select2-spinner.gif', :plugin => 'spree', :style => 'display: none', :id => 'busy_indicator' %> <%# Placeholder for new prototype form %>
<% if @prototypes.any? %> <% @prototypes.each do |prototype| %> <% end %>
<%= Spree.t(:name) %>
<%= prototype.name %> <% if can?(:update, prototype) %> <%= link_to_edit(prototype, :no_text => true, :class => 'admin_edit_prototype') %> <% end %> <% if can?(:destroy, prototype) %> <%= link_to_delete(prototype, :no_text => true) %> <% end %>
<% else %>
<%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/prototype')) %> <% if can?(:create, Spree::Prototype) %> <%= link_to Spree.t(:add_one), spree.new_admin_prototype_path %>! <% end %>
<% end %>