<% slice.each do |filter| %>
@@ -18,37 +18,43 @@
<%= render 'shared/filter_subnav', i18n_namespace: "valuation.budget_investments.index" %>
-
<%= page_entries_info @investments %>
+<% if @investments.any? %>
+
<%= page_entries_info @investments %>
-
-
-
- | <%= t("valuation.budget_investments.index.table_id") %> |
- <%= t("valuation.budget_investments.index.table_title") %> |
- <%= t("valuation.budget_investments.index.table_heading_name") %> |
- <%= t("valuation.budget_investments.index.table_actions") %> |
-
-
-
- <% @investments.each do |investment| %>
-
- |
- <%= investment.id %>
- |
-
- <%= link_to investment.title, valuation_budget_budget_investment_path(@budget, investment) %>
- |
-
- <%= investment.heading.name %>
- |
-
- <%= link_to t("valuation.budget_investments.index.edit"),
- edit_valuation_budget_budget_investment_path(@budget, investment),
- class: "button hollow expanded" %>
- |
+
+
+
+ | <%= t("valuation.budget_investments.index.table_id") %> |
+ <%= t("valuation.budget_investments.index.table_title") %> |
+ <%= t("valuation.budget_investments.index.table_heading_name") %> |
+ <%= t("valuation.budget_investments.index.table_actions") %> |
- <% end %>
-
-
+
+
+ <% @investments.each do |investment| %>
+
+ |
+ <%= investment.id %>
+ |
+
+ <%= link_to investment.title, valuation_budget_budget_investment_path(@budget, investment) %>
+ |
+
+ <%= investment.heading.name %>
+ |
+
+ <%= link_to t("valuation.budget_investments.index.edit"),
+ edit_valuation_budget_budget_investment_path(@budget, investment),
+ class: "button hollow expanded" %>
+ |
+
+ <% end %>
+
+
-<%= paginate @investments %>
+ <%= paginate @investments %>
+<% else %>
+
+ <%= t("valuation.budget_investments.index.no_investments") %>
+
+<% end %>
diff --git a/config/locales/en/valuation.yml b/config/locales/en/valuation.yml
index 18fb6ab87..116a86c5a 100644
--- a/config/locales/en/valuation.yml
+++ b/config/locales/en/valuation.yml
@@ -35,6 +35,7 @@ en:
table_title: Title
table_heading_name: Heading name
table_actions: Actions
+ no_investments: "There are no investment projects."
show:
back: Back
title: Investment project
diff --git a/config/locales/es/valuation.yml b/config/locales/es/valuation.yml
index 48fb68846..0cbd71b1e 100644
--- a/config/locales/es/valuation.yml
+++ b/config/locales/es/valuation.yml
@@ -35,6 +35,7 @@ es:
table_title: TÃtulo
table_heading_name: Nombre de la partida
table_actions: Acciones
+ no_investments: "No hay proyectos de gasto."
show:
back: Volver
title: Proyecto de gasto
diff --git a/spec/features/admin/budget_investments_spec.rb b/spec/features/admin/budget_investments_spec.rb
index 1cc2c36a3..a745be1c1 100644
--- a/spec/features/admin/budget_investments_spec.rb
+++ b/spec/features/admin/budget_investments_spec.rb
@@ -91,33 +91,6 @@ feature 'Admin budget investments' do
end
end
- scenario 'Display valuator group assignments' do
- budget_investment1 = create(:budget_investment, budget: budget)
- budget_investment2 = create(:budget_investment, budget: budget)
- budget_investment3 = create(:budget_investment, budget: budget)
-
- health_group = create(:valuator_group, name: "Health")
- culture_group = create(:valuator_group, name: "Culture")
-
- budget_investment1.valuator_groups << health_group
- budget_investment2.valuator_group_ids = [health_group.id, culture_group.id]
-
- visit admin_budget_budget_investments_path(budget_id: budget)
-
- within("#budget_investment_#{budget_investment1.id}") do
- expect(page).to have_content("Health")
- end
-
- within("#budget_investment_#{budget_investment2.id}") do
- expect(page).to have_content("Health")
- expect(page).to have_content("Culture")
- end
-
- within("#budget_investment_#{budget_investment3.id}") do
- expect(page).to have_content("No valuation groups assigned")
- end
- end
-
scenario "Filtering by budget heading", :js do
group1 = create(:budget_group, name: "Streets", budget: budget)
group2 = create(:budget_group, name: "Parks", budget: budget)