adds index/show/voting to management for sps

This commit is contained in:
Juanjo Bazán
2016-04-06 12:05:43 +02:00
parent 3c37575f88
commit cb05231794
12 changed files with 200 additions and 6 deletions

View File

@@ -0,0 +1 @@
<%= render partial: 'spending_proposals/spending_proposal', locals: {spending_proposal: spending_proposal} %>

View File

@@ -0,0 +1,2 @@
<%= render 'spending_proposals/votes',
{ spending_proposal: spending_proposal, vote_url: vote_management_spending_proposal_path(spending_proposal, value: 'yes') } %>

View File

@@ -0,0 +1,22 @@
<main>
<%= render 'admin/shared/spending_proposal_search', url: management_spending_proposals_path %>
<div class="wrap row">
<div id="investment-projects" class="investment-projects-list small-12 medium-9 column">
<div class="small-12 search-results">
<%= content_tag(:h2, t("spending_proposals.index.unfeasible")) if params[:unfeasible].present? %>
<%= content_tag(:h2, t("spending_proposals.index.by_geozone", geozone: @geozone_name)) if @geozone_name.present? %>
<% if params[:search].present? %>
<h2>
<%= page_entries_info @spending_proposals %>
<%= t("spending_proposals.index.search_results", count: @spending_proposals.size, search_term: params[:search]) %>
</h2>
<% end %>
</div>
<%= render @spending_proposals %>
<%= paginate @spending_proposals %>
</div>
</div>
</main>

View File

@@ -0,0 +1 @@
<%= render template: 'spending_proposals/vote' %>