diff --git a/app/assets/stylesheets/advanced_search.scss b/app/assets/stylesheets/advanced_search.scss new file mode 100644 index 000000000..367b3c579 --- /dev/null +++ b/app/assets/stylesheets/advanced_search.scss @@ -0,0 +1,30 @@ +.advanced-search { + float: left; + margin: $line-height 0; + position: inherit; + + @include breakpoint(medium) { + float: right; + margin-bottom: 0; + margin-top: $line-height / 4; + position: absolute; + right: 0; + } +} + +.advanced-search-form { + + @include breakpoint(medium) { + > .column { + padding: 0; + } + } + + select { + height: $line-height * 2; + } + + .column.end.clear { + clear: both; + } +} diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 38c4185fc..b03ac1368 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -6,6 +6,7 @@ @import "icons"; @import "mixins"; @import "admin"; +@import "advanced_search"; @import "layout"; @import "participation"; @import "milestones"; diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 4f229794e..6e46858cd 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -8,7 +8,6 @@ // 06. Forms // 07. Callout // 08. User account -// 09. Search // 10. Official levels // 11. Tables // 12. Social @@ -1480,40 +1479,6 @@ form { } } -// 09. Search -// ---------- - -.advanced-search { - float: left; - margin: $line-height 0; - position: inherit; - - @include breakpoint(medium) { - float: right; - margin-bottom: 0; - margin-top: $line-height / 4; - position: absolute; - right: 0; - } -} - -.advanced-search-form { - - @include breakpoint(medium) { - > .column { - padding: 0; - } - } - - select { - height: $line-height * 2; - } - - .column.end.clear { - clear: both; - } -} - // 10. Officials levels // -------------------- diff --git a/app/views/shared/_advanced_search.html.erb b/app/components/shared/advanced_search_component.html.erb similarity index 97% rename from app/views/shared/_advanced_search.html.erb rename to app/components/shared/advanced_search_component.html.erb index 95a45c5a5..e5333a321 100644 --- a/app/views/shared/_advanced_search.html.erb +++ b/app/components/shared/advanced_search_component.html.erb @@ -4,7 +4,7 @@
<%= form_tag request.path, id: "advanced_search_form", method: :get do %> - - <%= render "shared/advanced_search" %> + <%= render Shared::AdvancedSearchComponent.new %> <%= render "shared/order_links", i18n_namespace: "debates.index" %> diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index 73470cc84..c28790495 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -73,7 +73,7 @@ <% end %> <% unless params[:retired].present? || params[:selected].present? %> - <%= render "shared/advanced_search" %> + <%= render Shared::AdvancedSearchComponent.new %> <% end %> <% unless params[:selected].present? %>