diff --git a/app/views/spree/admin/products/index.html.haml b/app/views/spree/admin/products/index.html.haml index 3f913d3895..0a33c1c6a9 100644 --- a/app/views/spree/admin/products/index.html.haml +++ b/app/views/spree/admin/products/index.html.haml @@ -4,7 +4,6 @@ %div{ ng: { app: 'ofn.admin', controller: 'AdminProductEditCtrl', init: 'initialise()' } } = render 'spree/admin/products/index/filters' - %hr.divider.sixteen.columns.alpha.omega = render 'spree/admin/products/index/actions' = render 'spree/admin/products/index/indicators' = render 'spree/admin/products/index/products' diff --git a/app/views/spree/admin/products/index/_filters.html.haml b/app/views/spree/admin/products/index/_filters.html.haml index 30de11b7cc..5aeaf5e4f9 100644 --- a/app/views/spree/admin/products/index/_filters.html.haml +++ b/app/views/spree/admin/products/index/_filters.html.haml @@ -1,25 +1,35 @@ -.filters.sixteen.columns.alpha.omega - .quick_search.three.columns.alpha - %label{ for: 'quick_filter' } - %br - %input.quick-search.fullwidth{ ng: {model: 'query'}, name: "quick_filter", type: 'text', placeholder: t('admin.quick_search') } - .one.columns   - .filter_select.three.columns - %label{ for: 'producer_filter' }= t 'producer' - %br - %select.fullwidth{ id: 'producer_filter', 'ofn-select2-min-search' => 5, ng: {model: 'producerFilter', options: 'producer.id as producer.name for producer in producers'} } - .filter_select.three.columns - %label{ for: 'category_filter' }= t 'category' - %br - %select.fullwidth{ id: 'category_filter', 'ofn-select2-min-search' => 5, ng: {model: 'categoryFilter', options: 'taxon.id as taxon.name for taxon in taxons'} } - .filter_select.three.columns - %label{ for: 'import_filter' } Import Date - %br - %select.fullwidth{ id: 'import_date_filter', 'ofn-select2-min-search' => 5, ng: {model: 'importDateFilter', init: "importDates = #{@import_dates}; showLatestImport = #{@show_latest_import}"}} - %option{value: "{{date.id}}", ng: {repeat: "date in importDates" }} - {{date.name}} +%fieldset + %legend{align: 'center'}= t(:search) - .filter_clear.three.columns.omega - %label{ for: 'clear_all_filters' } - %br - %input.fullwidth.red{ :type => 'button', :id => 'clear_all_filters', :value => t('admin.clear_filters'), 'ng-click' => "resetSelectFilters()" } + .filters.sixteen.columns.alpha.omega + .quick_search.three.columns.alpha + %label{ for: 'quick_filter' } + %br + %input.quick-search.fullwidth{ ng: {model: 'query'}, name: "quick_filter", type: 'text', placeholder: t('admin.quick_search') } + .one.columns   + .filter_select.three.columns + %label{ for: 'producer_filter' }= t 'producer' + %br + %select.fullwidth{ id: 'producer_filter', 'ofn-select2-min-search' => 5, ng: {model: 'producerFilter', options: 'producer.id as producer.name for producer in producers'} } + .filter_select.three.columns + %label{ for: 'category_filter' }= t 'category' + %br + %select.fullwidth{ id: 'category_filter', 'ofn-select2-min-search' => 5, ng: {model: 'categoryFilter', options: 'taxon.id as taxon.name for taxon in taxons'} } + .filter_select.three.columns + %label{ for: 'import_filter' } Import Date + %br + %select.fullwidth{ id: 'import_date_filter', 'ofn-select2-min-search' => 5, ng: {model: 'importDateFilter', init: "importDates = #{@import_dates}; showLatestImport = #{@show_latest_import}"}} + %option{value: "{{date.id}}", ng: {repeat: "date in importDates" }} + {{date.name}} + + .filter_clear.three.columns.omega + %label{ for: 'clear_all_filters' } + %br + %input.fullwidth.red{ :type => 'button', :id => 'clear_all_filters', :value => t('admin.clear_filters'), 'ng-click' => "resetSelectFilters()" } + + .clearfix + + .actions.filter-actions + %div + %a.button.icon-search{'ng-click' => 'fetchProducts()'} + = t(:filter_results) diff --git a/app/views/spree/admin/products/index/_indicators.html.haml b/app/views/spree/admin/products/index/_indicators.html.haml index 14a1194550..b4b605a34b 100644 --- a/app/views/spree/admin/products/index/_indicators.html.haml +++ b/app/views/spree/admin/products/index/_indicators.html.haml @@ -2,6 +2,7 @@ {{ api_error_msg }} %div.sixteen.columns.alpha#loading{ 'ng-if' => 'RequestMonitor.loading' } + %br %img.spinner{ src: "/assets/spinning-circles.svg" } %h1= t('.title')