Sha256: 8a4c368096249fb26f331647617e51366e1b8860b0404cc69f6b2ce3104bb78d
Contents?: true
Size: 1.92 KB
Versions: 8
Compression:
Stored size: 1.92 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.svg', id: 'admin_new_stock_location' } %> <% end if can? :create, Spree::StockLocation %> <% if @stock_locations.any? %> <div class="table-responsive border rounded bg-white"> <table class="table" id='listing_stock_locations' data-hook> <thead class="text-muted"> <tr data-hook="stock_locations_header"> <th><%= Spree.t(:name) %></th> <th><%= Spree.t(:stock_movements) %></th> <th><%= Spree.t(:status) %></th> <th class="actions"></th> </tr> </thead> <tbody> <% @stock_locations.each do |stock_location| @edit_url = spree.edit_admin_stock_location_path(stock_location) @delete_url = spree.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><%= link_to Spree.t(:stock_movements), spree.admin_stock_location_stock_movements_path(stock_location.id) %> </td> <td><%= active_badge(stock_location.active, label: Spree.t(state(stock_location))) %></td> <td class="actions"> <span class="d-flex justify-content-end"> <%= 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 %> </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::StockLocation)) %>, <%= link_to(Spree.t(:add_one), new_object_url) if can? :create, Spree::StockLocation %>! </div> <% end %>
Version data entries
8 entries across 8 versions & 1 rubygems