mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 08:13:34 +03:00
755e048f98
Update for synchronous feature service Add client-side handling of server-side errors when adding subscribers - display server-provided error message when we get a server error - fix the ajax util's `getRequestErrorMessage` method so that it works correctly with Ember's `InvalidError` object instead of the previous request object that it was receiving (*TODO:* this really needs looking at properly so we aren't losing details and Ember Data can do it's stuff) Styling updates - proper icon for ascending/descending - change hover colour to green for "Import CSV" button Delete subscriber button with confirm modal - display delete button when hovering over a subscriber row (WARN: really ugly button, styles definitely want looking at) - show confirm modal when clicking the delete button - delete subscriber, remove from table, and update total on confirm
50 lines
1.7 KiB
Handlebars
50 lines
1.7 KiB
Handlebars
<section class="gh-view view-subscribers">
|
|
<header class="view-header">
|
|
{{#gh-view-title openMobileMenu="openMobileMenu"}}<span>Subscribers</span>{{/gh-view-title}}
|
|
<div class="view-actions">
|
|
{{#link-to "subscribers.new" class="btn btn-green"}}Add Subscriber{{/link-to}}
|
|
</div>
|
|
</header>
|
|
|
|
<section class="view-container">
|
|
{{gh-subscribers-table
|
|
table=table
|
|
isLoading=isLoading
|
|
loadNextPage=(action 'loadNextPage')
|
|
sortByColumn=(action 'sortByColumn')
|
|
delete=(action 'deleteSubscriber')}}
|
|
|
|
<div class="subscribers-sidebar">
|
|
<div class="settings-menu-header">
|
|
<h4>Import Subscribers</h4>
|
|
</div>
|
|
<div class="settings-menu-content subscribers-import-buttons">
|
|
{{#link-to "subscribers.import" class="btn btn-hover-green"}}Import CSV{{/link-to}}
|
|
<a {{action 'exportData'}} class="btn">Export CSV</a>
|
|
</div>
|
|
|
|
<div class="settings-menu-header">
|
|
<h4>Quick Stats</h4>
|
|
</div>
|
|
<div class="settings-menu-content">
|
|
<ul>
|
|
<li>
|
|
Total Subscribers:
|
|
<span id="total-subscribers">{{total}}</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
|
|
{{#if subscriberToDelete}}
|
|
{{gh-fullscreen-modal "delete-subscriber"
|
|
model=subscriberToDelete
|
|
confirm=(action "confirmDeleteSubscriber")
|
|
close=(action "cancelDeleteSubscriber")
|
|
modifier="action wide"}}
|
|
{{/if}}
|
|
|
|
{{outlet}}
|