Merge pull request #2790 from wairbut-m2c/backport-1421-investments_csv_fixes

Add visible_to_valuators and author_username to admin investments CSV
This commit is contained in:
Alberto
2018-07-25 18:41:29 +02:00
committed by GitHub
5 changed files with 64 additions and 53 deletions

View File

@@ -16,16 +16,18 @@ class Budget::Investment::Exporter
def headers
[
I18n.t("admin.budget_investments.index.table_id"),
I18n.t("admin.budget_investments.index.table_title"),
I18n.t("admin.budget_investments.index.table_supports"),
I18n.t("admin.budget_investments.index.table_admin"),
I18n.t("admin.budget_investments.index.table_valuator"),
I18n.t("admin.budget_investments.index.table_valuation_group"),
I18n.t("admin.budget_investments.index.table_geozone"),
I18n.t("admin.budget_investments.index.table_feasibility"),
I18n.t("admin.budget_investments.index.table_valuation_finished"),
I18n.t("admin.budget_investments.index.table_selection")
I18n.t("admin.budget_investments.index.list.id"),
I18n.t("admin.budget_investments.index.list.title"),
I18n.t("admin.budget_investments.index.list.supports"),
I18n.t("admin.budget_investments.index.list.admin"),
I18n.t("admin.budget_investments.index.list.valuator"),
I18n.t("admin.budget_investments.index.list.valuation_group"),
I18n.t("admin.budget_investments.index.list.geozone"),
I18n.t("admin.budget_investments.index.list.feasibility"),
I18n.t("admin.budget_investments.index.list.valuation_finished"),
I18n.t("admin.budget_investments.index.list.selected"),
I18n.t("admin.budget_investments.index.list.visible_to_valuators"),
I18n.t("admin.budget_investments.index.list.author_username")
]
end
@@ -40,7 +42,9 @@ class Budget::Investment::Exporter
investment.heading.name,
price(investment),
investment.valuation_finished? ? I18n.t('shared.yes') : I18n.t('shared.no'),
investment.selected? ? I18n.t('shared.yes') : I18n.t('shared.no')
investment.selected? ? I18n.t('shared.yes') : I18n.t('shared.no'),
investment.visible_to_valuators? ? I18n.t('shared.yes') : I18n.t('shared.no'),
investment.author.username
]
end

View File

@@ -35,21 +35,21 @@
<table class="table-for-mobile">
<thead>
<tr>
<th><%= t("admin.budget_investments.index.table_id") %></th>
<th class="small-3"><%= 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.list.id") %></th>
<th class="small-3"><%= t("admin.budget_investments.index.list.title") %></th>
<th><%= t("admin.budget_investments.index.list.supports") %></th>
<th><%= t("admin.budget_investments.index.list.admin") %></th>
<th>
<%= t("admin.budget_investments.index.table_valuation_group") %>
<%= t("admin.budget_investments.index.table_valuator") %>
<%= t("admin.budget_investments.index.list.valuation_group") %>
<%= t("admin.budget_investments.index.list.valuator") %>
</th>
<th><%= t("admin.budget_investments.index.table_geozone") %></th>
<th><%= t("admin.budget_investments.index.table_feasibility") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.table_valuation_finished") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.table_evaluation") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.table_selection") %></th>
<th><%= t("admin.budget_investments.index.list.geozone") %></th>
<th><%= t("admin.budget_investments.index.list.feasibility") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.list.valuation_finished") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.list.visible_to_valuators") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.list.selected") %></th>
<% if params[:filter] == "selected" %>
<th class="text-center"><%= t("admin.budget_investments.index.table_incompatible") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.list.incompatible") %></th>
<% end %>
</tr>
</thead>