Merge pull request #1506 from consul/support-column

add total supports to admin's budget investments list
This commit is contained in:
Enrique García
2017-04-28 15:03:48 +02:00
committed by GitHub
4 changed files with 10 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
<tr> <tr>
<th><%= t("admin.budget_investments.index.table_id") %></th> <th><%= t("admin.budget_investments.index.table_id") %></th>
<th><%= t("admin.budget_investments.index.table_title") %></th> <th><%= t("admin.budget_investments.index.table_title") %></th>
<th><%= t("admin.budget_investments.index.table_supports") %></th>
<th><%= t("admin.budget_investments.index.table_admin") %></th> <th><%= t("admin.budget_investments.index.table_admin") %></th>
<th><%= t("admin.budget_investments.index.table_valuator") %></th> <th><%= t("admin.budget_investments.index.table_valuator") %></th>
<th><%= t("admin.budget_investments.index.table_geozone") %></th> <th><%= t("admin.budget_investments.index.table_geozone") %></th>
@@ -22,6 +23,9 @@
<td> <td>
<%= link_to investment.title, admin_budget_budget_investment_path(budget_id: @budget.id, id: investment.id, params: Budget::Investment.filter_params(params)) %> <%= link_to investment.title, admin_budget_budget_investment_path(budget_id: @budget.id, id: investment.id, params: Budget::Investment.filter_params(params)) %>
</td> </td>
<td class="text-center">
<%= investment.total_votes %>
</td>
<td class="small"> <td class="small">
<% if investment.administrator.present? %> <% if investment.administrator.present? %>
<span title="<%= t('admin.budget_investments.index.assigned_admin') %>"><%= investment.administrator.name %></span> <span title="<%= t('admin.budget_investments.index.assigned_admin') %>"><%= investment.administrator.name %></span>

View File

@@ -128,6 +128,7 @@ en:
select: "Select" select: "Select"
table_id: "ID" table_id: "ID"
table_title: "Title" table_title: "Title"
table_supports: "Supports"
table_admin: "Administrator" table_admin: "Administrator"
table_valuator: "Valuator" table_valuator: "Valuator"
table_geozone: "Scope of operation" table_geozone: "Scope of operation"

View File

@@ -128,6 +128,7 @@ es:
select: "Seleccionar" select: "Seleccionar"
table_id: "ID" table_id: "ID"
table_title: "Título" table_title: "Título"
table_supports: "Apoyos"
table_admin: "Administrador" table_admin: "Administrador"
table_valuator: "Evaluador" table_valuator: "Evaluador"
table_geozone: "Ámbito de actuación" table_geozone: "Ámbito de actuación"

View File

@@ -21,9 +21,12 @@ feature 'Admin budget investments' do
context "Index" do context "Index" do
scenario 'Displaying investmentss' do scenario 'Displaying investmentss' do
budget_investment = create(:budget_investment, budget: @budget) budget_investment = create(:budget_investment, budget: @budget, cached_votes_up: 77)
visit admin_budget_budget_investments_path(budget_id: @budget.id) visit admin_budget_budget_investments_path(budget_id: @budget.id)
expect(page).to have_content(budget_investment.title) expect(page).to have_content(budget_investment.title)
expect(page).to have_content(budget_investment.heading.name)
expect(page).to have_content(budget_investment.id)
expect(page).to have_content(budget_investment.total_votes)
end end
scenario 'Displaying assignments info' do scenario 'Displaying assignments info' do