From 8296a4131eec42ce3c220e7ea07010731958acf7 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Thu, 10 Jul 2014 12:07:21 +1000 Subject: [PATCH] Partializing filter controls --- app/views/home/_filters.html.haml | 7 +------ app/views/producers/_filters.html.haml | 7 +------ app/views/shared/components/_filter_controls.html.haml | 6 ++++++ 3 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 app/views/shared/components/_filter_controls.html.haml diff --git a/app/views/home/_filters.html.haml b/app/views/home/_filters.html.haml index cf157a611e..4fd3360d5c 100644 --- a/app/views/home/_filters.html.haml +++ b/app/views/home/_filters.html.haml @@ -1,9 +1,4 @@ -.row - .small-12.columns - %a.button.primary.tiny.filterbtn{{"ng-click" => "filtersActive = !filtersActive"}} - {{ filterText(filtersActive) }} - %i.ofn-i_005-caret-down{"ng-show" => "!filtersActive"} - %i.ofn-i_006-caret-up{"ng-show" => "filtersActive"} += render partial: 'shared/components/filter_controls' .row.animate-show{"ng-show" => "filtersActive"} .small-12.columns diff --git a/app/views/producers/_filters.html.haml b/app/views/producers/_filters.html.haml index d5158858b1..0f1f2f483a 100644 --- a/app/views/producers/_filters.html.haml +++ b/app/views/producers/_filters.html.haml @@ -1,9 +1,4 @@ -.row - .small-12.columns - %a.button.primary.tiny.filterbtn{{"ng-click" => "filtersActive = !filtersActive"}} - {{ filterText(filtersActive) }} - %i.ofn-i_005-caret-down{"ng-show" => "!filtersActive"} - %i.ofn-i_006-caret-up{"ng-show" => "filtersActive"} += render partial: 'shared/components/filter_controls' .row.animate-show{"ng-show" => "filtersActive"} .small-12.columns diff --git a/app/views/shared/components/_filter_controls.html.haml b/app/views/shared/components/_filter_controls.html.haml new file mode 100644 index 0000000000..7fe95c324a --- /dev/null +++ b/app/views/shared/components/_filter_controls.html.haml @@ -0,0 +1,6 @@ +.row + .small-12.columns + %a.button.primary.tiny.filterbtn{{"ng-click" => "filtersActive = !filtersActive"}} + {{ filterText(filtersActive) }} + %i.ofn-i_005-caret-down{"ng-show" => "!filtersActive"} + %i.ofn-i_006-caret-up{"ng-show" => "filtersActive"}