Change template category tabs [MAILPOET-1557]
This commit is contained in:
@@ -24,17 +24,20 @@ const templatesCategories = [
|
||||
name: 'notification',
|
||||
label: MailPoet.I18n.t('tabNotificationTitle'),
|
||||
},
|
||||
{
|
||||
];
|
||||
|
||||
if (window.mailpoet_woocommerce_active) {
|
||||
templatesCategories.push({
|
||||
name: 'woocommerce',
|
||||
label: MailPoet.I18n.t('tabWoocommerceTitle'),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
templatesCategories.push(
|
||||
...[
|
||||
{
|
||||
name: 'sample',
|
||||
label: MailPoet.I18n.t('sample'),
|
||||
},
|
||||
{
|
||||
name: 'blank',
|
||||
label: MailPoet.I18n.t('blank'),
|
||||
name: 'all',
|
||||
label: MailPoet.I18n.t('allTemplates'),
|
||||
},
|
||||
{
|
||||
name: 'recent',
|
||||
@@ -44,7 +47,8 @@ const templatesCategories = [
|
||||
name: 'saved',
|
||||
label: MailPoet.I18n.t('savedTemplates'),
|
||||
},
|
||||
];
|
||||
]
|
||||
);
|
||||
|
||||
class NewsletterTemplates extends React.Component {
|
||||
constructor(props) {
|
||||
|
@@ -580,6 +580,7 @@ class Menu {
|
||||
|
||||
$data['tracking_enabled'] = Setting::getValue('tracking.enabled');
|
||||
$data['premium_plugin_active'] = License::getLicense();
|
||||
$data['is_woocommerce_active'] = class_exists('WooCommerce');
|
||||
|
||||
$data['automatic_emails'] = array(
|
||||
array(
|
||||
|
@@ -22,6 +22,7 @@
|
||||
var mailpoet_date_storage_format = "Y-m-d";
|
||||
var mailpoet_tracking_enabled = <%= json_encode(tracking_enabled) %>;
|
||||
var mailpoet_premium_active = <%= json_encode(premium_plugin_active) %>;
|
||||
var mailpoet_woocommerce_active = <%= json_encode(is_woocommerce_active) %>;
|
||||
var mailpoet_automatic_emails = <%= json_encode(automatic_emails) %>;
|
||||
var mailpoet_in_app_announcements = mailpoet_settings.in_app_announcements;
|
||||
var mailpoet_free_welcome_emails_image = '<%= image_url('in_app_announcements/hello-illustration-for-welcome-emails.png') %>';
|
||||
@@ -290,8 +291,7 @@
|
||||
'savedTemplates': __('Your saved templates'),
|
||||
'templatePreview': __('Template preview'),
|
||||
'zoom': __('Preview'),
|
||||
'blank': _x('Blank', 'Blank newsletters templates category'),
|
||||
'sample': _x('Sample', 'Sample newsletters templates category'),
|
||||
'allTemplates': _x('All', 'Name of a section with all email templates'),
|
||||
'tabImportTitle': _x('Import', 'Importing template tab title'),
|
||||
'noTemplates': __('This category does not contain any template yet!'),
|
||||
|
||||
|
Reference in New Issue
Block a user