<% content_for(:page_title, t('.title')) %> <%= render 'spree/admin/shared/subscription_breadcrumbs', subscription: @subscription %> <%= render 'spree/admin/shared/subscription_sidebar', subscription: @subscription %> <%= render 'spree/admin/shared/subscription_tabs', current: :orders, subscription: @subscription %> <%= render 'spree/admin/shared/subscription_actions', subscription: @subscription %> <% content_for :table_filter_title do %> <%= t('spree.filter') %> <% end %> <% content_for :table_filter do %>
<%= search_form_for [:admin, @search], url: admin_subscription_subscription_orders_path(@subscription) do |f| %>
<%= label_tag :q_created_at_gt, t('spree.date_range') %>
<%= f.text_field :created_at_gt, class: 'datepicker form-control datepicker-from', placeholder: t('spree.start') %>
<%= f.text_field :created_at_lt, class: 'datepicker form-control datepicker-to', placeholder: t('spree.stop') %>
<%= label_tag :q_state_eq, t('spree.status') %> <%= f.select :state_eq, Spree::Order.state_machines[:state].states.collect {|s| [t(s.name, scope: 'spree.order_state'), s.value]}, {include_blank: true}, class: 'custom-select fullwidth' %>
<%= button_tag t('spree.filter_results'), class: 'btn btn-primary' %>
<% end %>
<% end %>
<%= t('spree.admin.subscription_orders.index.title') %> <%= paginate @subscription_orders, theme: 'solidus_admin' %> <% if @subscription_orders.any? %> <% @subscription_orders.each do |order| %> <% end %>
<%= sort_link @search, :created_at %> <%= sort_link @search, :number %> <%= sort_link @search, :state %> <%= sort_link @search, :total %>
<%= l order.created_at.to_date %> <%= link_to order.number, edit_admin_order_path(order) %> <%= t(order.state, scope: 'spree.order_state') %> <%= order.display_total.to_html %> <%= link_to_edit_url edit_admin_order_path(order), title: "admin_edit_#{dom_id(order)}", no_text: true %>
<% else %>
<%= render 'spree/admin/shared/no_objects_found', resource: Spree::Order %>
<% end %> <%= paginate @subscription_orders, theme: 'solidus_admin' %>