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

35 lines
1.3 KiB
Handlebars

{{#d-section pageClass="user-subscriptions" class="user-content"}}
{{#if model}}
<table class="table discourse-subscriptions-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}}
<div class="alert alert-info">
{{i18n 'discourse_subscriptions.user.subscriptions_help'}}
</div>
{{/if}}
{{/d-section}}