add video links

This commit is contained in:
qfrery
2018-06-04 18:12:48 +01:00
parent e4b15fb9b9
commit c88c8a9c96
8 changed files with 74 additions and 3 deletions

View File

@ -30,7 +30,7 @@ $box-description-font-size = $box-description-line-height
margin: 0 0 $box-margin-big
padding: 0
width: 30.5%
@media screen and (max-width 1178px)
width: 47%
@ -151,7 +151,6 @@ $box-description-font-size = $box-description-line-height
width: 258px
max-height: $box-description-height
padding-bottom: 0
overflow: hidden
word-wrap: break-word
overflow-wrap: break-word

View File

@ -2,6 +2,7 @@ $excellent-badge-color = #2993ab
$good-badge-color = #f0b849
$bad-badge-color = #d54e21
$green-badge-color = #55bd56
$cta-badge-color = #46b450
#newsletters_container
h2.nav-tab-wrapper
@ -51,3 +52,20 @@ $green-badge-color = #55bd56
&_green
background: $green-badge-color
&_cta
background: $cta-badge-color
line-height: 5em
padding: 7px 6px 7px 6px
text-decoration: none
&:hover, &:active, &:focus
color: #FFFFFF
background: $green-badge-color
&_grey
background: #c3c3c3
.dashicons
font-size: 14px;
line-height: 3.4em;

View File

