Move management investments search partial to a component

We're also moving it to the `management` subfolder, since it's only used
in the budget investments management.
This commit is contained in:
Javi Martín
2024-10-11 01:30:24 +02:00
parent b7e9d1118e
commit f8d06bcaf2
4 changed files with 12 additions and 3 deletions

View File

@@ -1,25 +0,0 @@
<%= form_for(Budget::Investment.new, url: url, as: :budget_investment, method: :get) do |f| %>
<div class="row">
<div class="small-12 medium-6 column">
<%= text_field_tag :search, "" %>
</div>
<div class="small-12 medium-6 column">
<%= select_tag :heading_id,
options_for_select(budget_heading_select_options(@budget),
params[:heading_id]),
include_blank: true %>
</div>
</div>
<div class="row">
<div class="small-12 medium-6 column">
<%= check_box_tag :unfeasible, "1", params[:unfeasible].present? %>
<%= t("admin.budget_investments.search_unfeasible") %>
</div>
</div>
<div class="row">
<div class="form-inline small-12 medium-3 column end">
<%= f.submit t("shared.search"), class: "button" %>
</div>
</div>
<% end %>

View File

@@ -1,5 +1,5 @@
<span class="not-print">
<%= render "admin/shared/budget_investment_search", url: management_budget_investments_path(@budget) %>
<%= render Management::Budgets::Investments::SearchComponent.new(@budget, url: management_budget_investments_path(@budget)) %>
</span>
<div class="wrap row">

View File

@@ -1,5 +1,5 @@
<span class="not-print">
<%= render "admin/shared/budget_investment_search", url: print_management_budget_investments_path(@budget) %>
<%= render Management::Budgets::Investments::SearchComponent.new(@budget, url: print_management_budget_investments_path(@budget)) %>
</span>
<div class="wrap row">