mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
5bdef5e44e
closes https://github.com/TryGhost/Team/issues/1028 Bulk operations - add/remove label, unsubscribe - were added to filtered members list behind filtering labs flag as part of introducing filtering on members list. This handles the success/error response on bulk operations and shows them in the popup similar to delete bulk operation.
67 lines
2.6 KiB
Handlebars
67 lines
2.6 KiB
Handlebars
<header class="modal-header" data-test-modal="unsubscribe-members">
|
|
<h1>Unsubscribe members from email?</h1>
|
|
</header>
|
|
<a class="close" href="" role="button" title="Close" {{action "closeModal"}}>{{svg-jar "close"}}<span class="hidden">Close</span></a>
|
|
|
|
{{#if (not this.confirmed)}}
|
|
<div class="modal-body" data-test-state="unsubscribe-unconfirmed">
|
|
<p>
|
|
You're about to unsubscribe
|
|
<strong data-test-text="unsubscribe-count">{{gh-pluralize this.model.memberCount "member"}}</strong> from email newsletters.
|
|
Are you sure?
|
|
</p>
|
|
</div>
|
|
{{else}}
|
|
<div class="gh-content-box pa" data-test-state="unsubscribe-complete">
|
|
{{#if this.error}}
|
|
<div class="flex items-center">
|
|
{{svg-jar "warning" class="w4 h4 fill-red mr2 nudge-top--3"}}
|
|
<div>
|
|
<p class="ma0 pa0">
|
|
<span class="fw5" data-test-text="unsubscribe-error">{{this.error}}</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<div class="flex items-center">
|
|
{{svg-jar "check-circle" class="w4 h4 stroke-green mr2"}}
|
|
<p class="ma0 pa0">
|
|
<span class="fw6" data-test-text="unsubscribe-count">{{gh-pluralize this.response.stats.successful "member"}}</span>
|
|
successfully unsubscribed
|
|
</p>
|
|
</div>
|
|
{{#if this.response.stats.unsuccessful}}
|
|
<div class="flex items-start mt2" data-test-bulk-delete-errors>
|
|
{{svg-jar "warning" class="w4 h4 fill-red mr2 nudge-top--3"}}
|
|
<div>
|
|
<p class="ma0 pa0">
|
|
<span class="fw5" data-test-text="invalid-count">{{gh-pluralize this.response.stats.unsuccessful "member"}}</span>
|
|
failed to unsubscribe
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="modal-footer">
|
|
{{#if (not this.confirmed)}}
|
|
<button {{action "closeModal"}} class="gh-btn" data-test-button="cancel">
|
|
<span>Cancel</span>
|
|
</button>
|
|
|
|
<GhTaskButton
|
|
@buttonText="Unsubscribe members"
|
|
@successText="Unsubscribed"
|
|
@task={{this.unsubscribeMemberTask}}
|
|
@class="gh-btn gh-btn-red gh-btn-icon"
|
|
data-test-button="confirm"
|
|
/>
|
|
{{else}}
|
|
<button {{action "closeModal"}} class="gh-btn gh-btn-black" data-test-button="close-modal">
|
|
<span>Close</span>
|
|
</button>
|
|
{{/if}}
|
|
</div>
|