Format numbers on admin donations page
And fix the wrong unit display in the user donations list.
This commit is contained in:
parent
5e2d5c3b28
commit
4a65573934
@ -5,7 +5,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>User</th>
|
<th>User</th>
|
||||||
<th>Amount BTC (sats)</th>
|
<th>Amount BTC</th>
|
||||||
<th>in EUR</th>
|
<th>in EUR</th>
|
||||||
<th>in USD</th>
|
<th>in USD</th>
|
||||||
<th>Public name</th>
|
<th>Public name</th>
|
||||||
@ -18,9 +18,9 @@
|
|||||||
<% @donations.each do |donation| %>
|
<% @donations.each do |donation| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= donation.user.cn %></td>
|
<td><%= donation.user.cn %></td>
|
||||||
<td><%= donation.amount_sats %></td>
|
<td><%= sats_to_btc donation.amount_sats %> BTC</td>
|
||||||
<td><%= donation.amount_eur %></td>
|
<td><%= number_to_currency donation.amount_eur / 100, unit: "" %></td>
|
||||||
<td><%= donation.amount_usd %></td>
|
<td><%= number_to_currency donation.amount_usd / 100, unit: "" %></td>
|
||||||
<td><%= donation.public_name %></td>
|
<td><%= donation.public_name %></td>
|
||||||
<td><%= donation.paid_at ? donation.paid_at.strftime("%Y-%m-%d") : "" %></td>
|
<td><%= donation.paid_at ? donation.paid_at.strftime("%Y-%m-%d") : "" %></td>
|
||||||
<td><%= link_to 'Show', admin_donation_path(donation) %></td>
|
<td><%= link_to 'Show', admin_donation_path(donation) %></td>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<%= sats_to_btc donation.amount_sats %> BTC
|
<%= sats_to_btc donation.amount_sats %> BTC
|
||||||
</p>
|
</p>
|
||||||
<p class="amounts-fiat">
|
<p class="amounts-fiat">
|
||||||
(~ <%= number_to_currency donation.amount_eur / 100 %> EUR)
|
(~ <%= number_to_currency donation.amount_eur / 100, unit: "" %> EUR)
|
||||||
</p>
|
</p>
|
||||||
<p class="public-name">
|
<p class="public-name">
|
||||||
<% if donation.public_name.present? %>
|
<% if donation.public_name.present? %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user