@ -90,6 +90,7 @@ const NewsletterTypes = React.createClass({
slug: 'welcome',
title: MailPoet.I18n.t('welcomeNewsletterTypeTitle'),
description: MailPoet.I18n.t('welcomeNewsletterTypeDescription'),
videoGuide: 'https://beta.docs.mailpoet.com/article/254-video-guide-to-welcome-emails',
action: (function action() {
return (
<div>
@ -104,6 +105,7 @@ const NewsletterTypes = React.createClass({
slug: 'notification',
title: MailPoet.I18n.t('postNotificationNewsletterTypeTitle'),
description: MailPoet.I18n.t('postNotificationNewsletterTypeDescription'),
videoGuide: 'https://beta.docs.mailpoet.com/article/210-video-guide-to-post-notifications',
action: (function action() {
return (
<a
@ -121,6 +123,7 @@ const NewsletterTypes = React.createClass({
];
const types = Hooks.applyFilters('mailpoet_newsletters_types', [...defaultTypes, ...this.getAutomaticEmails()], this);
const isNewUser = window.mailpoet_is_new_user;
return (
<div>
@ -138,6 +141,12 @@ const NewsletterTypes = React.createClass({
<div className="mailpoet_description">
<h3>{type.title}</h3>
<p>{type.description}</p>
{ type.videoGuide && (
<a className={isNewUser ? 'mailpoet_badge mailpoet_badge_cta' : 'mailpoet_badge mailpoet_badge_cta mailpoet_badge_cta_grey'} href={type.videoGuide} target="_blank">
<span className="dashicons dashicons-format-video"></span>{MailPoet.I18n.t('seeVideoGuide')}
</a>
)
}
</div>
<div className="mailpoet_actions">

View File

@ -438,6 +438,13 @@ class Menu {
)
);
$data['is_new_user'] = true;
if(!empty($data['settings']['installed_at'])) {
$installed_at = Carbon::createFromTimestamp(strtotime($data['settings']['installed_at']));
$current_time = Carbon::createFromTimestamp(WPFunctions::currentTime('timestamp'));
$data['is_new_user'] = $current_time->diffInDays($installed_at) <= 30;
}
$data = array_merge($data, Installer::getPremiumStatus());
$this->displayPage('settings.html', $data);
@ -541,6 +548,14 @@ class Menu {
$data['items_per_page'] = $this->getLimitPerPage('forms');
$data['segments'] = Segment::findArray();
$data['is_new_user'] = true;
$installed_at = Setting::getValue('installed_at');
if(!is_null($installed_at)) {
$installed_at = Carbon::createFromTimestamp(strtotime($installed_at));
$current_time = Carbon::createFromTimestamp(WPFunctions::currentTime('timestamp'));
$data['is_new_user'] = $current_time->diffInDays($installed_at) <= 30;
}
$this->displayPage('forms.html', $data);
}
@ -579,6 +594,13 @@ class Menu {
$data['automatic_emails'] = array();
$data['is_new_user'] = 'true';
if(!empty($data['settings']['installed_at'])) {
$installed_at = Carbon::createFromTimestamp(strtotime($data['settings']['installed_at']));
$current_time = Carbon::createFromTimestamp(WPFunctions::currentTime('timestamp'));
$data['is_new_user'] = $current_time->diffInDays($installed_at) <= 30 ? 'true' : 'false';
}
wp_enqueue_script('jquery-ui');
wp_enqueue_script('jquery-ui-datepicker');
@ -609,6 +631,15 @@ class Menu {
'month_names' => Block\Date::getMonthNames(),
'sub_menu' => 'mailpoet-subscribers'
));
$data['is_new_user'] = true;
$installed_at = Setting::getValue('installed_at');
if(!is_null($installed_at)) {
$installed_at = Carbon::createFromTimestamp(strtotime($installed_at));
$current_time = Carbon::createFromTimestamp(WPFunctions::currentTime('timestamp'));
$data['is_new_user'] = $current_time->diffInDays($installed_at) <= 30;
}
$this->displayPage('subscribers/importExport/import.html', $data);
}

View File

@ -12,6 +12,10 @@
</p>
</div>
<a class="mailpoet_badge mailpoet_badge_cta <% if(is_new_user == false) %>mailpoet_badge_cta_grey<% endif %>" href="https://beta.docs.mailpoet.com/article/236-video-guide-setting-up-forms" target="_blank">
<span class="dashicons dashicons-format-video"></span><%= __('See video guide') %>
</a>
<script type="text/javascript">
var mailpoet_listing_per_page = <%= items_per_page %>;
var mailpoet_segments = <%= json_encode(segments) %>;

View File

@ -17,6 +17,7 @@
var mailpoet_tracking_enabled = <%= json_encode(tracking_enabled) %>;
var mailpoet_premium_active = <%= json_encode(premium_plugin_active) %>;
var mailpoet_automatic_emails = <%= json_encode(automatic_emails) %>;
var mailpoet_is_new_user = <%= is_new_user %>;
</script>
<% endblock %>
@ -122,6 +123,7 @@
'draftNewsletterTitle': __('Subject'),
'pickCampaignType': __('Select type of email'),
'seeVideoGuide': __('See video guide'),
'regularNewsletterTypeTitle': __('Newsletter'),
'regularNewsletterTypeDescription': __('Send a newsletter with images, buttons, dividers, and social bookmarks. Or, just send a basic text email.'),
'create': __('Create'),

View File

@ -145,7 +145,11 @@
</ul>
<p class="mailpoet_sending_methods_help help">
<%= __("Need help to pick? [link]Check out the comparison table of sending methods[/link].")
<%= __("Need help to pick?") %>
<a class="mailpoet_badge mailpoet_badge_cta <% if(is_new_user == false) %>mailpoet_badge_cta_grey<% endif %>" href="https://beta.docs.mailpoet.com/article/235-video-guide-sending-options" target="_blank">
<span class="dashicons dashicons-format-video"></span><%= __('See video guide') %>
</a>
<%= __("[link]or check out the comparison table of sending methods[/link].")
|replaceLinkTags('http://beta.docs.mailpoet.com/article/181-comparison-table-of-sending-methods', {'target' : '_blank'})
|raw
%>

View File

@ -22,6 +22,10 @@
</tbody>
</table>
<a class="mailpoet_badge mailpoet_badge_cta <% if(is_new_user == false) %>mailpoet_badge_cta_grey<% endif %>" href="https://beta.docs.mailpoet.com/article/242-video-guide-importing-subscribers-using-a-csv-file" target="_blank">
<span class="dashicons dashicons-format-video"></span><%= __('See video guide') %>
</a>
<!-- Paste -->
<div id="method_paste" class="mailpoet_hidden">
<table class="mailpoet_subscribers form-table">