initial templates and routes
This commit is contained in:
		
							parent
							
								
									308c8ea771
								
							
						
					
					
						commit
						dfef3c49cf
					
				| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
export default Ember.Controller.extend({
 | 
			
		||||
  actions: {
 | 
			
		||||
    createPlan() {
 | 
			
		||||
      this.transitionToRoute("adminPlugins.discourse-patrons.plans");
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
export default Ember.Controller.extend({});
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
export default Ember.Controller.extend({});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,13 +1,13 @@
 | 
			
		|||
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",
 | 
			
		||||
  //     data: {
 | 
			
		||||
  //       order: params.order,
 | 
			
		||||
  //       descending: params.descending
 | 
			
		||||
  //     }
 | 
			
		||||
  //   }).then(results => results);
 | 
			
		||||
  // }
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,7 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
[plans show]
 | 
			
		||||
<h4>[plans show]</h4>
 | 
			
		||||
 | 
			
		||||
<div class="buttons">
 | 
			
		||||
  {{d-button label="plans.show" action="createPlan" icon="plus"}}
 | 
			
		||||
</div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,8 +1,8 @@
 | 
			
		|||
 | 
			
		||||
<h3>Plans.</h3>
 | 
			
		||||
 | 
			
		||||
{{#link-to 'adminPlugins.discourse-patrons.plans.show' 'new'}}
 | 
			
		||||
{{#link-to 'adminPlugins.discourse-patrons.plans.show' 'new' class="btn btn-primary"}}
 | 
			
		||||
  New
 | 
			
		||||
{{/link-to}}
 | 
			
		||||
 | 
			
		||||
[{{outlet}}]
 | 
			
		||||
{{outlet}}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,10 +1,6 @@
 | 
			
		|||
 | 
			
		||||
<h3>Subscription Plans</h3>
 | 
			
		||||
 | 
			
		||||
{{#d-button action="createSubscriptionPlan" class="btn btn-primary btn-payment btn-discourse-patrons"}}
 | 
			
		||||
  New
 | 
			
		||||
{{/d-button}}
 | 
			
		||||
 | 
			
		||||
<table class="table discourse-patrons-admin">
 | 
			
		||||
  <thead>
 | 
			
		||||
    <tr>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,12 +1,23 @@
 | 
			
		|||
 | 
			
		||||
<h2>{{i18n 'discourse_patrons.title' site_name=siteSettings.title}}</h2>
 | 
			
		||||
 | 
			
		||||
{{!-- {{#link-to 'adminPlugins.discourse-patrons'}}
 | 
			
		||||
  Payments
 | 
			
		||||
{{/link-to}}
 | 
			
		||||
{{#link-to 'adminPlugins.discourse-patrons.subscriptions'}}
 | 
			
		||||
  Subscriptions
 | 
			
		||||
{{/link-to}} --}}
 | 
			
		||||
<ul class="nav nav-pills">
 | 
			
		||||
  <li>
 | 
			
		||||
    {{#link-to 'adminPlugins.discourse-patrons'}}
 | 
			
		||||
      Payments
 | 
			
		||||
    {{/link-to}}
 | 
			
		||||
  </li>
 | 
			
		||||
  <li>
 | 
			
		||||
    {{#link-to 'adminPlugins.discourse-patrons.plans'}}
 | 
			
		||||
      Plans
 | 
			
		||||
    {{/link-to}}
 | 
			
		||||
  </li>
 | 
			
		||||
  <li>
 | 
			
		||||
    {{#link-to 'adminPlugins.discourse-patrons.subscriptions'}}
 | 
			
		||||
      Subscriptions
 | 
			
		||||
    {{/link-to}}
 | 
			
		||||
  </li>
 | 
			
		||||
</ul>
 | 
			
		||||
 | 
			
		||||
<hr>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue