Merge branch 'budget' into admin-budgets

This commit is contained in:
Juanjo Bazán
2016-09-09 15:13:05 +02:00
11 changed files with 63 additions and 153 deletions

View File

@@ -1,4 +1,4 @@
<%= render "proposals" if @proposals.present? %>
<%= render "debates" if @debates.present? && feature?(:debates) %>
<%= render "budget_investments" if @budget_investments.present? %>
<%= render "comments" if @comments.present? %>
<%= render "spending_proposals" if @spending_proposals.present? %>

View File

@@ -0,0 +1,11 @@
<table id="budget_investments_list" class="clear activity-investment-projects">
<% @budget_investments.each do |budget_investment| %>
<tr id="budget_investment_<%= budget_investment.id %>">
<td>
<%= link_to budget_investment.title, budget_investment_path(budget_investment.budget, budget_investment) %>
</td>
</tr>
<% end %>
</table>
<%= paginate @budget_investments %>

View File

@@ -1,20 +0,0 @@
<table id="spending_proposals_list" class="clear activity-investment-projects">
<% @spending_proposals.each do |spending_proposal| %>
<tr id="spending_proposal_<%= spending_proposal.id %>">
<td>
<%= link_to spending_proposal.title, spending_proposal %>
</td>
<td>
<% if can?(:destroy, spending_proposal) %>
<%= link_to t("users.show.delete_spending_proposal"),
spending_proposal,
method: :delete,
data: { confirm: t("users.show.confirm_deletion_spending_proposal") },
class: 'delete' %>
<% end %>
</td>
</tr>
<% end %>
</table>
<%= paginate @spending_proposals %>

View File

@@ -26,17 +26,15 @@
<ul class="menu simple margin-top">
<% @valid_filters.each do |filter| %>
<% if @activity_counts[filter] > 0 %>
<% if authorized_for_filter?(filter) %>
<% if @current_filter == filter %>
<li class="active">
<%= t("users.show.filters.#{filter}", count: @activity_counts[filter]) %>
</li>
<% else %>
<li>
<%= link_to t("users.show.filters.#{filter}", count: @activity_counts[filter]),
current_path_with_query_params(filter: filter, page: 1) %>
</li>
<% end %>
<% if @current_filter == filter %>
<li class="active">
<%= t("users.show.filters.#{filter}", count: @activity_counts[filter]) %>
</li>
<% else %>
<li>
<%= link_to t("users.show.filters.#{filter}", count: @activity_counts[filter]),
current_path_with_query_params(filter: filter, page: 1) %>
</li>
<% end %>
<% end %>
<% end %>