.comable-page .comable-page-heading ul.pull-right.list-inline li .btn-group role="group" = link_to_previous_page @stocks, '<', class: 'btn btn-default' do .btn.btn-default disabled="disabled" | < = link_to_next_page @stocks, '>', 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_stocks_path(format: :csv, q: params[:q]) li = link_to Comable.t('admin.export_to_excel'), comable.export_admin_stocks_path(format: :xlsx, q: params[:q]) li.divider li a.btn-file span> = Comable.t('admin.import') = form_tag comable.import_admin_stocks_path, multipart: true do = file_field_tag :file h1.page-header = Comable.t('admin.nav.stock') small< | #{@stocks.total_count} #{Comable.t('admin.results')} .comable-page-body .comable-search = search_form_for @q, url: comable.admin_stocks_path do |f| .input-group span.input-group-btn button.btn.btn-default.dropdown-toggle type="button" data-toggle="dropdown" i.fa.fa-search span.caret< ul.dropdown-menu role="menu" li = link_to Comable.t('admin.advanced_search'), 'javascript:void(0)', 'data-toggle' => 'collapse', 'data-target' => '#comable-advanced-search' li = link_to Comable.t('admin.clear_search_conditions'), comable.admin_stocks_path = f.text_field :variant_sku_cont, class: 'form-control' span.input-group-btn = f.submit Comable.t('admin.search'), class: 'btn btn-default' = render 'comable/admin/shared/advanced_search', f: f section - if @stocks.empty? = Comable.t('admin.not_found') - else table.table.table-striped thead th = sort_link [:comable, @q], :name th = sort_link [:comable, @q], :sku th = sort_link [:comable, @q], :quantity tbody - @stocks.each do |stock| tr td p = link_to stock.variant.product.name, comable.admin_product_variant_path(stock.variant.product, stock.variant) - if stock.variant.options.any? p - stock.variant.options.each do |option| span.comable-variant-name = option.value td = stock.variant.sku td strong class="#{(stock.quantity <= 0) ? 'text-danger' : (stock.quantity <= 10) ? 'text-warning' : 'text-success'}" = number_with_delimiter stock.quantity .text-center = paginate @stocks, theme: :comable_backend