Sha256: 6f3ddb1cfda1a1cd9cc11a222139a723bfbf659da76ead3bb2b97c6b08994857

Contents?: true

Size: 1.78 KB

Versions: 98

Compression:

Stored size: 1.78 KB

Contents

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

<% content_for :page_actions do %>
  <%= button_link_to Spree.t(:new_stock_location), new_object_url, { class: "btn-success", icon: 'add', id: 'admin_new_stock_location' } %>
<% end if can? :create, Spree::StockLocation %>

<% if @stock_locations.any? %>
  <table class="table" id='listing_stock_locations' data-hook>
    <thead>
      <tr data-hook="stock_locations_header">
        <th><%= Spree.t(:name) %></th>
        <th><%= Spree.t(:status) %></th>
        <th><%= Spree.t(:stock_movements) %></th>
        <th class="actions"></th>
      </tr>
    </thead>
    <tbody>
      <% @stock_locations.each do |stock_location|
           @edit_url = edit_admin_stock_location_path(stock_location)
           @delete_url = admin_stock_location_path(stock_location)
      %>
        <tr id="<%= spree_dom_id stock_location %>" data-hook="stock_location_row">
          <td><%= display_name(stock_location) %></td>
          <td><span class="state <%= state(stock_location) %>"><%= Spree.t(state(stock_location)) %></span></td>
          <td><%= link_to Spree.t(:stock_movements), admin_stock_location_stock_movements_path(stock_location.id) %> </td>
          <td class="actions actions-2 text-center">
            <%= link_to_edit(stock_location, no_text: true) if can? :create, stock_location %>
            <%= link_to_delete(stock_location, no_text: true) if can? :create, stock_location %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% else %>
  <div class="alert alert-info no-objects-found">
    <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::StockLocation)) %>,
    <%= link_to(Spree.t(:add_one), new_object_url) if can? :create, Spree::StockLocation %>!
  </div>
<% end %>

Version data entries

98 entries across 98 versions & 1 rubygems

Version Path
spree_backend-4.0.9 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.1.15 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.1.14 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.0.8 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-3.7.14.1 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.1.13.1 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.0.7.1 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.0.7 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-3.7.14 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.1.13 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.0.6 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-3.7.13 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.0.5 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.1.12 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-3.7.12 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.0.4 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-3.7.11 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.1.11 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.1.10 app/views/spree/admin/stock_locations/index.html.erb
spree_backend-4.1.9 app/views/spree/admin/stock_locations/index.html.erb