Orders - actions view

<% if @filter_paid %> <%= link_to 'Show unpaid', vendor_orders_path(actions_view:true, filter_paid: false), class: 'btn btn-primary btn-xs' %> <%else %> <%= link_to 'Exclude unpaid', vendor_orders_path(actions_view:true, filter_paid: true), class: "btn btn-primary btn-xs #{@filter_archived_only ? 'disabled' : ''}" %> <%end%> <% if @filter_archived_only %> <%= link_to 'Show unarchived', vendor_orders_path(actions_view:true, filter_archived_only: false), class: 'btn btn-primary btn-xs' %> <%else%> <%= link_to 'Show archived', vendor_orders_path(actions_view:true, filter_archived_only: true), class: 'btn btn-primary btn-xs' %> <%end%> <%= link_to 'Normal view', vendor_orders_path(filter_archived_only: @filter_archived_only, filter_paid: @filter_paid), class: 'btn btn-primary btn-xs' %>

<%= form_tag(vendor_orders_actions_path(filter_archived_only: @filter_archived_only, filter_paid: @filter_paid)) do %> <% @orders.each do |order| %> <%end%> <%end%><%# form_tag %>
Order date Product Buyer Status Payout accept shipped archive delete
<%= order.created_at.in_time_zone(current_user.timezone).strftime('%F') %> <%= order.title %> <%= link_to truncate(order.buyer.displayname, length:15), profile_path(order.buyer) %> <% labeltype = (order.status == Order::EXPIRED) ? 'warning' : 'primary' %> <%= order.status %> <% if order.vendor_payout %> <% if order.vendor_payout.paid %> paid <%elsif order.vendor_payout.btc_address %> pending <%else%> no address set <%end%> <%else%> n/a <%end%> <% if order.allow_accept? %> <%= check_box_tag('accept_ids[]', order.id, false, class: 'checkbox') %> <% end %> <% if order.allow_shipped? %> <%= check_box_tag('shipped_ids[]', order.id, false, class: 'checkbox') %> <% end %> <% if order.allow_vendor_archive? %> <%= check_box_tag('archive_ids[]', order.id, false, class: 'checkbox') %> <% end %> <% if order.allow_vendor_delete? %> <%= check_box_tag('delete_ids[]', order.id, false, class: 'checkbox') %> <% end %> <%= link_to 'Details', vendor_order_path(order), class: "btn btn-default btn-sm" %>
Order count: <%=@orders_count%>

<%= submit_tag 'Apply actions', class: 'btn btn-primary form-button' %>

Actions are applied immediately, without confirmation.