list plans
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
export default Ember.Controller.extend({
|
||||
actions: {
|
||||
deletePlan(plan) {}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
export default Discourse.Route.extend({
|
||||
model() {
|
||||
return ajax("/patrons/admin/plans", { method: "get" });
|
||||
}
|
||||
});
|
||||
@@ -1 +1,2 @@
|
||||
|
||||
export default Discourse.Route.extend({});
|
||||
|
||||
+3
-9
@@ -1,13 +1,7 @@
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
export default Discourse.Route.extend({
|
||||
// model(params) {
|
||||
// return ajax("/patrons/admin/subscriptions", {
|
||||
// method: "get",
|
||||
// data: {
|
||||
// order: params.order,
|
||||
// descending: params.descending
|
||||
// }
|
||||
// }).then(results => results);
|
||||
// }
|
||||
model(params) {
|
||||
return ajax("/patrons/admin/subscriptions", { method: "get" });
|
||||
}
|
||||
});
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
|
||||
<h3>{{i18n 'discourse_patrons.admin.plans.title'}}</h3>
|
||||
|
||||
<table class="table discourse-patrons-admin">
|
||||
<thead>
|
||||
<th>{{i18n 'discourse_patrons.admin.plans.plan.plan_id'}}</th>
|
||||
<th>{{i18n 'discourse_patrons.admin.plans.plan.nickname'}}</th>
|
||||
<th>{{i18n 'discourse_patrons.admin.plans.plan.interval'}}</th>
|
||||
<th>{{i18n 'discourse_patrons.admin.plans.plan.amount'}}</th>
|
||||
</thead>
|
||||
{{#each model.plans as |plan|}}
|
||||
<tr>
|
||||
<td>{{plan.id}}</td>
|
||||
<td>{{plan.nickname}}</td>
|
||||
<td>{{plan.interval}}</td>
|
||||
<td>{{plan.amount}}</td>
|
||||
<td>
|
||||
{{d-button action=(action "deletePlan" plan) icon="trash" class="btn-danger btn no-text btn-icon"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</table>
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
<h3>{{i18n 'discourse_patrons.admin.plans.title'}}</h3>
|
||||
|
||||
{{#link-to 'adminPlugins.discourse-patrons.plans.show' 'new' class="btn btn-primary"}}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
|
||||
<h3>Subscription Plans</h3>
|
||||
<h3>{{i18n 'discourse_patrons.admin.plans'}}</h3>
|
||||
|
||||
<table class="table discourse-patrons-admin">
|
||||
<thead>
|
||||
@@ -10,7 +10,7 @@
|
||||
<th>Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{#each model as |plan|}}
|
||||
{{#each model as |subscription|}}
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user