intial load more

This commit is contained in:
Rimian Perkins 2019-09-14 17:04:02 +10:00
parent 0b8b89f1d4
commit 813937dd22
3 changed files with 35 additions and 26 deletions

View File

@ -1 +1,6 @@
export default Ember.Controller.extend({}); export default Ember.Controller.extend({
actions: {
loadMore() {
}
}
});

View File

@ -1,27 +1,31 @@
<h2>{{i18n 'discourse_patrons.title' site_name=siteSettings.title}}</h2> <h2>{{i18n 'discourse_patrons.title' site_name=siteSettings.title}}</h2>
<table class="table discourse_patrons_admin"> {{#load-more selector=".discourse-patrons-admin tr" action=(action "loadMore")}}
<thead> {{#if model}}
<tr> <table class="table discourse-patrons-admin">
<th>{{i18n 'discourse_patrons.admin.table.head.user'}}</th> <thead>
<th>{{i18n 'discourse_patrons.admin.table.head.payment_intent'}}</th> <tr>
<th>{{i18n 'discourse_patrons.admin.table.head.receipt_email'}}</th> <th>{{i18n 'discourse_patrons.admin.table.head.user'}}</th>
<th>{{i18n 'created'}}</th> <th>{{i18n 'discourse_patrons.admin.table.head.payment_intent'}}</th>
<th class="amount">{{i18n 'discourse_patrons.admin.table.head.amount'}}</th> <th>{{i18n 'discourse_patrons.admin.table.head.receipt_email'}}</th>
</tr> <th>{{i18n 'created'}}</th>
</thead> <th class="amount">{{i18n 'discourse_patrons.admin.table.head.amount'}}</th>
{{#each model as |payment|}} </tr>
<tr> </thead>
<td> {{#each model as |payment|}}
{{#link-to "adminUser.index" payment.user_id payment.username}} <tr>
{{payment.username}} <td>
{{/link-to}} {{#link-to "adminUser.index" payment.user_id payment.username}}
</td> {{payment.username}}
<td>{{{stripe-payment-link payment}}}</td> {{/link-to}}
<td>{{payment.receipt_email}}</td> </td>
<td>{{{format-duration payment.created_at_age}}}</td> <td>{{{stripe-payment-link payment}}}</td>
<td class="amount">{{payment.amount_currency}}</td> <td>{{payment.receipt_email}}</td>
</tr> <td>{{{format-duration payment.created_at_age}}}</td>
{{/each}} <td class="amount">{{payment.amount_currency}}</td>
</table> </tr>
{{/each}}
</table>
{{/if}}
{{/load-more}}

View File

@ -32,7 +32,7 @@
} }
} }
.discourse_patrons_admin { .discourse-patrons-admin {
.amount { .amount {
text-align: right; text-align: right;
} }