2022-05-11 20:11:54 +03:00
|
|
|
<div class="gh-main-content-card gh-tier-card" data-test-tier-card={{@tier.slug}}>
|
|
|
|
<div class="gh-tier-card-block title-block">
|
|
|
|
<h3 class="gh-tier-card-name" data-test-name>
|
|
|
|
{{@tier.name}}
|
2022-01-17 21:53:43 +03:00
|
|
|
</h3>
|
2022-05-11 20:11:54 +03:00
|
|
|
<p class="gh-tier-card-description" data-test-description>
|
|
|
|
{{#if @tier.description.length}}
|
|
|
|
{{@tier.description}}
|
2022-02-03 20:03:23 +03:00
|
|
|
{{else}}
|
|
|
|
No description added for this tier.
|
|
|
|
{{/if}}
|
2022-01-17 21:53:43 +03:00
|
|
|
</p>
|
|
|
|
</div>
|
2022-05-11 20:11:54 +03:00
|
|
|
<div class="gh-tier-card-block benefits-block" data-test-benefits>
|
|
|
|
<h4>Benefits <span class="counter">({{or @tier.benefits.length "0"}})</span></h4>
|
|
|
|
{{#if @tier.benefits.length}}
|
2022-01-17 21:53:43 +03:00
|
|
|
<ul class="benefits">
|
2022-05-11 20:11:54 +03:00
|
|
|
{{#each @tier.benefits as |benefit|}}
|
2022-01-17 21:53:43 +03:00
|
|
|
<li>{{svg-jar "check"}} {{benefit.name}} </li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{else}}
|
2022-05-11 20:11:54 +03:00
|
|
|
<p class="gh-tier-card-description">No benefits added for this tier.</p>
|
2022-01-17 21:53:43 +03:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2022-05-11 20:11:54 +03:00
|
|
|
{{#if (eq @tier.type "free" )}}
|
|
|
|
<div class="gh-tier-card-block">
|
|
|
|
<div class="gh-tier-price-container">
|
|
|
|
<div class="gh-tier-card-price" data-test-free-price>
|
2022-01-17 21:53:43 +03:00
|
|
|
<div class="flex items-start">
|
2022-05-11 20:11:54 +03:00
|
|
|
<span class="currency">{{currency-symbol this.tierCurrency}}</span>
|
2022-01-17 21:53:43 +03:00
|
|
|
<span class="amount">0</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2022-05-11 20:11:54 +03:00
|
|
|
{{#if (eq @tier.type "paid" )}}
|
|
|
|
<div class="gh-tier-card-block">
|
|
|
|
<div class="gh-tier-price-container">
|
|
|
|
<div class="gh-tier-card-price" data-test-monthly-price>
|
2022-01-17 21:53:43 +03:00
|
|
|
<div class="flex items-start">
|
2022-05-11 20:11:54 +03:00
|
|
|
<span class="currency">{{currency-symbol this.tierCurrency}}</span>
|
2022-05-16 21:51:49 +03:00
|
|
|
<span class="amount">{{gh-price-amount @tier.monthlyPrice}}</span>
|
2022-01-17 21:53:43 +03:00
|
|
|
</div>
|
|
|
|
<div class="period">Monthly</div>
|
|
|
|
</div>
|
2022-05-11 20:11:54 +03:00
|
|
|
<div class="gh-tier-card-price" data-test-yearly-price>
|
2022-01-17 21:53:43 +03:00
|
|
|
<div class="flex items-start">
|
2022-05-11 20:11:54 +03:00
|
|
|
<span class="currency">{{currency-symbol this.tierCurrency}}</span>
|
2022-05-16 21:51:49 +03:00
|
|
|
<span class="amount">{{gh-price-amount @tier.yearlyPrice}}</span>
|
2022-01-17 21:53:43 +03:00
|
|
|
</div>
|
|
|
|
<div class="period">Yearly</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2022-05-11 20:11:54 +03:00
|
|
|
{{#if (eq @tier.type "paid" )}}
|
|
|
|
<div class="gh-tier-card-button-container">
|
2022-01-31 21:26:12 +03:00
|
|
|
<span class="dropdown">
|
|
|
|
<GhDropdownButton
|
2022-05-11 20:11:54 +03:00
|
|
|
@dropdownName="tiers-actions-menu-{{@tier.name}}"
|
|
|
|
@classNames="gh-btn gh-btn-action-icon gh-btn-icon gh-btn-outline gh-tier-card-actions-button icon-only"
|
2022-01-31 21:26:12 +03:00
|
|
|
@title="Tiers Actions"
|
|
|
|
data-test-button="tiers-actions"
|
|
|
|
>
|
|
|
|
<span>
|
|
|
|
{{svg-jar "dotdotdot"}}
|
|
|
|
<span class="hidden">Actions</span>
|
|
|
|
</span>
|
|
|
|
</GhDropdownButton>
|
|
|
|
<GhDropdown
|
2022-05-11 20:11:54 +03:00
|
|
|
@name="tiers-actions-menu-{{@tier.name}}"
|
2022-01-31 21:26:12 +03:00
|
|
|
@tagName="ul"
|
|
|
|
@classNames="gh-tier-actions-menu dropdown-menu dropdown-triangle-top-right"
|
|
|
|
>
|
|
|
|
<li>
|
2022-05-11 20:11:54 +03:00
|
|
|
<button class="mr2" type="button" {{on "click" (fn this.openEditTier @tier)}}>
|
2022-01-31 21:26:12 +03:00
|
|
|
<span>Edit</span>
|
|
|
|
</button>
|
|
|
|
</li>
|
2022-02-02 14:04:51 +03:00
|
|
|
{{#if this.showArchiveOption}}
|
2022-02-01 14:56:18 +03:00
|
|
|
<li>
|
2022-02-02 13:51:21 +03:00
|
|
|
<Settings::Members::ArchiveTier
|
2022-05-11 20:11:54 +03:00
|
|
|
@tier={{@tier}}
|
2022-02-02 13:51:21 +03:00
|
|
|
@onUnarchive={{@onUnarchive}}
|
2022-03-09 10:35:07 +03:00
|
|
|
@onArchive={{@onArchive}}
|
2022-02-02 13:51:21 +03:00
|
|
|
/>
|
2022-02-01 14:56:18 +03:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
2022-01-31 21:26:12 +03:00
|
|
|
</GhDropdown>
|
|
|
|
</span>
|
|
|
|
</div>
|
2022-02-03 20:03:23 +03:00
|
|
|
{{else}}
|
2022-05-11 20:11:54 +03:00
|
|
|
<div class="gh-tier-card-button-container">
|
|
|
|
<button type="button" {{on "click" (fn this.openEditTier @tier)}} class="gh-btn gh-btn-action-icon gh-btn-icon gh-btn-outline gh-tier-card-edit-button icon-only" data-test-button="edit-tier">
|
2022-02-03 20:03:23 +03:00
|
|
|
<span>
|
|
|
|
{{svg-jar "pen"}}
|
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2022-01-17 21:53:43 +03:00
|
|
|
</div>
|