Implements several helper methods for formatting amounts
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<h4 class="amount-spent text-right">
|
||||
<%= t("budgets.ballots.show.amount_spent") %>
|
||||
<span>
|
||||
<%= @budget.formatted_amount(@ballot.amount_spent(@ballot.heading_for_group(group).id))) %>
|
||||
<%= @ballot.formatted_amount_spent(@ballot.heading_for_group(group)) %>
|
||||
</span>
|
||||
</h4>
|
||||
<% else %>
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
<h4>
|
||||
<%= t("budgets.ballots.show.remaining",
|
||||
amount_city: @budget.formatted_amount(@ballot.amount_available(@ballot.heading_for_group(group))))).html_safe %>
|
||||
amount_city: @ballot.formatted_amount_available(@ballot.heading_for_group(group)).html_safe %>
|
||||
</h4>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="progress-meter"
|
||||
style="width:
|
||||
<%= progress_bar_width(@budget.heading_price(@heading),
|
||||
@ballot.amount_spent(@heading.id)) %>">
|
||||
@ballot.amount_spent(@heading)) %>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
<span class="progress-meter spent-amount-meter"
|
||||
style="width:
|
||||
<%= progress_bar_width(@budget.heading_price(@heading),
|
||||
@ballot.amount_spent(@heading.id)) %>">
|
||||
@ballot.amount_spent(@heading)) %>">
|
||||
<p id="amount-spent" class="progress-meter-text spent-amount-text">
|
||||
<%= @budget.format_amount(@ballot.amount_spent(@heading.id)) %>
|
||||
<%= @ballot.formatted_amount_spent(@heading) %>
|
||||
<span id="amount-available" class="amount-available">
|
||||
<%= t("budget.progress_bar.available") %>
|
||||
<span><%= @budget.format_amount(@ballot.amount_available(@heading)) %></span>
|
||||
<span><%= @ballot.formatted_amount_available(@heading) %></span>
|
||||
</span>
|
||||
</p>
|
||||
</span>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<em>
|
||||
<%= t("budget.investments.index.sidebar.voted_html",
|
||||
count: @ballot.investments.by_heading(@heading.id).count,
|
||||
amount_spent: @budget.format_amount(@ballot.amount_spent(@heading))) %>
|
||||
amount_spent: @ballot.formatted_amount_spent(@heading)) %>
|
||||
</em>
|
||||
</p>
|
||||
<% else %>
|
||||
|
||||
Reference in New Issue
Block a user