akkounts/app/views/admin/donations/show.html.erb
Râu Cao 29a67ff870
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
Remove special link class
This cleans up the code quite a bit, but also allows links in editable
content to be rendered with the default style.
2025-05-29 16:07:18 +04:00

50 lines
1.5 KiB
Plaintext

<%= render HeaderComponent.new(title: "Donation ##{@donation.id}") %>
<%= render MainSimpleComponent.new do %>
<section>
<table class="w-1/2 divided">
<tbody>
<tr>
<th>User</th>
<td><%= link_to @donation.user.cn, admin_user_path(@donation.user.cn) %></td>
</tr>
<tr>
<th>Donation Method</th>
<td><%= @donation.donation_method %></td>
</tr>
<tr>
<th>Amount sats</th>
<td><%= @donation.amount_sats %></td>
</tr>
<tr>
<th>Fiat amount</th>
<td><% if @donation.fiat_amount.present? %><%= number_to_currency @donation.fiat_amount.to_f / 100, unit: "" %> <%= @donation.fiat_currency %><% end %></td>
</tr>
<tr>
<th>Public name</th>
<td><%= @donation.public_name %></td>
</tr>
<tr>
<th>Payment status</th>
<td><%= @donation.payment_status %></td>
</tr>
<tr>
<th>Created at</th>
<td><%= @donation.created_at&.strftime("%Y-%m-%d (%H:%M UTC)") %></td>
</tr>
<tr>
<th>Paid at</th>
<td><%= @donation.paid_at&.strftime("%Y-%m-%d (%H:%M UTC)") %></td>
</tr>
</tbody>
</table>
</section>
<section>
<p class="pt-6 border-t border-gray-200 text-right">
<%= link_to 'Back', admin_donations_path, class: 'btn-md btn-gray' %>
<%= link_to 'Edit', edit_admin_donation_path(@donation), class: 'ml-2 btn-md btn-blue mr-1' %>
</p>
</section>
<% end %>