diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 04f4a5ff6..e327534b1 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -1,6 +1,6 @@ <% provide :title do %><%= t('debates.index.title') %><% end %> <% content_for :header_addon do %> - <%= render "shared/search_form_header", + <%= render "shared/search_form", search_path: debates_path(page: 1), i18n_namespace: "debates.index.search_form" %> <% end %> diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index 6a08a1646..71a7a596a 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -1,6 +1,6 @@ <% provide :title do %><%= t('proposals.index.title') %><% end %> <% content_for :header_addon do %> - <%= render "shared/search_form_header", + <%= render "shared/search_form", search_path: proposals_path(page: 1), i18n_namespace: "proposals.index.search_form" %> <% end %> diff --git a/app/views/shared/_search_form.html.erb b/app/views/shared/_search_form.html.erb index 1c0344993..9631bd4a1 100644 --- a/app/views/shared/_search_form.html.erb +++ b/app/views/shared/_search_form.html.erb @@ -1,27 +1,22 @@ -<% # Params: - # - # search_path: for example debates_path - # i18n_namespace: for example "debates.index.search_form" -%> - -
- -

<%= t("#{i18n_namespace}.title") %>

-
+
+ <%= form_tag search_path, method: :get do %> -
-
- -
- " class="search-form"> -
-
- "> -
- +
+
+
+ + " class="search-form"> +
+
+
+
<% end %> +
diff --git a/app/views/shared/_search_form_header.html.erb b/app/views/shared/_search_form_header.html.erb deleted file mode 100644 index 9631bd4a1..000000000 --- a/app/views/shared/_search_form_header.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -
-
- - <%= form_tag search_path, method: :get do %> -
-
-
- - " class="search-form"> -
-
- -
-
-
- <% end %> - -
-