% content_for :page_title do %>
<%= Spree.t(:prototypes) %>
<% end %>
<% content_for :page_actions do %>
<% if can?(:create, Spree::Prototype) %>
<%= button_link_to Spree.t(:new_prototype), new_admin_prototype_url, {:remote => true, :icon => 'plus', 'data-update' => 'new_prototype', :id => 'new_prototype_link'} %>
<% end %>
<% end %>
<%= image_tag 'select2-spinner.gif', :plugin => 'spree', :style => 'display: none', :id => 'busy_indicator' %>
<%# Placeholder for new prototype form %>
<% if @prototypes.any? %>
<%= Spree.t(:name) %> |
|
<% @prototypes.each do |prototype| %>
<%= 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 %>
|
<% 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 %>