diff --git a/app/components/management/budgets/print_investments/table_component.html.erb b/app/components/management/budgets/print_investments/table_component.html.erb new file mode 100644 index 000000000..2159a0cfe --- /dev/null +++ b/app/components/management/budgets/print_investments/table_component.html.erb @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + +
<%= t("management.budgets.table_name") %><%= t("management.budgets.table_phase") %><%= t("management.budgets.table_actions") %>
<%= budget.name %><%= budget.current_phase.name %> + <%= link_to t("management.budgets.print_investments"), + print_management_budget_investments_path(budget) %> +
diff --git a/app/components/management/budgets/print_investments/table_component.rb b/app/components/management/budgets/print_investments/table_component.rb new file mode 100644 index 000000000..4f13e14e4 --- /dev/null +++ b/app/components/management/budgets/print_investments/table_component.rb @@ -0,0 +1,7 @@ +class Management::Budgets::PrintInvestments::TableComponent < ApplicationComponent + attr_reader :budget + + def initialize(budget) + @budget = budget + end +end diff --git a/app/views/management/budgets/print_investments.html.erb b/app/views/management/budgets/print_investments.html.erb index 9bb4d7ea3..6e34bfe2f 100644 --- a/app/views/management/budgets/print_investments.html.erb +++ b/app/views/management/budgets/print_investments.html.erb @@ -1,21 +1,3 @@

<%= t("management.budgets.print_investments") %>

- - - - - - - - - - - - - - - -
<%= t("management.budgets.table_name") %><%= t("management.budgets.table_phase") %><%= t("management.budgets.table_actions") %>
<%= @budget.name %><%= @budget.current_phase.name %> - <%= link_to t("management.budgets.print_investments"), - print_management_budget_investments_path(@budget) %> -
+<%= render Management::Budgets::PrintInvestments::TableComponent.new(@budget) %>