mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 11:54:33 +03:00
affe6743e5
refs: https://github.com/TryGhost/Team/issues/1145 - this should allow us to remove the /products endpoint in v5 It avoids: - `kg-product-card`, that really is meant to say product - `product-cadence` on offers Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
55 lines
2.0 KiB
Handlebars
55 lines
2.0 KiB
Handlebars
<div class="flex justify-between items-center">
|
|
<label>Tiers</label>
|
|
<div>
|
|
<div class="gh-contentfilter-menu gh-contentfilter-type {{if (not (eq this.selectedType.value "active")) "gh-contentfilter-selected"}}" data-test-type-select="true">
|
|
<PowerSelect
|
|
@selected={{this.selectedType}}
|
|
@options={{this.availableTypes}}
|
|
@searchEnabled={{false}}
|
|
@onChange={{this.onTypeChange}}
|
|
@triggerComponent="gh-power-select/trigger"
|
|
@triggerClass="gh-contentfilter-menu-trigger gh-contentfilter-menu-trigger-tiers"
|
|
@dropdownClass="gh-contentfilter-menu-dropdown"
|
|
@matchTriggerWidth={{false}}
|
|
as |type|
|
|
>
|
|
{{#if type.name}}{{type.name}}{{else}}<span class="red">Unknown type</span>{{/if}}
|
|
</PowerSelect>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="gh-tier-cards">
|
|
{{#if this.isEmptyList}}
|
|
<div class="gh-main-content-card gh-tier-card-empty-state">
|
|
<p>You have no {{this.selectedType.value}} tiers.</p>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#each this.tiers as |tier|}}
|
|
<GhTierCard
|
|
@tier={{tier}}
|
|
@openEditTier={{this.openEditTier}}
|
|
@onUnarchive={{this.onUnarchive}}
|
|
@onArchive={{this.onArchive}}
|
|
/>
|
|
{{/each}}
|
|
{{#if (eq this.type "active" )}}
|
|
<div class="gh-tier-cards-footer">
|
|
<button class="gh-btn gh-btn-link gh-btn-text gh-btn-icon gh-btn-add-tier green" type="button" {{action "openNewTier" this.tier}}>
|
|
<span>{{svg-jar "add-stroke" class="stroke-green"}}Add tier</span>
|
|
</button>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
|
|
{{#if this.showTierModal}}
|
|
<GhFullscreenModal
|
|
@modal="tier"
|
|
@model={{hash
|
|
tier=this.tierModel
|
|
}}
|
|
@confirm={{this.confirmTierSave}}
|
|
@close={{this.closeTierModal}}
|
|
@modifier="edit-tier action wide" />
|
|
{{/if}}
|