Merge branch 'feature/logged-in-subscribe-page' of github.com:rimian/discourse-patrons into feature/logged-in-subscribe-page
This commit is contained in:
commit
399dca953a
|
@ -0,0 +1,9 @@
|
|||
import computed from "ember-addons/ember-computed-decorators";
|
||||
import User from "discourse/models/user";
|
||||
|
||||
export default Ember.Component.extend({
|
||||
@computed()
|
||||
currentUser() {
|
||||
return User.current();
|
||||
}
|
||||
});
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
{{#each products as |product|}}
|
||||
<div>
|
||||
<h2>{{product.name}}</h2>
|
||||
|
||||
<p>
|
||||
{{product.description}}
|
||||
</p>
|
||||
|
||||
{{#if currentUser}}
|
||||
<div class="pull-right">
|
||||
{{#link-to "patrons.subscribe.show" product.id class="btn btn-primary"}}
|
||||
{{i18n 'discourse_patrons.subscribe.title'}}
|
||||
{{/link-to}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
|
@ -1,17 +1,2 @@
|
|||
|
||||
|
||||
{{#each model as |product|}}
|
||||
<div>
|
||||
<h2>{{product.name}}</h2>
|
||||
|
||||
<p>
|
||||
{{product.description}}
|
||||
</p>
|
||||
|
||||
<div class="pull-right">
|
||||
{{#link-to "patrons.subscribe.show" product.id class="btn btn-primary"}}
|
||||
{{i18n 'discourse_patrons.subscribe.title'}}
|
||||
{{/link-to}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{product-list products=model}}
|
||||
|
|
Loading…
Reference in New Issue