Ghost/ghost/admin/app/components/member/subscription-detail-box.hbs
Kevin Ansfield ea9c8c03fe
Update dependency ember-template-lint to v5.3.0 (#16062)
refs https://github.com/TryGhost/Ghost/pull/15550

Pulled out of the rolled up node+ember-js+ember-template rollup linter update PR as it required fairly extensive changes.

- bumped package
- renamed `no-down-event-binding` to `no-pointer-down-event-binding`
- disabled `no-pointer-down-event-binding` rule
- disabled `no-triple-curlies` rule
- ran `yarn lint:hbs --fix`
- updated integration tests to match Octane syntax
- fixed various one-off errors
- updated .lint-todo
2023-01-04 09:39:32 +00:00

54 lines
2.3 KiB
Handlebars

<button type="button" class="flex pointer flex-row items-center gh-cp-membertier-details {{if this.showDetails "
rotate"}}" {{on "click" this.toggleSubscriptionExpanded}} aria-label="Show details">
Subscription details {{svg-jar "arrow-right-stroke"}}
</button>
<div class="gh-membertier-advanced {{unless this.showDetails " hide"}}" data-test-subscription={{@index}}>
<div class="gh-membertier-details-container">
<div class="gh-membertier-details">
<p>
Created&nbsp;&mdash;&nbsp;<span>{{@sub.startDate}}</span>
</p>
{{#if (eq @sub.attribution.referrerSource 'Unknown')}}
{{else}}
<p>
Source&nbsp;&mdash;&nbsp;<span>{{@sub.attribution.referrerSource}}</span>
</p>
{{/if}}
{{#if (and @sub.attribution @sub.attribution.url @sub.attribution.title)}}
<p>
Page&nbsp;&mdash;&nbsp;<a href="{{@sub.attribution.url}}" target="_blank" rel="noopener noreferrer">{{ @sub.attribution.title }}</a>
</p>
{{/if}}
</div>
{{#if (or @sub.cancellationReason @sub.offer)}}
<div class="gh-membertier-offer-cancellation">
{{#if @sub.cancellationReason}}
<div>
<h4>Cancellation reason</h4>
<div class="gh-membertier-cancelreason">{{@sub.cancellationReason}}</div>
</div>
{{/if}}
{{#if @sub.offer}}
{{#if (eq @sub.offer.type "trial")}}
<div>
<h4>Offer</h4>
<span class="gh-cp-membertier-pricelabel"> {{@sub.offer.name}} </span>
&ndash; {{@sub.offer.amount}} days free
</div>
{{else}}
<div>
<h4>Offer</h4>
<span class="gh-cp-membertier-pricelabel"> {{@sub.offer.name}}
{{#if (eq @sub.offer.type 'fixed')}}
&ndash; {{currency-symbol @sub.offer.currency}}{{gh-price-amount @sub.offer.amount}} off
{{else}}
&ndash; {{@sub.offer.amount}}% off
{{/if}}
</span>
</div>
{{/if}}
{{/if}}
</div>
{{/if}}
</div>
</div>