user upgrades: add links to Stripe payment & receipt page.
Add links to the Stripe payment page and the Stripe receipt page on completed user upgrades. The Stripe payment link is a link to the payment details on the Stripe dashboard and is only visible to the owner.
This commit is contained in:
@@ -28,8 +28,18 @@
|
||||
|
||||
<% t.column :status %>
|
||||
|
||||
<% t.column "Updated" do |artist| %>
|
||||
<%= time_ago_in_words_tagged(artist.updated_at) %>
|
||||
<% t.column "Updated" do |user_upgrade| %>
|
||||
<%= time_ago_in_words_tagged(user_upgrade.updated_at) %>
|
||||
<% end %>
|
||||
|
||||
<% t.column column: "control" do |user_upgrade| %>
|
||||
<%= link_to "Show", user_upgrade %>
|
||||
<% if policy(user_upgrade).receipt? %>
|
||||
| <%= link_to "Receipt", receipt_user_upgrade_path(user_upgrade), target: "_blank" %>
|
||||
<% end %>
|
||||
<% if policy(user_upgrade).payment? %>
|
||||
| <%= link_to "Payment", payment_user_upgrade_path(user_upgrade), target: "_blank" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user