Sha256: e5ab5a1a098a2a697d387444e95e790b93581daf50ce6340070c6d5fa05d57d1

Contents?: true

Size: 1.65 KB

Versions: 8

Compression:

Stored size: 1.65 KB

Contents

<% content_for :page_title do %>
  <%= page_title %>
<% end %>

<% content_for :page_actions do %>
  <%= button_link_to new_button_text, new_object_url, { icon: 'add.svg', id: 'admin_new_named_type', class: "btn-success" } %>
<% end if can? :create, resource %>

<% if @collection.any? %>
<div class="table-responsive border rounded bg-white">
  <table class="table" id='listing_named_types' data-hook>
    <thead class="text-muted">
      <tr data-hook="named_types_header">
        <th><%= Spree.t(:name) %></th>
        <th><%= Spree.t(:status) %></th>
        <th></th>
      </tr>
    </thead>
    <tbody id="<%= resource_name.to_s.parameterize.underscore %>">
      <% @collection.each do |named_type| %>
        <tr id="<%= spree_dom_id named_type %>" data-hook="named_type_row">
          <td class="align-center">
            <%= named_type.name %>
          </td>
          <td class="align-center">
            <%= active_badge(named_type.active, label: Spree.t(named_type.active? ? :active : :inactive)) %>
          </td>
          <td class="actions">
            <span class="d-flex justify-content-end">
              <% if named_type.mutable? %>
                <%= link_to_edit(named_type, no_text: true) if can? :edit, named_type %>
                <%= link_to_delete(named_type, no_text: true) if can? :delete, named_type %>
              <% end %>
            </span>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
<% else %>
  <div class="text-center no-objects-found m-5">
    <%= Spree.t(:no_resource_found, resource: resource_name) %>,
    <%= link_to(Spree.t(:add_one), new_object_url) if can? :create, resource %>!
  </div>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
spree_backend-4.7.2 app/views/spree/admin/shared/named_types/_index.html.erb
spree_backend-4.6.2 app/views/spree/admin/shared/named_types/_index.html.erb
spree_backend-4.7.1 app/views/spree/admin/shared/named_types/_index.html.erb
spree_backend-4.7.0 app/views/spree/admin/shared/named_types/_index.html.erb
spree_backend-4.6.1 app/views/spree/admin/shared/named_types/_index.html.erb
spree_backend-4.6.0 app/views/spree/admin/shared/named_types/_index.html.erb
spree_backend-4.5.1 app/views/spree/admin/shared/named_types/_index.html.erb
spree_backend-4.5.0 app/views/spree/admin/shared/named_types/_index.html.erb