discourse-subscriptions/assets/javascripts/discourse/templates/user/subscriptions.hbs

34 lines
1.2 KiB
Handlebars

{{i18n 'discourse_subscriptions.user.subscriptions.title'}}
{{#if model}}
<table class="table discourse-patrons-user-table">
<thead>
<th>{{i18n 'discourse_subscriptions.user.subscriptions.id'}}</th>
<th>{{i18n 'discourse_subscriptions.user.plans.product'}}</th>
<th>{{i18n 'discourse_subscriptions.user.plans.rate'}}</th>
<th>{{i18n 'discourse_subscriptions.user.subscriptions.status'}}</th>
<th>{{i18n 'discourse_subscriptions.user.subscriptions.created_at'}}</th>
<th></th>
</thead>
{{#each model as |subscription|}}
<tr>
<td>{{subscription.id}}</td>
<td>{{subscription.product.name}}</td>
<td>{{subscription.plan.subscriptionRate}}</td>
<td>{{subscription.status}}</td>
<td>{{format-unix-date subscription.created}}</td>
<td class="td-right">
{{#if subscription.loading}}
{{loading-spinner size="small"}}
{{else}}
{{d-button disabled=subscription.canceled label="cancel" action=(route-action "cancelSubscription" subscription) icon="times"}}
{{/if}}
</td>
</tr>
{{/each}}
</table>
{{else}}
<p>{{i18n 'discourse_subscriptions.user.subscriptions_help'}}</p>
{{/if}}