have a dash board page

This commit is contained in:
Rimian Perkins 2019-10-08 21:59:20 +11:00
parent 19a03aa2ca
commit 8d24ff455e
7 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,4 @@
import { ajax } from "discourse/lib/ajax";
import DiscourseURL from "discourse/lib/url";
import Plan from "discourse/plugins/discourse-patrons/discourse/models/plan";
export default Ember.Controller.extend({
actions: {

View File

@ -3,6 +3,7 @@ export default {
path: "/plugins",
map() {
this.route("discourse-patrons", function() {
this.route("dashboard");
this.route("subscriptions");
this.route("plans", function() {
this.route("show", { path: "/:plan-id" });

View File

@ -2,7 +2,7 @@
<h2>{{i18n 'discourse_patrons.title' site_name=siteSettings.title}}</h2>
<ul class="nav nav-pills">
{{nav-item route='adminPlugins.discourse-patrons' label='discourse_patrons.admin.dashboard.title'}}
{{nav-item route='adminPlugins.discourse-patrons.dashboard' label='discourse_patrons.admin.dashboard.title'}}
{{nav-item route='adminPlugins.discourse-patrons.plans' label='discourse_patrons.admin.plans.title'}}
{{nav-item route='adminPlugins.discourse-patrons.subscriptions' label='discourse_patrons.admin.subscriptions.title'}}
</ul>

View File

@ -21,10 +21,10 @@ extend_content_security_policy(
script_src: ['https://js.stripe.com/v3/']
)
add_admin_route 'discourse_patrons.title', 'discourse-patrons'
add_admin_route 'discourse_patrons.title', 'discourse-patrons.dashboard'
Discourse::Application.routes.append do
get '/admin/plugins/discourse-patrons' => 'admin/plugins#index'
get '/admin/plugins/discourse-patrons/dashboard' => 'admin/plugins#index'
get '/admin/plugins/discourse-patrons/subscriptions' => 'admin/plugins#index'
get '/admin/plugins/discourse-patrons/plans' => 'admin/plugins#index'
get '/admin/plugins/discourse-patrons/plans/:plan_id' => 'admin/plugins#index'