+ );
+};
+
+Tabs.propTypes = { tab: React.PropTypes.string };
+Tabs.defaultProps = { tab: "knowledgeBase" };
+
+module.exports = Tabs;
diff --git a/lib/Config/Menu.php b/lib/Config/Menu.php
index 9f795b3e47..2abb4bb8b9 100644
--- a/lib/Config/Menu.php
+++ b/lib/Config/Menu.php
@@ -4,6 +4,7 @@ namespace MailPoet\Config;
use MailPoet\Cron\CronTrigger;
use MailPoet\Form\Block;
use MailPoet\Form\Renderer as FormRenderer;
+use MailPoet\Helpscout\Beacon;
use MailPoet\Listing;
use MailPoet\Models\CustomField;
use MailPoet\Models\Form;
@@ -167,6 +168,18 @@ class Menu {
)
);
+ add_submenu_page(
+ $main_page_slug,
+ $this->setPageTitle(__('Help', 'mailpoet')),
+ __('Help', 'mailpoet'),
+ Env::$required_permission,
+ 'mailpoet-help',
+ array(
+ $this,
+ 'help'
+ )
+ );
+
// Only show this page in menu if the Premium plugin is not activated
add_submenu_page(
License::getLicense() ? true : $main_page_slug,
@@ -377,6 +390,10 @@ class Menu {
$this->displayPage('settings.html', $data);
}
+ function help() {
+ $this->displayPage('help.html', array('data' => Beacon::getData()));
+ }
+
private function _getFlags() {
// flags (available features on WP install)
$flags = array();
diff --git a/views/help.html b/views/help.html
new file mode 100644
index 0000000000..b51a4f8ca6
--- /dev/null
+++ b/views/help.html
@@ -0,0 +1,28 @@
+<% extends 'layout.html' %>
+
+<% block content %>
+
+
<%= __('Help') %>
+
+
+
+
+
+
+
+
+
+<% endblock %>
+<% block translations %>
+<%= localize({
+ 'tabKnowledgeBaseTitle': __('Knowledge Base'),
+ 'tabSystemInfoTitle': __('System Info'),
+ 'knowledgeBaseIntro': __('Click on one of these categories below to find more information:'),
+ 'knowledgeBaseButton': __('Visit our Knowledge Base for more articles'),
+ 'systemInfoIntro': __('The information below is useful when you need to get in touch with our support. Just copy all the text below and paste it into a message to us.'),
+ 'systemInfoDataError': __('Sorry, there was an error, please try again later.'),
+}) %>
+<% endblock %>
+
diff --git a/webpack.config.js b/webpack.config.js
index c92fc9cda4..54a14408a8 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -168,6 +168,7 @@ var adminConfig = {
'segments/segments.jsx',
'forms/forms.jsx',
'settings/tabs.js',
+ 'help/help.jsx',
'settings/reinstall_from_scratch.js',
'subscribers/importExport/import.js',
'subscribers/importExport/export.js',