Sha256: 470a27b94fb7545ee6f70cd618f914b3a349a8ecbc47069332e422c450f150d8

Contents?: true

Size: 1.48 KB

Versions: 4

Compression:

Stored size: 1.48 KB

Contents

<% content_for :page_title do %>
  <%= plural_resource_name(Spree::Prototype) %>
<% end %>

<% content_for :page_actions do %>
  <%= button_link_to Spree.t(:new_prototype), new_object_url, { class: "btn-primary", icon: 'add.svg', 'data-update' => 'new_prototype', id: 'new_prototype_link'} %>
<% end if can?(:create, Spree::Prototype) %>

<% if @prototypes.any? %>
  <div class="table-responsive border rounded bg-white">
    <table class="table" id='listing_prototypes' data-hook>
      <thead class="text-muted">
        <tr data-hook="prototypes_header">
          <th><%= Spree.t(:name) %></th>
          <th class="actions"></th>
        </tr>
      </thead>
      <tbody>
        <% @prototypes.each do |prototype| %>
          <tr id="<%= spree_dom_id prototype %>" data-hook="prototypes_row">
            <td><%= prototype.name %></td>
            <td class="actions">
              <span class="d-flex justify-content-end">
                <%= link_to_edit(prototype, no_text: true, class: 'admin_edit_prototype') if can?(:edit, prototype) %>
                <%= link_to_delete(prototype, no_text: true) if can?(:delete, prototype) %>
              </span>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>
<% else %>
  <div class="text-center no-objects-found m-5">
    <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Prototype)) %>,
    <%= link_to Spree.t(:add_one), new_object_url if can?(:create, Spree::Prototype) %>!
  </div>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_backend-4.8.4 app/views/spree/admin/prototypes/index.html.erb
spree_backend-4.8.3 app/views/spree/admin/prototypes/index.html.erb
spree_backend-4.8.2 app/views/spree/admin/prototypes/index.html.erb
spree_backend-4.8.1 app/views/spree/admin/prototypes/index.html.erb