akkounts/app/views/donations/index.html.erb
Sebastian Kippe 4a65573934
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Format numbers on admin donations page
And fix the wrong unit display in the user donations list.
2020-12-19 14:59:16 +01:00

39 lines
945 B
Plaintext

<section>
<h2>Donations</h2>
<p>
Your financial contributions to the development and
upkeep of Kosmos software and services.
</p>
</section>
<section>
<% if @donations.any? %>
<ul class="donations">
<% @donations.each do |donation| %>
<li>
<h3>
<%= donation.paid_at.strftime("%B %d, %Y") %>
</h3>
<p class="amount-btc">
<%= sats_to_btc donation.amount_sats %> BTC
</p>
<p class="amounts-fiat">
(~ <%= number_to_currency donation.amount_eur / 100, unit: "" %> EUR)
</p>
<p class="public-name">
<% if donation.public_name.present? %>
Public name: <%= donation.public_name %>
<% else %>
Anonymous
<% end %>
</p>
</li>
<% end %>
</ul>
<% else %>
<p>
No donations to show.
</p>
<% end %>
</section>