app/views/comable/admin/orders/index.slim in comable_backend-0.3.4 vs app/views/comable/admin/orders/index.slim in comable_backend-0.4.0

- old
+ new

@@ -7,10 +7,19 @@ .btn.btn-default disabled="disabled" | < = link_to_next_page @orders, '>', class: 'btn btn-default' do .btn.btn-default disabled="disabled" | > + li.dropdown + = link_to '#', class: 'btn btn-default', 'data-toggle' => 'dropdown' do + = Comable.t('admin.more') + i.fa.fa-angle-down< + ul.dropdown-menu.dropdown-menu-right + li + = link_to Comable.t('admin.export_to_csv'), comable.export_admin_orders_path(format: :csv, q: params[:q]) + li + = link_to Comable.t('admin.export_to_excel'), comable.export_admin_orders_path(format: :xlsx, q: params[:q]) h1.page-header = Comable.t('admin.nav.order') small< | #{@orders.total_count} #{Comable.t('admin.results')} @@ -30,12 +39,12 @@ = link_to Comable.t('admin.clear_search_conditions'), comable.admin_orders_path = f.text_field :code_cont, class: 'form-control' span.input-group-btn = f.submit Comable.t('admin.search'), class: 'btn btn-default' .hidden - = f.label :customer_id - = f.text_field :customer_id_eq + = f.label :user_id + = f.text_field :user_id_eq = render 'comable/admin/shared/advanced_search', f: f section - if @orders.empty? @@ -44,16 +53,19 @@ table.table.table-striped thead th = sort_link [:comable, @q], :code th - / TODO: Change to shipment_state and payment_state = sort_link [:comable, @q], :state th + = @orders.klass.human_attribute_name(:payment_state) + th + = @orders.klass.human_attribute_name(:shipment_state) + th = @orders.klass.human_attribute_name(:bill_full_name) th - = @orders.klass.human_attribute_name(:order_details) + = @orders.klass.human_attribute_name(:order_items) th = sort_link [:comable, @q], :total_price th = sort_link [:comable, @q], :completed_at tbody @@ -62,15 +74,19 @@ td = link_to order.code, comable.admin_order_path(order) td = order.human_state_name td + = order.payment_human_state_name + td + = order.shipment_human_state_name + td = order.bill_full_name td ul.list-unstyled - - order.order_details.each do |order_detail| + - order.order_items.each do |order_item| li - | #{order_detail.name_with_sku} x #{order_detail.quantity} + | #{order_item.name_with_sku} x #{order_item.quantity} td = number_to_currency order.total_price td = l order.completed_at