can remove investment projects

This commit is contained in:
rgarcia
2016-09-09 15:43:32 +02:00
parent 9839d7afd0
commit 1c8f4d5ff0
8 changed files with 118 additions and 97 deletions

View File

@@ -1,5 +1,5 @@
<% if @spending_proposals.present? %>
<% @spending_proposals.each do |spending_proposal| %>
$("#<%= dom_id(spending_proposal) %>_ballot").html('<%= j render("spending_proposals/ballot", spending_proposal: spending_proposal) %>');
<% if @investments.present? %>
<% @investments.each do |investment| %>
$("#<%= dom_id(investment) %>_ballot").html('<%= j render("budgets/investments/ballot", investment: investment) %>');
<% end %>
<% end %>

View File

@@ -1,6 +1,6 @@
$("#progress_bar").html('<%= j render("spending_proposals/progress_bar", ballot: @ballot) %>');
$("#progress_bar").html('<%= j render("budgets/ballot/progress_bar", ballot: @ballot) %>');
$("#sidebar").html('<%= j render("spending_proposals/sidebar") %>');
$("#ballot").html('<%= j render("ballots/ballot") %>')
$("#<%= dom_id(@spending_proposal) %>_ballot").html('<%= j render("spending_proposals/ballot", spending_proposal: @spending_proposal) %>');
// $("#ballot").html('<%# j render("ballots/ballot") %>')
$("#<%= dom_id(@investment) %>_ballot").html('<%= j render("budgets/investments/ballot", investment: @investment) %>');
<%= render 'refresh_ballots' %>

View File

@@ -27,7 +27,11 @@
budget_ballot_path(@budget) %>
<% end %>
</div>
<% if @heading.present? && @ballot.heading.present? && @ballot.heading != @heading %>
<% if false
#@heading.present? &&
#@ballot.heading.present? &&
#@ballot.heading != @heading
%>
<br>
<p class="callout warning inline-block">
<%= t("budget.investments.header.different_heading_active") %>
@@ -35,7 +39,7 @@
</p>
<% else %>
<div id="progress_bar" class="no-margin-top">
<%= render 'progress_bar' %>
<%= render 'budgets/ballot/progress_bar' %>
</div>
<% end %>
</div>