Files
discourse-subscriptions/assets/javascripts/discourse/templates/admin/plugins-discourse-subscriptions-dashboard.hbs
T

64 lines
1.9 KiB
Handlebars
Raw Normal View History

2021-07-04 21:53:55 +02:00
<h3>{{i18n "discourse_subscriptions.admin.dashboard.title"}}</h3>
2019-09-23 15:01:03 +10:00
2023-05-02 09:24:28 -05:00
<LoadMore @selector=".discourse-patrons-table tr" @action={{action "loadMore"}}>
2024-11-20 17:34:34 +00:00
{{#if this.model}}
2019-10-28 14:05:58 +11:00
<table class="table discourse-patrons-table">
2019-09-23 15:01:03 +10:00
<thead>
<tr>
<th>
{{i18n "discourse_subscriptions.admin.dashboard.table.head.user"}}
</th>
<th>
{{i18n
"discourse_subscriptions.admin.dashboard.table.head.payment_intent"
}}
</th>
<th>
{{i18n
"discourse_subscriptions.admin.dashboard.table.head.receipt_email"
}}
</th>
<th
role="button"
onclick={{action "orderPayments" "created_at"}}
class="sortable"
>
{{i18n "created"}}
</th>
<th
role="button"
onclick={{action "orderPayments" "amount"}}
class="sortable amount"
>
{{i18n "discourse_subscriptions.admin.dashboard.table.head.amount"}}
</th>
2019-09-23 15:01:03 +10:00
</tr>
</thead>
2021-07-04 21:53:55 +02:00
<tbody>
2024-11-20 17:34:34 +00:00
{{#each this.model as |payment|}}
2021-07-04 21:53:55 +02:00
<tr>
<td>
2023-05-02 09:24:28 -05:00
<LinkTo
@route="adminUser.index"
@models={{array payment.user_id payment.username}}
>
2021-07-04 21:53:55 +02:00
{{payment.username}}
2023-05-02 09:24:28 -05:00
</LinkTo>
2021-07-04 21:53:55 +02:00
</td>
<td>
2023-05-02 09:24:28 -05:00
<LinkTo
@route="patrons.show"
@model={{payment.payment_intent_id}}
>
2021-07-04 21:53:55 +02:00
{{html-safe payment.payment_intent_id}}
2023-05-02 09:24:28 -05:00
</LinkTo>
2021-07-04 21:53:55 +02:00
</td>
<td>{{payment.receipt_email}}</td>
<td>{{html-safe (format-duration payment.created_at_age)}}</td>
<td class="amount">{{payment.amount_currency}}</td>
</tr>
{{/each}}
</tbody>
2019-09-23 15:01:03 +10:00
</table>
{{/if}}
2023-05-02 09:24:28 -05:00
</LoadMore>