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