mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 01:03:23 +03:00
54f075b330
closes TryGhost/Team#2288
60 lines
2.6 KiB
Handlebars
60 lines
2.6 KiB
Handlebars
<h4 class="gh-main-section-header small bn">Newsletters</h4>
|
|
<div class="gh-main-section-content grey {{if (and (feature "suppressionList") (not this.suppressionData.suppressed)) 'gh-member-newsletter-section'}}">
|
|
{{#unless this.suppressionData.suppressed}}
|
|
<div class="gh-member-newsletters">
|
|
{{#each this.newsletters as |newsletter|}}
|
|
<div class="gh-member-newsletter-row">
|
|
<div>
|
|
<h4 class="gh-member-newsletter-title">{{newsletter.name}}</h4>
|
|
</div>
|
|
<div class="for-switch {{if (and (feature "suppressionList") this.suppressionData.suppressed) 'disabled'}}">
|
|
<label class="switch" for={{newsletter.forId}}>
|
|
<Input
|
|
@checked={{newsletter.subscribed}}
|
|
@type="checkbox"
|
|
id={{newsletter.forId}}
|
|
name="subscribed"
|
|
data-test-checkbox="member-subscribed"
|
|
{{on "click" (fn this.updateNewsletterPreference newsletter)}}
|
|
/>
|
|
<span class="input-toggle-component"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
{{/unless}}
|
|
|
|
{{#if (and (feature "suppressionList") this.suppressionData.suppressed)}}
|
|
<div class="gh-members-no-data gh-member-newsletter-no-data">
|
|
{{#if (eq this.suppressionData.reason 'fail')}}
|
|
{{svg-jar "suppression-notice-bounced" class="gh-member-newsletter-icon"}}
|
|
{{/if}}
|
|
|
|
{{#if (eq this.suppressionData.reason 'spam')}}
|
|
{{svg-jar "suppression-notice-flagged" class="gh-member-newsletter-icon"}}
|
|
{{/if}}
|
|
|
|
<h4>Email disabled</h4>
|
|
|
|
<p>
|
|
{{#if (eq this.suppressionData.reason 'fail')}}
|
|
Bounced on {{this.suppressionData.date}}
|
|
{{/if}}
|
|
|
|
{{#if (eq this.suppressionData.reason 'spam')}}
|
|
Flagged as spam on {{this.suppressionData.date}}
|
|
{{/if}}
|
|
|
|
<a class="midgrey" href="javascript:void(0)" target="_blank" rel="noopener noreferrer">Learn more</a>
|
|
</p>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if (and (feature "suppressionList") (not this.suppressionData.suppressed))}}
|
|
<div class="gh-member-newsletter-footer midgrey">
|
|
If disabled, member will <em>not</em> receive newsletter emails
|
|
</div>
|
|
{{/if}}
|
|
</div>
|