<% admin_layout "full-width" %> <% admin_breadcrumb(plural_resource_name(Spree::Auction)) %> <% content_for :page_actions do %>
  • <%= link_to t('spree.new_auction'), new_object_url, class: 'btn btn-primary' %>
  • <% end if can?(:create, Spree::Auction) %>
    <% if @collection.count > 0 %> <% @collection.each do |auction| %> id="<%= spree_dom_id auction %>" data-hook="admin_auctions_index_rows"> <% end %>
    <%= Spree.t("title") %> <%= Spree.t("starting_price") %> <%= Spree.t("current_price") %> <%= Spree.t("bids") %> <%= Spree.t("starting_datetime") %> <%= Spree.t("current_end_datetime") %> <%= Spree.t("ends_in") %>
    <%= auction.title %> <%= auction.display_starting_price %> <%= auction.display_current_price %> <%= auction.visible_bids.count %> <%= local_time(auction.starting_datetime) %> <%= local_time(auction.current_end_datetime) %> <% if auction.complete %> <%= Spree.t("complete") %> <% elsif auction.started? %> <%= render partial: 'spree/shared/ends_in', locals: { auction: auction } %> <% else %> <%= Spree.t("waiting_to_start") %> <% end %> <%= link_to_edit auction, no_text: true, class: 'edit' if can?(:edit, auction) && !auction.deleted? %>   <% if !auction.complete %> <%= link_to_delete auction, no_text: true if can?(:delete, auction) && !auction.deleted? %> <% end %>
    <% else %>
    <%= render 'spree/admin/shared/no_objects_found', resource: Spree::Auction, new_resource_url: new_object_url %>
    <% end %>