url for edit
This commit is contained in:
parent
9d982307d5
commit
bee940e672
|
@ -10,6 +10,10 @@ export default Ember.Controller.extend({
|
|||
actions: {
|
||||
deletePlan(id) {
|
||||
return ajax(`/patrons/admin/plans/${id}`, { method: "delete" });
|
||||
},
|
||||
|
||||
editPlan(id) {
|
||||
return DiscourseURL.redirectTo(`/admin/plugins/discourse-patrons/plans/${id}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
export default Discourse.Route.extend({
|
||||
model(params) {
|
||||
model() {
|
||||
return ajax("/patrons/admin/subscriptions", { method: "get" });
|
||||
}
|
||||
});
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<td>{{plan.interval}}</td>
|
||||
<td>{{plan.amount}}</td>
|
||||
<td>
|
||||
{{d-button action=(action "editPlan" plan.id) icon="far-edit" class="btn no-text btn-icon"}}
|
||||
{{d-button action=(action "deletePlan" plan.id) icon="trash-alt" class="btn-danger btn no-text btn-icon"}}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue