- Bootstraps export
This commit is contained in:
@ -66,7 +66,8 @@ class RoboFile extends \Robo\Tasks {
|
||||
'assets/css/src/newsletter_editor/newsletter_editor.styl',
|
||||
'assets/css/src/public.styl',
|
||||
'assets/css/src/rtl.styl',
|
||||
'assets/css/src/import.styl'
|
||||
'assets/css/src/import.styl',
|
||||
'assets/css/src/export.styl'
|
||||
);
|
||||
|
||||
$this->_exec(join(' ', array(
|
||||
|
22
assets/js/src/export/export.js
Normal file
22
assets/js/src/export/export.js
Normal file
@ -0,0 +1,22 @@
|
||||
define(
|
||||
[
|
||||
'underscore',
|
||||
'jquery',
|
||||
'mailpoet',
|
||||
'handlebars',
|
||||
'select2'
|
||||
],
|
||||
function (
|
||||
_,
|
||||
jQuery,
|
||||
MailPoet,
|
||||
Handlebars
|
||||
) {
|
||||
if (!jQuery("#mailpoet_subscribers_export").length) {
|
||||
return;
|
||||
}
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
|
||||
});
|
||||
});
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace MailPoet\Config;
|
||||
|
||||
use \MailPoet\Import\BootstrapMenu;
|
||||
use \MailPoet\Models\Segment;
|
||||
use \MailPoet\Models\Setting;
|
||||
use \MailPoet\Models\Form;
|
||||
@ -86,6 +85,14 @@ class Menu {
|
||||
'mailpoet-import',
|
||||
array($this, 'import')
|
||||
);
|
||||
add_submenu_page(
|
||||
'mailpoet',
|
||||
__('Export'),
|
||||
__('Export'),
|
||||
'manage_options',
|
||||
'mailpoet-export',
|
||||
array($this, 'export')
|
||||
);
|
||||
// add_submenu_page(
|
||||
// 'mailpoet',
|
||||
// __('Newsletter editor'),
|
||||
@ -229,11 +236,15 @@ class Menu {
|
||||
}
|
||||
|
||||
function import() {
|
||||
$import = new BootstrapMenu();
|
||||
$import = new \MailPoet\Import\BootstrapMenu();
|
||||
$data = $import->bootstrap();
|
||||
echo $this->renderer->render('import.html', $data);
|
||||
}
|
||||
|
||||
function export() {
|
||||
echo $this->renderer->render('export.html');
|
||||
}
|
||||
|
||||
function formEditor() {
|
||||
$id = (isset($_GET['id']) ? (int)$_GET['id'] : 0);
|
||||
$form = Form::findOne($id);
|
||||
|
11
lib/Export/BootstrapMenu.php
Normal file
11
lib/Export/BootstrapMenu.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace MailPoet\Export;
|
||||
|
||||
class BootstrapMenu {
|
||||
|
||||
function __construct() {
|
||||
}
|
||||
|
||||
function bootstrap() {
|
||||
}
|
||||
}
|
16
lib/Export/Export.php
Normal file
16
lib/Export/Export.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace MailPoet\Export;
|
||||
|
||||
class Export {
|
||||
public function __construct($data) {
|
||||
$this->profilerStart = microtime(true);
|
||||
}
|
||||
|
||||
function process() {
|
||||
}
|
||||
|
||||
function timeExecution() {
|
||||
$profilerEnd = microtime(true);
|
||||
return ($profilerEnd - $this->profilerStart) / 60;
|
||||
}
|
||||
}
|
9
lib/Router/Export.php
Normal file
9
lib/Router/Export.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace MailPoet\Router;
|
||||
|
||||
if(!defined('ABSPATH')) exit;
|
||||
|
||||
class Export {
|
||||
function process($data) {
|
||||
}
|
||||
}
|
15
views/export.html
Normal file
15
views/export.html
Normal file
@ -0,0 +1,15 @@
|
||||
<% extends 'layout.html' %>
|
||||
|
||||
<% block content %>
|
||||
<div id="mailpoet_subscribers_export" class="wrap">
|
||||
<h2 class="title"><%= __('Export') %></h2>
|
||||
</div>
|
||||
|
||||
<%= stylesheet('export.css') %>
|
||||
|
||||
<%= localize({
|
||||
}) %>
|
||||
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<% endblock %>
|
@ -96,6 +96,7 @@ config.push(_.extend({}, baseConfig, {
|
||||
'forms/forms.jsx',
|
||||
'settings/tabs.js',
|
||||
'import/import.js',
|
||||
'export/export.js'
|
||||
'helpscout'
|
||||
],
|
||||
form_editor: [
|
||||
|
Reference in New Issue
Block a user