DEV: Fix linting errors (#83)
Template lint errors and broken rubocop linting.
This commit is contained in:
parent
03aec5a44a
commit
21d71e09fc
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"globals": {
|
||||
"Stripe": true,
|
||||
"Stripe": true
|
||||
},
|
||||
"extends": "eslint-config-discourse"
|
||||
}
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
AllCops:
|
||||
Exclude:
|
||||
- 'gems/**/*'
|
||||
inherit_gem:
|
||||
rubocop-discourse: default.yml
|
||||
|
||||
|
|
39
Gemfile.lock
39
Gemfile.lock
|
@ -7,31 +7,32 @@ GIT
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
ast (2.4.1)
|
||||
parallel (1.19.2)
|
||||
parser (2.7.1.4)
|
||||
ast (2.4.2)
|
||||
parallel (1.20.1)
|
||||
parser (3.0.1.1)
|
||||
ast (~> 2.4.1)
|
||||
rainbow (3.0.0)
|
||||
regexp_parser (1.7.1)
|
||||
regexp_parser (2.1.1)
|
||||
rexml (3.2.5)
|
||||
rubocop (0.88.0)
|
||||
rubocop (1.18.2)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 2.7.1.1)
|
||||
parser (>= 3.0.0.0)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.7)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml
|
||||
rubocop-ast (>= 0.1.0, < 1.0)
|
||||
rubocop-ast (>= 1.7.0, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 2.0)
|
||||
rubocop-ast (0.3.0)
|
||||
parser (>= 2.7.1.4)
|
||||
rubocop-discourse (2.3.1)
|
||||
rubocop (>= 0.69.0)
|
||||
rubocop-rspec (>= 1.39.0)
|
||||
rubocop-rspec (1.42.0)
|
||||
rubocop (>= 0.87.0)
|
||||
ruby-progressbar (1.10.1)
|
||||
unicode-display_width (1.7.0)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.7.0)
|
||||
parser (>= 3.0.1.1)
|
||||
rubocop-discourse (2.4.2)
|
||||
rubocop (>= 1.1.0)
|
||||
rubocop-rspec (>= 2.0.0)
|
||||
rubocop-rspec (2.4.0)
|
||||
rubocop (~> 1.0)
|
||||
rubocop-ast (>= 1.1.0)
|
||||
ruby-progressbar (1.11.0)
|
||||
unicode-display_width (2.0.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
@ -41,4 +42,4 @@ DEPENDENCIES
|
|||
translations-manager!
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.4
|
||||
2.2.19
|
||||
|
|
|
@ -92,6 +92,21 @@ export default Component.extend({
|
|||
}
|
||||
},
|
||||
|
||||
@discourseComputed("backgroundImageUrl")
|
||||
bannerInfoStyle(backgroundImageUrl) {
|
||||
if (!backgroundImageUrl) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return `background-image: linear-gradient(
|
||||
0deg,
|
||||
rgba(var(--secondary-rgb), 0.75) 0%,
|
||||
rgba(var(--secondary-rgb), 0.75) 100%),
|
||||
var(--campaign-background-image);
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;`;
|
||||
},
|
||||
|
||||
@discourseComputed(
|
||||
"router.currentRouteName",
|
||||
"currentUser",
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
{{#if model.unconfigured}}
|
||||
<p>{{i18n 'discourse_subscriptions.admin.unconfigured'}}</p>
|
||||
<p><a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">{{i18n 'discourse_subscriptions.admin.on_meta'}}</a></p>
|
||||
<p>{{i18n "discourse_subscriptions.admin.unconfigured"}}</p>
|
||||
<p><a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">{{i18n "discourse_subscriptions.admin.on_meta"}}</a></p>
|
||||
{{else}}
|
||||
{{#if model}}
|
||||
<table class="table discourse-patrons-table">
|
||||
<thead>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.coupons.code'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.coupons.discount'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.coupons.times_redeemed'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.coupons.active'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.coupons.actions'}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.coupons.code"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.coupons.discount"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.coupons.times_redeemed"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.coupons.active"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.coupons.actions"}}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model as |coupon|}}
|
||||
<tr>
|
||||
<td>{{coupon.code}}</td>
|
||||
|
@ -22,10 +23,12 @@
|
|||
action=(action "deleteCoupon")
|
||||
actionParam=coupon
|
||||
icon="trash-alt"
|
||||
class="btn-danger btn btn-icon btn-no-text"}}
|
||||
class="btn-danger btn btn-icon btn-no-text"
|
||||
}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/if}}
|
||||
|
||||
|
@ -35,10 +38,11 @@
|
|||
label="discourse_subscriptions.admin.coupons.create"
|
||||
title="discourse_subscriptions.admin.coupons.create"
|
||||
icon="plus"
|
||||
class="btn btn-icon btn-primary create-coupon"}}
|
||||
class="btn btn-icon btn-primary create-coupon"
|
||||
}}
|
||||
{{/unless}}
|
||||
|
||||
{{#if creating}}
|
||||
{{create-coupon-form cancel=(action 'closeCreateForm') create=(action 'createNewCoupon')}}
|
||||
{{create-coupon-form cancel=(action "closeCreateForm") create=(action "createNewCoupon")}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
|
||||
<h3>{{i18n 'discourse_subscriptions.admin.dashboard.title'}}</h3>
|
||||
<h3>{{i18n "discourse_subscriptions.admin.dashboard.title"}}</h3>
|
||||
|
||||
{{#load-more selector=".discourse-patrons-table tr" action=(action "loadMore")}}
|
||||
{{#if model}}
|
||||
<table class="table discourse-patrons-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.dashboard.table.head.user'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.dashboard.table.head.payment_intent'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.dashboard.table.head.receipt_email'}}</th>
|
||||
<th onclick={{action "orderPayments" "created_at"}} class="sortable">{{i18n 'created'}}</th>
|
||||
<th class="amount" onclick={{action "orderPayments" "amount"}} class="sortable amount">{{i18n 'discourse_subscriptions.admin.dashboard.table.head.amount'}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.dashboard.table.head.user"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.dashboard.table.head.payment_intent"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.dashboard.table.head.receipt_email"}}</th>
|
||||
<th role="button" onclick={{action "orderPayments" "created_at"}} class="sortable">{{i18n "created"}}</th>
|
||||
<th role="button" onclick={{action "orderPayments" "amount"}} class="sortable amount">{{i18n "discourse_subscriptions.admin.dashboard.table.head.amount"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model as |payment|}}
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -22,14 +22,15 @@
|
|||
</td>
|
||||
<td>
|
||||
{{#link-to "patrons.show" payment.payment_intent_id}}
|
||||
{{{payment.payment_intent_id}}}
|
||||
{{html-safe payment.payment_intent_id}}
|
||||
{{/link-to}}
|
||||
</td>
|
||||
<td>{{payment.receipt_email}}</td>
|
||||
<td>{{{format-duration payment.created_at_age}}}</td>
|
||||
<td>{{html-safe (format-duration payment.created_at_age)}}</td>
|
||||
<td class="amount">{{payment.amount_currency}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/if}}
|
||||
{{/load-more}}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
<table class="table discourse-patrons-table">
|
||||
<thead>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.plan_id'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.nickname.title'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.interval'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.amount'}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.plans.plan.plan_id"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.plans.plan.nickname.title"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.plans.plan.interval"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.plans.plan.amount"}}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model as |plan|}}
|
||||
<tr>
|
||||
<td>{{plan.id}}</td>
|
||||
|
@ -17,13 +17,16 @@
|
|||
{{d-button
|
||||
action=(action "editPlan" plan.id)
|
||||
icon="far-edit"
|
||||
class="btn no-text btn-icon"}}
|
||||
class="btn no-text btn-icon"
|
||||
}}
|
||||
{{d-button
|
||||
action=(route-action "destroyPlan")
|
||||
actionParam=plan
|
||||
icon="trash-alt"
|
||||
class="btn-danger btn no-text btn-icon"}}
|
||||
class="btn-danger btn no-text btn-icon"
|
||||
}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
{{#if model.unconfigured }}
|
||||
<p>{{i18n 'discourse_subscriptions.admin.unconfigured'}}</p>
|
||||
<p><a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">{{i18n 'discourse_subscriptions.admin.on_meta'}}</a></p>
|
||||
<p>{{i18n "discourse_subscriptions.admin.unconfigured"}}</p>
|
||||
<p><a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">{{i18n "discourse_subscriptions.admin.on_meta"}}</a></p>
|
||||
{{else}}
|
||||
<p class="btn-right">
|
||||
{{#link-to 'adminPlugins.discourse-subscriptions.products.show' 'new' class="btn btn-primary"}}
|
||||
{{#link-to "adminPlugins.discourse-subscriptions.products.show" "new" class="btn btn-primary"}}
|
||||
{{d-icon "plus"}}
|
||||
<span>{{i18n 'discourse_subscriptions.admin.products.operations.new'}}</span>
|
||||
<span>{{i18n "discourse_subscriptions.admin.products.operations.new"}}</span>
|
||||
{{/link-to}}
|
||||
</p>
|
||||
|
||||
{{#if model}}
|
||||
<table class="table discourse-patrons-table">
|
||||
<thead>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.products.product.name'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.products.product.created_at'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.products.product.updated_at'}}</th>
|
||||
<th class="td-right">{{i18n 'discourse_subscriptions.admin.products.product.active'}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.products.product.name"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.products.product.created_at"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.products.product.updated_at"}}</th>
|
||||
<th class="td-right">{{i18n "discourse_subscriptions.admin.products.product.active"}}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model as |product|}}
|
||||
<tr>
|
||||
<td>{{product.name}}</td>
|
||||
|
@ -33,15 +34,17 @@
|
|||
action=(route-action "destroyProduct")
|
||||
actionParam=product
|
||||
icon="trash-alt"
|
||||
class="btn-danger btn no-text btn-icon"}}
|
||||
class="btn-danger btn no-text btn-icon"
|
||||
}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<p>
|
||||
{{i18n 'discourse_subscriptions.admin.products.product_help'}}
|
||||
{{i18n "discourse_subscriptions.admin.products.product_help"}}
|
||||
</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
|
||||
<h4>{{i18n 'discourse_subscriptions.admin.plans.title'}}</h4>
|
||||
<h4>{{i18n "discourse_subscriptions.admin.plans.title"}}</h4>
|
||||
|
||||
<form class="form-horizontal">
|
||||
<p>
|
||||
<label for="product">{{i18n 'discourse_subscriptions.admin.products.product.name'}}</label>
|
||||
<label for="product">{{i18n "discourse_subscriptions.admin.products.product.name"}}</label>
|
||||
{{input type="text" name="product_name" value=model.product.name disabled=true}}
|
||||
</p>
|
||||
<p>
|
||||
<label for="name">{{i18n 'discourse_subscriptions.admin.plans.plan.nickname'}}</label>
|
||||
<label for="name">{{i18n "discourse_subscriptions.admin.plans.plan.nickname"}}</label>
|
||||
{{input type="text" name="name" value=model.plan.nickname}}
|
||||
<div class="control-instructions">
|
||||
{{i18n 'discourse_subscriptions.admin.plans.plan.nickname_help'}}
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.nickname_help"}}
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
<label for="interval">{{i18n 'discourse_subscriptions.admin.plans.plan.group'}}</label>
|
||||
<label for="interval">{{i18n "discourse_subscriptions.admin.plans.plan.group"}}</label>
|
||||
{{combo-box
|
||||
valueProperty="name"
|
||||
content=availableGroups
|
||||
|
@ -22,11 +21,11 @@
|
|||
onChange=(action (mut model.plan.metadata.group_name))
|
||||
}}
|
||||
<div class="control-instructions">
|
||||
{{i18n 'discourse_subscriptions.admin.plans.plan.group_help'}}
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.group_help"}}
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
<label for="amount">{{i18n 'discourse_subscriptions.admin.plans.plan.amount'}}</label>
|
||||
<label for="amount">{{i18n "discourse_subscriptions.admin.plans.plan.amount"}}</label>
|
||||
{{#if planFieldDisabled}}
|
||||
{{input class="plan-amount plan-currency" disabled=true value=model.plan.currency}}
|
||||
{{else}}
|
||||
|
@ -41,7 +40,7 @@
|
|||
</p>
|
||||
<p>
|
||||
<label for="recurring">
|
||||
{{i18n 'discourse_subscriptions.admin.plans.plan.recurring'}}
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.recurring"}}
|
||||
</label>
|
||||
{{#if planFieldDisabled}}
|
||||
{{input
|
||||
|
@ -55,14 +54,14 @@
|
|||
type="checkbox"
|
||||
name="recurring"
|
||||
checked=model.plan.isRecurring
|
||||
change=(action 'changeRecurring')
|
||||
change=(action "changeRecurring")
|
||||
}}
|
||||
{{/if}}
|
||||
</p>
|
||||
{{#if model.plan.isRecurring}}
|
||||
<p>
|
||||
<label for="interval">
|
||||
{{i18n 'discourse_subscriptions.admin.plans.plan.interval'}}
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.interval"}}
|
||||
</label>
|
||||
{{#if planFieldDisabled}}
|
||||
{{input disabled=true value=selectedInterval}}
|
||||
|
@ -77,18 +76,18 @@
|
|||
</p>
|
||||
<p>
|
||||
<label for="trial">
|
||||
{{i18n 'discourse_subscriptions.admin.plans.plan.trial'}}
|
||||
({{i18n 'discourse_subscriptions.optional'}})
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.trial"}}
|
||||
({{i18n "discourse_subscriptions.optional"}})
|
||||
</label>
|
||||
{{input type="text" name="trial" value=model.plan.trial_period_days}}
|
||||
<div class="control-instructions">
|
||||
{{i18n 'discourse_subscriptions.admin.plans.plan.trial_help'}}
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.trial_help"}}
|
||||
</div>
|
||||
</p>
|
||||
{{/if}}
|
||||
<p>
|
||||
<label for="active">
|
||||
{{i18n 'discourse_subscriptions.admin.plans.plan.active'}}
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.active"}}
|
||||
</label>
|
||||
{{input type="checkbox" name="active" checked=model.plan.active}}
|
||||
</p>
|
||||
|
@ -98,16 +97,24 @@
|
|||
<hr>
|
||||
|
||||
<p class="control-instructions">
|
||||
{{i18n 'discourse_subscriptions.admin.plans.operations.create_help'}}
|
||||
{{i18n "discourse_subscriptions.admin.plans.operations.create_help"}}
|
||||
</p>
|
||||
|
||||
<div class="pull-right">
|
||||
|
||||
{{#if model.plan.isNew}}
|
||||
{{d-button label="discourse_subscriptions.admin.plans.operations.create" action="createPlan" icon="plus" class="btn btn-primary"}}
|
||||
{{d-button
|
||||
label="discourse_subscriptions.admin.plans.operations.create"
|
||||
action="createPlan"
|
||||
icon="plus"
|
||||
class="btn btn-primary"
|
||||
}}
|
||||
{{else}}
|
||||
{{d-button label="discourse_subscriptions.admin.plans.operations.update" action="updatePlan" icon="check" class="btn btn-primary"}}
|
||||
{{d-button
|
||||
label="discourse_subscriptions.admin.plans.operations.update"
|
||||
action="updatePlan"
|
||||
icon="check"
|
||||
class="btn btn-primary"
|
||||
}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
|
|
@ -1,62 +1,63 @@
|
|||
<h4>{{i18n 'discourse_subscriptions.admin.products.title'}}</h4>
|
||||
<h4>{{i18n "discourse_subscriptions.admin.products.title"}}</h4>
|
||||
|
||||
<form class="form-horizontal">
|
||||
<p>
|
||||
<label for="name">{{i18n 'discourse_subscriptions.admin.products.product.name'}}</label>
|
||||
<label for="name">{{i18n "discourse_subscriptions.admin.products.product.name"}}</label>
|
||||
{{input type="text" name="name" value=model.product.name}}
|
||||
</p>
|
||||
<p>
|
||||
<label for="description">
|
||||
{{i18n 'discourse_subscriptions.admin.products.product.description'}}
|
||||
{{i18n "discourse_subscriptions.admin.products.product.description"}}
|
||||
</label>
|
||||
{{textarea name="description" value=model.product.metadata.description class="discourse-subscriptions-admin-textarea"}}
|
||||
<div class="control-instructions">
|
||||
{{i18n 'discourse_subscriptions.admin.products.product.description_help'}}
|
||||
{{i18n "discourse_subscriptions.admin.products.product.description_help"}}
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
<label for="statement_descriptor">
|
||||
{{i18n 'discourse_subscriptions.admin.products.product.statement_descriptor'}}
|
||||
{{i18n "discourse_subscriptions.admin.products.product.statement_descriptor"}}
|
||||
</label>
|
||||
{{input type="text" name="statement_descriptor" value=model.product.statement_descriptor}}
|
||||
<div class="control-instructions">
|
||||
{{i18n 'discourse_subscriptions.admin.products.product.statement_descriptor_help'}}
|
||||
{{i18n "discourse_subscriptions.admin.products.product.statement_descriptor_help"}}
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
<label for="repurchaseable">{{i18n 'discourse_subscriptions.admin.products.product.repurchaseable'}}</label>
|
||||
<label for="repurchaseable">{{i18n "discourse_subscriptions.admin.products.product.repurchaseable"}}</label>
|
||||
{{input type="checkbox" name="repurchaseable" checked=model.product.metadata.repurchaseable}}
|
||||
<div class="control-instructions">
|
||||
{{i18n 'discourse_subscriptions.admin.products.product.repurchase_help'}}
|
||||
{{i18n "discourse_subscriptions.admin.products.product.repurchase_help"}}
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
<label for="active">{{i18n 'discourse_subscriptions.admin.products.product.active'}}</label>
|
||||
<label for="active">{{i18n "discourse_subscriptions.admin.products.product.active"}}</label>
|
||||
{{input type="checkbox" name="active" checked=model.product.active}}
|
||||
<div class="control-instructions">
|
||||
{{i18n 'discourse_subscriptions.admin.products.product.active_help'}}
|
||||
{{i18n "discourse_subscriptions.admin.products.product.active_help"}}
|
||||
</div>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
{{#unless model.product.isNew}}
|
||||
<h4>{{i18n 'discourse_subscriptions.admin.plans.title'}}</h4>
|
||||
<h4>{{i18n "discourse_subscriptions.admin.plans.title"}}</h4>
|
||||
|
||||
<p>
|
||||
<table class="table discourse-patrons-table">
|
||||
<thead>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.nickname'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.interval'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.created_at'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.group'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.active'}}</th>
|
||||
<th class="td-right">{{i18n 'discourse_subscriptions.admin.plans.plan.amount'}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.plans.plan.nickname"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.plans.plan.interval"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.plans.plan.created_at"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.plans.plan.group"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.plans.plan.active"}}</th>
|
||||
<th class="td-right">{{i18n "discourse_subscriptions.admin.plans.plan.amount"}}</th>
|
||||
<th class="td-right">
|
||||
{{#link-to "adminPlugins.discourse-subscriptions.products.show.plans.show" model.product.id "new" class="btn"}}
|
||||
{{i18n 'discourse_subscriptions.admin.plans.operations.add'}}
|
||||
{{i18n "discourse_subscriptions.admin.plans.operations.add"}}
|
||||
{{/link-to}}
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model.plans as |plan|}}
|
||||
<tr>
|
||||
<td>{{plan.nickname}}</td>
|
||||
|
@ -71,26 +72,36 @@
|
|||
{{/link-to}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
|
||||
{{#unless model.plans}}
|
||||
{{else}}
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<hr>
|
||||
{{i18n 'discourse_subscriptions.admin.products.product.plan_help'}}
|
||||
{{i18n "discourse_subscriptions.admin.products.product.plan_help"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
||||
{{/unless}}
|
||||
|
||||
<div class="pull-right">
|
||||
{{d-button label="cancel" action=(action "cancelProduct") icon="times"}}
|
||||
|
||||
{{#if model.product.isNew}}
|
||||
{{d-button label="discourse_subscriptions.admin.products.operations.create" action="createProduct" icon="plus" class="btn btn-primary"}}
|
||||
{{d-button
|
||||
label="discourse_subscriptions.admin.products.operations.create"
|
||||
action="createProduct"
|
||||
icon="plus"
|
||||
class="btn btn-primary"
|
||||
}}
|
||||
{{else}}
|
||||
{{d-button label="discourse_subscriptions.admin.products.operations.update" action="updateProduct" icon="check" class="btn btn-primary"}}
|
||||
{{d-button
|
||||
label="discourse_subscriptions.admin.products.operations.update"
|
||||
action="updateProduct"
|
||||
icon="check"
|
||||
class="btn btn-primary"
|
||||
}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
|
||||
{{outlet}}
|
||||
|
|
|
@ -1,26 +1,27 @@
|
|||
{{#if model.unconfigured}}
|
||||
<p>{{i18n 'discourse_subscriptions.admin.unconfigured'}}</p>
|
||||
<p><a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">{{i18n 'discourse_subscriptions.admin.on_meta'}}</a></p>
|
||||
<p>{{i18n "discourse_subscriptions.admin.unconfigured"}}</p>
|
||||
<p><a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">{{i18n "discourse_subscriptions.admin.on_meta"}}</a></p>
|
||||
{{else}}
|
||||
{{#load-more selector=".discourse-patrons-table tr" action=(action "loadMore")}}
|
||||
<table class="table discourse-patrons-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.subscriptions.subscription.user'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.subscriptions.subscription.subscription_id'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.subscriptions.subscription.customer'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.subscriptions.subscription.product'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.subscriptions.subscription.plan'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.admin.subscriptions.subscription.status'}}</th>
|
||||
<th class="td-right">{{i18n 'discourse_subscriptions.admin.subscriptions.subscription.created_at'}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.subscriptions.subscription.user"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.subscriptions.subscription.subscription_id"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.subscriptions.subscription.customer"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.subscriptions.subscription.product"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.subscriptions.subscription.plan"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.admin.subscriptions.subscription.status"}}</th>
|
||||
<th class="td-right">{{i18n "discourse_subscriptions.admin.subscriptions.subscription.created_at"}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model.data as |subscription|}}
|
||||
<tr>
|
||||
<td>
|
||||
{{#if subscription.metadataUserExists}}
|
||||
<a href="{{unbound subscription.subscriptionUserPath}}">
|
||||
<a href={{subscription.subscriptionUserPath}}>
|
||||
{{subscription.metadata.username}}
|
||||
</a>
|
||||
{{/if}}
|
||||
|
@ -35,12 +36,19 @@
|
|||
{{#if subscription.loading}}
|
||||
{{loading-spinner size="small"}}
|
||||
{{else}}
|
||||
{{d-button disabled=subscription.canceled label="cancel" action=(action "showCancelModal" subscription) icon="times"}}
|
||||
{{d-button
|
||||
disabled=subscription.canceled
|
||||
label="cancel"
|
||||
action=(action "showCancelModal" subscription)
|
||||
icon="times"
|
||||
}}
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/load-more}}
|
||||
|
||||
{{conditional-loading-spinner condition=loading}}
|
||||
{{/if}}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
<h2>{{i18n 'discourse_subscriptions.title' site_name=siteSettings.title}}</h2>
|
||||
<h2>{{i18n "discourse_subscriptions.title" site_name=siteSettings.title}}</h2>
|
||||
|
||||
{{#if stripeConfigured}}
|
||||
<div class="discourse-subscriptions-buttons">
|
||||
|
@ -7,14 +6,14 @@
|
|||
{{d-button
|
||||
label="discourse_subscriptions.campaign.refresh_campaign"
|
||||
icon="sync-alt"
|
||||
action=(action 'triggerManualRefresh')
|
||||
action=(action "triggerManualRefresh")
|
||||
}}
|
||||
{{else}}
|
||||
{{#unless campaignProductSet}}
|
||||
{{d-button
|
||||
label="discourse_subscriptions.campaign.one_click_campaign"
|
||||
icon="plus-square"
|
||||
action=(action 'createOneClickCampaign')
|
||||
action=(action "createOneClickCampaign")
|
||||
isLoading=loading
|
||||
}}
|
||||
{{/unless}}
|
||||
|
@ -22,9 +21,9 @@
|
|||
</div>
|
||||
|
||||
<ul class="nav nav-pills">
|
||||
{{nav-item route='adminPlugins.discourse-subscriptions.products' label='discourse_subscriptions.admin.products.title'}}
|
||||
{{nav-item route='adminPlugins.discourse-subscriptions.coupons' label='discourse_subscriptions.admin.coupons.title'}}
|
||||
{{nav-item route='adminPlugins.discourse-subscriptions.subscriptions' label='discourse_subscriptions.admin.subscriptions.title'}}
|
||||
{{nav-item route="adminPlugins.discourse-subscriptions.products" label="discourse_subscriptions.admin.products.title"}}
|
||||
{{nav-item route="adminPlugins.discourse-subscriptions.coupons" label="discourse_subscriptions.admin.coupons.title"}}
|
||||
{{nav-item route="adminPlugins.discourse-subscriptions.subscriptions" label="discourse_subscriptions.admin.subscriptions.title"}}
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
|
@ -33,6 +32,6 @@
|
|||
{{outlet}}
|
||||
</div>
|
||||
{{else}}
|
||||
<p>{{i18n 'discourse_subscriptions.admin.unconfigured'}}</p>
|
||||
<p><a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">{{i18n 'discourse_subscriptions.admin.on_meta'}}</a></p>
|
||||
<p>{{i18n "discourse_subscriptions.admin.unconfigured"}}</p>
|
||||
<p><a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">{{i18n "discourse_subscriptions.admin.on_meta"}}</a></p>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,57 +1,56 @@
|
|||
{{#if shouldShow}}
|
||||
<div class="campaign-banner" style="box-shadow: 5px 5px #{{dropShadowColor}}">
|
||||
<div class="campaign-banner" style={{html-safe (concat "box-shadow: 5px 5px #" dropShadowColor)}}>
|
||||
{{d-button
|
||||
icon="times"
|
||||
action="dismissBanner"
|
||||
class="close"
|
||||
}}
|
||||
<div class="campaign-banner-info" style="{{if backgroundImageUrl 'background-image: linear-gradient(
|
||||
0deg,
|
||||
rgba(var(--secondary-rgb), 0.75) 0%,
|
||||
rgba(var(--secondary-rgb), 0.75) 100%),
|
||||
var(--campaign-background-image);
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;' ''}}">
|
||||
<div class="campaign-banner-info" style={{html-safe this.bannerInfoStyle}}>
|
||||
{{#if isGoalMet}}
|
||||
<h2 class="campaign-banner-info-header">{{i18n 'discourse_subscriptions.campaign.success_title'}}</h2>
|
||||
<p class="campaign-banner-info-description">{{i18n 'discourse_subscriptions.campaign.success_body'}}</p>
|
||||
<h2 class="campaign-banner-info-header">{{i18n "discourse_subscriptions.campaign.success_title"}}</h2>
|
||||
<p class="campaign-banner-info-description">{{i18n "discourse_subscriptions.campaign.success_body"}}</p>
|
||||
{{else}}
|
||||
<h2 class="campaign-banner-info-header">{{i18n 'discourse_subscriptions.campaign.title'}}</h2>
|
||||
<p class="campaign-banner-info-description">{{i18n 'discourse_subscriptions.campaign.body'}}</p>
|
||||
<h2 class="campaign-banner-info-header">{{i18n "discourse_subscriptions.campaign.title"}}</h2>
|
||||
<p class="campaign-banner-info-description">{{i18n "discourse_subscriptions.campaign.body"}}</p>
|
||||
|
||||
{{#if product}}
|
||||
{{#link-to "s.show" product disabled=product.subscribed class="btn btn-primary campaign-banner-info-button"}}
|
||||
{{d-icon "far-heart"}} {{d-icon "heart" class="hover-heart"}} {{i18n 'discourse_subscriptions.campaign.button'}}
|
||||
{{d-icon "far-heart"}} {{d-icon "heart" class="hover-heart"}} {{i18n "discourse_subscriptions.campaign.button"}}
|
||||
{{/link-to}}
|
||||
{{else}}
|
||||
{{#link-to "s" class="btn btn-primary campaign-banner-info-button"}}
|
||||
{{d-icon "far-heart"}} {{d-icon "heart" class="hover-heart"}} {{i18n 'discourse_subscriptions.campaign.button'}}
|
||||
{{d-icon "far-heart"}} {{d-icon "heart" class="hover-heart"}} {{i18n "discourse_subscriptions.campaign.button"}}
|
||||
{{/link-to}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="campaign-banner-progress">
|
||||
{{#if isGoalMet}}
|
||||
<div class="fireworks">
|
||||
<div class="before"></div>
|
||||
<div class="after"></div>
|
||||
</div>
|
||||
|
||||
<div class="campaign-banner-progress-success"></div>
|
||||
|
||||
{{#if subscriberGoal}}
|
||||
<p class="campaign-banner-progress-description">
|
||||
{{html-safe (i18n 'discourse_subscriptions.campaign.goal_comparison' current=subscribers goal=goalTarget)}}
|
||||
{{i18n 'discourse_subscriptions.campaign.subscribers'}}
|
||||
{{html-safe (i18n "discourse_subscriptions.campaign.goal_comparison" current=subscribers goal=goalTarget)}}
|
||||
{{i18n "discourse_subscriptions.campaign.subscribers"}}
|
||||
</p>
|
||||
{{else}}
|
||||
<p class="campaign-banner-progress-description">
|
||||
{{html-safe (i18n 'discourse_subscriptions.campaign.goal_comparison' current=(format-currency currency amountRaised) goal=(format-currency currency goalTarget))}}
|
||||
{{i18n 'discourse_subscriptions.campaign.raised'}}
|
||||
{{html-safe (i18n "discourse_subscriptions.campaign.goal_comparison" current=(format-currency currency amountRaised) goal=(format-currency currency goalTarget))}}
|
||||
{{i18n "discourse_subscriptions.campaign.raised"}}
|
||||
</p>
|
||||
{{#if showContributors}}
|
||||
{{#conditional-loading-spinner condition=loading size="small"}}
|
||||
<div class="campaign-banner-progress-users">
|
||||
<p class="campaign-banner-progress-users-title">
|
||||
<strong>{{i18n 'discourse_subscriptions.campaign.recent_contributors'}}</strong>
|
||||
<strong>{{i18n "discourse_subscriptions.campaign.recent_contributors"}}</strong>
|
||||
</p>
|
||||
|
||||
<div class="campaign-banner-progress-users-avatars">
|
||||
{{#each contributors as |contributor|}}
|
||||
{{avatar contributor avatarTemplatePath="avatar_template" usernamePath="username" namePath="name" imageSize="small"}}
|
||||
|
@ -63,23 +62,24 @@
|
|||
{{/if}}
|
||||
{{else}}
|
||||
{{#if subscriberGoal}}
|
||||
<progress class="campaign-banner-progress-bar" value="{{subscribers}}" max="{{siteSettings.discourse_subscriptions_campaign_goal}}"/>
|
||||
<progress class="campaign-banner-progress-bar" value={{subscribers}} max={{siteSettings.discourse_subscriptions_campaign_goal}}/>
|
||||
<p class="campaign-banner-progress-description">
|
||||
{{i18n 'discourse_subscriptions.campaign.goal_comparison' current=subscribers goal=goalTarget}}
|
||||
{{i18n 'discourse_subscriptions.campaign.subscribers'}}
|
||||
{{i18n "discourse_subscriptions.campaign.goal_comparison" current=subscribers goal=goalTarget}}
|
||||
{{i18n "discourse_subscriptions.campaign.subscribers"}}
|
||||
</p>
|
||||
{{else}}
|
||||
<progress class="campaign-banner-progress-bar" value="{{amountRaised}}" max="{{siteSettings.discourse_subscriptions_campaign_goal}}"/>
|
||||
<progress class="campaign-banner-progress-bar" value={{amountRaised}} max={{siteSettings.discourse_subscriptions_campaign_goal}}/>
|
||||
<p class="campaign-banner-progress-description">
|
||||
{{html-safe (i18n 'discourse_subscriptions.campaign.goal_comparison' current=(format-currency currency amountRaised) goal=(format-currency currency goalTarget))}}
|
||||
{{i18n 'discourse_subscriptions.campaign.raised'}}
|
||||
{{html-safe (i18n "discourse_subscriptions.campaign.goal_comparison" current=(format-currency currency amountRaised) goal=(format-currency currency goalTarget))}}
|
||||
{{i18n "discourse_subscriptions.campaign.raised"}}
|
||||
</p>
|
||||
{{/if}}
|
||||
|
||||
{{#if showContributors}}
|
||||
{{#conditional-loading-spinner condition=loading size="small"}}
|
||||
<div class="campaign-banner-progress-users">
|
||||
<p class="campaign-banner-progress-users-title">
|
||||
<strong>{{i18n 'discourse_subscriptions.campaign.recent_contributors'}}</strong>
|
||||
<strong>{{i18n "discourse_subscriptions.campaign.recent_contributors"}}</strong>
|
||||
</p>
|
||||
<div class="campaign-banner-progress-users-avatars">
|
||||
{{#each contributors as |contributor|}}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class='create-coupon-form'>
|
||||
<div class="create-coupon-form">
|
||||
<form class="form-horizontal">
|
||||
<p>
|
||||
<label for="promo_code">{{i18n 'discourse_subscriptions.admin.coupons.promo_code'}}</label>
|
||||
<label for="promo_code">{{i18n "discourse_subscriptions.admin.coupons.promo_code"}}</label>
|
||||
{{input type="text" name="promo_code" value=promoCode}}
|
||||
</p>
|
||||
<p>
|
||||
<label for="amount">{{i18n 'discourse_subscriptions.admin.coupons.discount'}}</label>
|
||||
<label for="amount">{{i18n "discourse_subscriptions.admin.coupons.discount"}}</label>
|
||||
{{combo-box
|
||||
content=discountTypes
|
||||
value=discountType
|
||||
|
@ -15,7 +15,7 @@
|
|||
</p>
|
||||
<p>
|
||||
<label for="active">
|
||||
{{i18n 'discourse_subscriptions.admin.coupons.active'}}
|
||||
{{i18n "discourse_subscriptions.admin.coupons.active"}}
|
||||
</label>
|
||||
{{input type="checkbox" name="active" checked=active}}
|
||||
</p>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<h3>{{i18n 'discourse_subscriptions.subscribe.unauthenticated'}}</h3>
|
||||
<h3>{{i18n "discourse_subscriptions.subscribe.unauthenticated"}}</h3>
|
||||
{{d-button label="log_in" action="createAccount" icon="user" class="btn btn-primary"}}
|
||||
|
|
|
@ -8,22 +8,22 @@
|
|||
<div class="product-purchase">
|
||||
{{#if product.repurchaseable}}
|
||||
{{#link-to "s.show" product.id class="btn btn-primary"}}
|
||||
{{i18n 'discourse_subscriptions.subscribe.title'}}
|
||||
{{i18n "discourse_subscriptions.subscribe.title"}}
|
||||
{{/link-to}}
|
||||
{{#if product.subscribed}}
|
||||
{{#link-to "user.billing.subscriptions" currentUser.username class="billing-link"}}
|
||||
{{i18n 'discourse_subscriptions.subscribe.view_past'}}
|
||||
{{i18n "discourse_subscriptions.subscribe.view_past"}}
|
||||
{{/link-to}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if product.subscribed}}
|
||||
<span class="purchased">✓ {{i18n 'discourse_subscriptions.subscribe.purchased'}}</span>
|
||||
<span class="purchased">✓ {{i18n "discourse_subscriptions.subscribe.purchased"}}</span>
|
||||
{{#link-to "user.billing.subscriptions" currentUser.username class="billing-link"}}
|
||||
{{i18n 'discourse_subscriptions.subscribe.go_to_billing'}}
|
||||
{{i18n "discourse_subscriptions.subscribe.go_to_billing"}}
|
||||
{{/link-to}}
|
||||
{{else}}
|
||||
{{#link-to "s.show" product.id disabled=product.subscribed class="btn btn-primary"}}
|
||||
{{i18n 'discourse_subscriptions.subscribe.title'}}
|
||||
{{i18n "discourse_subscriptions.subscribe.title"}}
|
||||
{{/link-to}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{#if emptyProducts}}
|
||||
<p>{{i18n 'discourse_subscriptions.subscribe.no_products'}}</p>
|
||||
<p>{{i18n "discourse_subscriptions.subscribe.no_products"}}</p>
|
||||
{{else}}
|
||||
{{#each products as |product|}}
|
||||
{{product-item product=product isLoggedIn=isLoggedIn}}
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
|
||||
<div id="card-element"></div>
|
||||
|
|
|
@ -1 +1 @@
|
|||
{{campaign-banner connectorName='above-main-container'}}
|
||||
{{campaign-banner connectorName="above-main-container"}}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{{campaign-banner connectorName='after-topic-footer-buttons'}}
|
||||
{{campaign-banner connectorName="after-topic-footer-buttons"}}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{{campaign-banner connectorName='before-topic-list'}}
|
||||
{{campaign-banner connectorName="before-topic-list"}}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{{#if (user-viewing-self model)}}
|
||||
{{#link-to 'user.billing'}}{{d-icon "far-credit-card"}}{{I18n 'discourse_subscriptions.navigation.billing'}}{{/link-to}}
|
||||
{{#link-to "user.billing"}}{{d-icon "far-credit-card"}}{{I18n "discourse_subscriptions.navigation.billing"}}{{/link-to}}
|
||||
{{/if}}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
{{i18n "discourse_subscriptions.admin.ask_refund"}}
|
||||
{{/d-modal-body}}
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
{{#if model.loading}}
|
||||
{{loading-spinner}}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
<div class="container">
|
||||
<div class="title-wrapper">
|
||||
<h1>
|
||||
{{i18n 'discourse_subscriptions.subscribe.title'}}
|
||||
{{i18n "discourse_subscriptions.subscribe.title"}}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{#unless isLoggedIn}}
|
||||
{{login-required}}
|
||||
{{/unless}}
|
||||
|
||||
{{product-list products=model isLoggedIn=isLoggedIn}}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<div class="discourse-subscriptions-section-columns">
|
||||
<div class="section-column discourse-subscriptions-confirmation-billing">
|
||||
<h2>
|
||||
|
@ -14,7 +13,7 @@
|
|||
<div class="section-column">
|
||||
{{#if canPurchase}}
|
||||
<h2>
|
||||
{{i18n 'discourse_subscriptions.subscribe.card.title'}}
|
||||
{{i18n "discourse_subscriptions.subscribe.card.title"}}
|
||||
</h2>
|
||||
|
||||
<hr>
|
||||
|
@ -33,7 +32,7 @@
|
|||
{{else if isAnonymous}}
|
||||
{{login-required}}
|
||||
{{else}}
|
||||
<div class='promo-code'>
|
||||
<div class="promo-code">
|
||||
{{input type="text" name="promo_code" placeholderKey="discourse_subscriptions.subscribe.promo_code" value=promoCode}}
|
||||
</div>
|
||||
|
||||
|
@ -45,9 +44,10 @@
|
|||
}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<h2>{{i18n 'discourse_subscriptions.subscribe.already_purchased'}}</h2>
|
||||
<h2>{{i18n "discourse_subscriptions.subscribe.already_purchased"}}</h2>
|
||||
|
||||
{{#link-to "user.billing.subscriptions" currentUser.username class="btn btn-primary"}}
|
||||
{{i18n 'discourse_subscriptions.subscribe.go_to_billing'}}
|
||||
{{i18n "discourse_subscriptions.subscribe.go_to_billing"}}
|
||||
{{/link-to}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
{{#d-section pageClass="user-billing" class="user-secondary-navigation" scrollTop="false"}}
|
||||
{{#mobile-nav
|
||||
class='activity-nav'
|
||||
desktopClass='action-list nav-stacked'
|
||||
class="activity-nav"
|
||||
desktopClass="action-list nav-stacked"
|
||||
currentPath=router._router.currentPath
|
||||
}}
|
||||
<li>
|
||||
{{#link-to 'user.billing.subscriptions'}}
|
||||
{{i18n 'discourse_subscriptions.navigation.subscriptions'}}
|
||||
{{#link-to "user.billing.subscriptions"}}
|
||||
{{i18n "discourse_subscriptions.navigation.subscriptions"}}
|
||||
{{/link-to}}
|
||||
</li>
|
||||
|
||||
<li>
|
||||
{{#link-to 'user.billing.payments'}}
|
||||
{{i18n 'discourse_subscriptions.navigation.payments'}}
|
||||
{{#link-to "user.billing.payments"}}
|
||||
{{i18n "discourse_subscriptions.navigation.payments"}}
|
||||
{{/link-to}}
|
||||
</li>
|
||||
{{/mobile-nav}}
|
||||
{{/d-section}}
|
||||
|
||||
<section class='user-content'>
|
||||
<section class="user-content">
|
||||
{{outlet}}
|
||||
</section>
|
||||
|
|
|
@ -1,4 +1 @@
|
|||
|
||||
|
||||
|
||||
BILLING INDEX
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{{#if model}}
|
||||
<table class="table discourse-subscriptions-user-table">
|
||||
<thead>
|
||||
<th>{{i18n 'discourse_subscriptions.user.payments.id'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.user.payments.amount'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.user.payments.created_at'}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.user.payments.id"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.user.payments.amount"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.user.payments.created_at"}}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model as |payment|}}
|
||||
<tr>
|
||||
<td>{{payment.id}}</td>
|
||||
|
@ -12,9 +13,10 @@
|
|||
<td>{{format-unix-date payment.created}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<div class="alert alert-info">
|
||||
{{i18n 'discourse_subscriptions.user.payments_help'}}
|
||||
{{i18n "discourse_subscriptions.user.payments_help"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
{{#if model}}
|
||||
<table class="table discourse-subscriptions-user-table">
|
||||
<thead>
|
||||
<th>{{i18n 'discourse_subscriptions.user.subscriptions.id'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.user.plans.product'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.user.plans.rate'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.user.subscriptions.discounted'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.user.subscriptions.status'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.user.subscriptions.renews'}}</th>
|
||||
<th>{{i18n 'discourse_subscriptions.user.subscriptions.created_at'}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.user.subscriptions.id"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.user.plans.product"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.user.plans.rate"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.user.subscriptions.discounted"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.user.subscriptions.status"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.user.subscriptions.renews"}}</th>
|
||||
<th>{{i18n "discourse_subscriptions.user.subscriptions.created_at"}}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model as |subscription|}}
|
||||
<tr>
|
||||
<td>{{subscription.id}}</td>
|
||||
|
@ -32,9 +33,10 @@
|
|||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<div class="alert alert-info">
|
||||
{{i18n 'discourse_subscriptions.user.subscriptions_help'}}
|
||||
{{i18n "discourse_subscriptions.user.subscriptions_help"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -70,8 +70,7 @@ en:
|
|||
week: Weekly
|
||||
month: Monthly
|
||||
year: Yearly
|
||||
payment_button:
|
||||
Subscribe
|
||||
payment_button: Subscribe
|
||||
success: Thank you! Your subscription has been created.
|
||||
incomplete: The payment is incomplete. Your subscription will be updated when payment is complete.
|
||||
validate:
|
||||
|
|
Loading…
Reference in New Issue