Add a Premium page link to bounced subscribers listing [MAILPOET-887]
This commit is contained in:
@@ -198,6 +198,17 @@ const ListingItem = React.createClass({
|
||||
const ListingItems = React.createClass({
|
||||
render: function() {
|
||||
if (this.props.items.length === 0) {
|
||||
let message;
|
||||
if (this.props.loading === true) {
|
||||
message = (this.props.messages.onLoadingItems
|
||||
&& this.props.messages.onLoadingItems(this.props.group))
|
||||
|| MailPoet.I18n.t('loadingItems');
|
||||
} else {
|
||||
message = (this.props.messages.onNoItemsFound
|
||||
&& this.props.messages.onNoItemsFound(this.props.group))
|
||||
|| MailPoet.I18n.t('noItemsFound');
|
||||
}
|
||||
|
||||
return (
|
||||
<tbody>
|
||||
<tr className="no-items">
|
||||
@@ -207,11 +218,7 @@ const ListingItems = React.createClass({
|
||||
+ (this.props.is_selectable ? 1 : 0)
|
||||
}
|
||||
className="colspanchange">
|
||||
{
|
||||
(this.props.loading === true)
|
||||
? (this.props.messages.onLoadingItems || MailPoet.I18n.t('loadingItems'))
|
||||
: (this.props.messages.onNoItemsFound || MailPoet.I18n.t('noItemsFound'))
|
||||
}
|
||||
{message}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@@ -81,6 +81,22 @@ const messages = {
|
||||
).replace('%$1d', count.toLocaleString());
|
||||
}
|
||||
MailPoet.Notice.success(message);
|
||||
},
|
||||
onNoItemsFound: (group) => {
|
||||
if (group === 'bounced' && !mailpoet_premium_active) {
|
||||
return (
|
||||
<div>
|
||||
<p>{MailPoet.I18n.t('bouncedSubscribersHelp')}</p>
|
||||
<p>
|
||||
<a href={ `admin.php?page=mailpoet-premium` } className="button-primary">
|
||||
{MailPoet.I18n.t('bouncedSubscribersPremiumButtonText')}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
// use default message
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user