Improve admin donation pages
This commit is contained in:
parent
1c3e893b6b
commit
5f74212603
@ -10,46 +10,24 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="field">
|
||||
<p>
|
||||
<div class="sm:w-1/2 grid grid-cols-2 items-center gap-y-2">
|
||||
<%= form.label :user_id %>
|
||||
<%= form.collection_select :user_id, User.where(ou: "kosmos.org").order(:cn), :id, :cn %>
|
||||
</p>
|
||||
</div>
|
||||
<%= form.collection_select :user_id, User.where(ou: "kosmos.org").order(:cn), :id, :cn, {} %>
|
||||
|
||||
<div class="field">
|
||||
<p>
|
||||
<%= form.label :amount_sats, "Amount BTC (sats)" %>
|
||||
<%= form.number_field :amount_sats %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<p>
|
||||
<%= form.label :amount_eur, "Amount EUR (cents)" %>
|
||||
<%= form.number_field :amount_eur %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<p>
|
||||
<%= form.label :amount_usd, "Amount USD (cents)"%>
|
||||
<%= form.number_field :amount_usd %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<p>
|
||||
<%= form.label :public_name %>
|
||||
<%= form.text_field :public_name %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<p>
|
||||
<%= form.label :paid_at %>
|
||||
<%= form.text_field :paid_at %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="mt-8">
|
||||
|
@ -1,12 +1,9 @@
|
||||
<%= render HeaderComponent.new(title: "Donations") %>
|
||||
<%= render HeaderComponent.new(title: "Donation ##{@donation.id}") %>
|
||||
|
||||
<%= render MainSimpleComponent.new do %>
|
||||
<h2>Editing Donation</h2>
|
||||
|
||||
<%= render 'form', donation: @donation, url: admin_donation_path(@donation) %>
|
||||
|
||||
<p class="mt-8">
|
||||
<%= link_to 'Show', admin_donation_path(@donation), class: 'ks-text-link' %> |
|
||||
<%= link_to 'Back', admin_donations_path, class: 'ks-text-link' %>
|
||||
<%= link_to 'Cancel', admin_donation_path(@donation), class: 'btn-sm btn-gray' %>
|
||||
<p>
|
||||
<% end %>
|
||||
|
@ -1,8 +1,6 @@
|
||||
<%= render HeaderComponent.new(title: "Donations") %>
|
||||
<%= render HeaderComponent.new(title: "Add Donation") %>
|
||||
|
||||
<%= render MainSimpleComponent.new do %>
|
||||
<h2>New Donation</h2>
|
||||
|
||||
<%= render 'form', donation: @donation, url: admin_donations_path %>
|
||||
|
||||
<p class="mt-8">
|
||||
|
@ -1,7 +1,8 @@
|
||||
<%= render HeaderComponent.new(title: "Donations") %>
|
||||
<%= render HeaderComponent.new(title: "Donation ##{@donation.id}") %>
|
||||
|
||||
<%= render MainSimpleComponent.new do %>
|
||||
<table class="w-1/2">
|
||||
<section>
|
||||
<table class="w-1/2 divided">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
@ -29,9 +30,12 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<p class="mt-8">
|
||||
<%= link_to 'Edit', edit_admin_donation_path(@donation), class: 'ks-text-link' %> |
|
||||
<%= link_to 'Back', admin_donations_path, class: 'ks-text-link' %>
|
||||
<section>
|
||||
<p>
|
||||
<%= link_to 'Edit', edit_admin_donation_path(@donation), class: 'btn-md btn-blue mr-1' %>
|
||||
<%= link_to 'Back', admin_donations_path, class: 'btn-md btn-gray' %>
|
||||
</p>
|
||||
</section>
|
||||
<% end %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user