Format numbers on admin donations page
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

And fix the wrong unit display in the user donations list.
This commit is contained in:
Basti 2020-12-19 14:59:16 +01:00
parent 5e2d5c3b28
commit 4a65573934
Signed by untrusted user: basti
GPG Key ID: 9F88009D31D99C72
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@
<thead>
<tr>
<th>User</th>
<th>Amount BTC (sats)</th>
<th>Amount BTC</th>
<th>in EUR</th>
<th>in USD</th>
<th>Public name</th>
@ -18,9 +18,9 @@
<% @donations.each do |donation| %>
<tr>
<td><%= donation.user.cn %></td>
<td><%= donation.amount_sats %></td>
<td><%= donation.amount_eur %></td>
<td><%= donation.amount_usd %></td>
<td><%= sats_to_btc donation.amount_sats %> BTC</td>
<td><%= number_to_currency donation.amount_eur / 100, unit: "" %></td>
<td><%= number_to_currency donation.amount_usd / 100, unit: "" %></td>
<td><%= donation.public_name %></td>
<td><%= donation.paid_at ? donation.paid_at.strftime("%Y-%m-%d") : "" %></td>
<td><%= link_to 'Show', admin_donation_path(donation) %></td>

View File

@ -18,7 +18,7 @@
<%= sats_to_btc donation.amount_sats %> BTC
</p>
<p class="amounts-fiat">
(~ <%= number_to_currency donation.amount_eur / 100 %> EUR)
(~ <%= number_to_currency donation.amount_eur / 100, unit: "" %> EUR)
</p>
<p class="public-name">
<% if donation.public_name.present? %>