Sha256: 37a3e2e8c35c1d9ea12ad9b2e014168fc24fe5866027c82b27b725b5630203da

Contents?: true

Size: 1.65 KB

Versions: 5

Compression:

Stored size: 1.65 KB

Contents

<% admin_breadcrumb(link_to plural_resource_name(Spree::Product), spree.admin_products_path) %>
<% admin_breadcrumb(plural_resource_name(Spree::Prototype)) %>


<% content_for :page_actions do %>
  <% if can?(:create, Spree::Prototype) %>
    <li id="new_prototype_link">
      <%= link_to I18n.t('spree.new_prototype'), new_admin_prototype_url, {:remote => true, :id => 'new_prototype_link'} %>
    </li>
  <% end %>
<% end %>

<%# Placeholder for new prototype form %>
<div id="new_prototype_container"></div>

<% if @prototypes.any? %>
<table class="index" id='listing_prototypes' data-hook>
  <colgroup>
    <col style="width: 90%">
    <col style="width: 10%">
  </colgroup>
  <thead>
    <tr data-hook="prototypes_header">
      <th><%= Spree::Prototype.human_attribute_name(:name) %></th>
      <th class="actions"></th>
    </tr>
  </thead>
  <tbody>
    <% @prototypes.each do |prototype| %>
      <tr id="<%= spree_dom_id prototype %>" data-hook="prototypes_row" class="<%= cycle('odd', 'even')%>">
        <td style="padding-left:1em"><%= prototype.name %></td>
        <td class="actions">
          <% 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 %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
<% else %>
  <div class="alpha twelve columns no-objects-found">
    <%= render 'spree/admin/shared/no_objects_found',
                 resource: Spree::Prototype,
                 new_resource_url: new_object_url %>
  </div>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_prototypes-1.4.0 app/views/spree/admin/prototypes/index.html.erb
solidus_prototypes-1.3.0 app/views/spree/admin/prototypes/index.html.erb
solidus_prototypes-1.2.0 app/views/spree/admin/prototypes/index.html.erb
solidus_prototypes-1.1.1 app/views/spree/admin/prototypes/index.html.erb
solidus_prototypes-1.1.0 app/views/spree/admin/prototypes/index.html.erb