first commit
This commit is contained in:
160
modules/ps_mbo/views/css/recommended-modules.css
Normal file
160
modules/ps_mbo/views/css/recommended-modules.css
Normal file
@@ -0,0 +1,160 @@
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
#main-div #recommended-modules-container .alert-addons,
|
||||
#main-div #modules_list_container_tab_modal .alert-addons {
|
||||
border-color: #25b9d7;
|
||||
}
|
||||
|
||||
#main-div #recommended-modules-container .alert-addons:before,
|
||||
#main-div #modules_list_container_tab_modal .alert-addons:before {
|
||||
color: #25b9d7;
|
||||
background-color: #dff5f9;
|
||||
content: "\E88F";
|
||||
}
|
||||
|
||||
#main-div #modules_list_container_content .img-thumbnail {
|
||||
max-width: 56px;
|
||||
width: 56px;
|
||||
}
|
||||
|
||||
#content.bootstrap .nav-tabs .nav-item.show .nav-link,
|
||||
#content.bootstrap .nav-tabs .nav-item.active .nav-link {
|
||||
border-top: 3px solid #25b9d7;
|
||||
}
|
||||
|
||||
#content.bootstrap .nav-tabs .nav-item.show .nav-link,
|
||||
#content.bootstrap .nav-tabs .nav-link.active {
|
||||
color: #363a41;
|
||||
background-color: #fff;
|
||||
border-color: #25b9d7;
|
||||
}
|
||||
|
||||
#content.bootstrap .nav-tabs,
|
||||
#content.bootstrap .nav-tabs .nav-link {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#content.bootstrap #modules_list_container_content .img-thumbnail {
|
||||
max-width: 56px;
|
||||
width: 56px;
|
||||
}
|
||||
|
||||
#content.bootstrap #modules_list_container_content .btn {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#content.bootstrap #modules_list_container_content .btn .caret {
|
||||
border-top-color: #25b9d7!important;
|
||||
}
|
||||
|
||||
#content.bootstrap #modules_list_container_content .btn-outline-primary {
|
||||
color: #25b9d7;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
border-color: #25b9d7;
|
||||
}
|
||||
|
||||
#content.bootstrap #modules_list_container_content .btn-outline-primary:hover {
|
||||
color: #fff;
|
||||
background-color: #3ed2f0;
|
||||
border-color: #3ed2f0;
|
||||
}
|
||||
|
||||
#content.bootstrap #modules_list_container_content .btn-block {
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
#content.bootstrap #modules_list_container_content .btn-group {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
#content.bootstrap #modules_list_container_content .dropdown-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
clear: both;
|
||||
font-weight: 400;
|
||||
color: #6c868e;
|
||||
text-align: inherit;
|
||||
white-space: nowrap;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#content.bootstrap #modules_list_container_content .dropdown-item:focus,
|
||||
#content.bootstrap #modules_list_container_content .dropdown-item:hover {
|
||||
color: #25b9d7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#content.bootstrap #modules_list_container_content button.spinner {
|
||||
color:#fff;
|
||||
background-color:#fff;
|
||||
width:40px;
|
||||
width:2.5rem;
|
||||
height:40px;
|
||||
height:2.5rem;
|
||||
border-radius:2.5rem;
|
||||
border-right-color:#25b9d7;
|
||||
border-bottom-color:#25b9d7;
|
||||
border-width:3px;
|
||||
border-width:.1875rem;
|
||||
border-style:solid;
|
||||
font-size:0;
|
||||
outline:none;
|
||||
display:inline-block;
|
||||
border-left-color:#bbcdd2;
|
||||
border-top-color:#bbcdd2;
|
||||
animation:rotating 2s linear infinite;
|
||||
}
|
||||
|
||||
#content.bootstrap #tab_modules_list_installed > tbody > tr > td:nth-child(2),
|
||||
#content.bootstrap #tab_modules_list_not_installed > tbody > tr > td:nth-child(2) {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
#content.bootstrap .card {
|
||||
position: relative;
|
||||
display: block;
|
||||
background-color: #fff;
|
||||
border: 1px solid #dbe6e9;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 0 4px 0 rgba(0,0,0,.06);
|
||||
}
|
||||
|
||||
#content.bootstrap .card-body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
#content.bootstrap .card-body .img-responsive {
|
||||
display: inline;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#content.bootstrap .mt-3 {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#content.bootstrap #modules_list_container .modal-dialog {
|
||||
width: 680px;
|
||||
}
|
||||
}
|
||||
53
modules/ps_mbo/views/img/error.svg
Normal file
53
modules/ps_mbo/views/img/error.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 86 KiB |
28
modules/ps_mbo/views/img/index.php
Normal file
28
modules/ps_mbo/views/img/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
28
modules/ps_mbo/views/index.php
Normal file
28
modules/ps_mbo/views/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
28
modules/ps_mbo/views/js/index.php
Normal file
28
modules/ps_mbo/views/js/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
448
modules/ps_mbo/views/js/recommended-modules.js
Normal file
448
modules/ps_mbo/views/js/recommended-modules.js
Normal file
@@ -0,0 +1,448 @@
|
||||
'use strict';
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
var mbo = {};
|
||||
|
||||
(function() {
|
||||
var pageMapDefault = {
|
||||
toolbarButtonsContainer: '#toolbar-nav',
|
||||
toolbarButtons: '#toolbar-nav > li > a.toolbar_btn',
|
||||
toolbarHelpButton: '#toolbar-nav li:last-of-type > a.btn-help',
|
||||
toolbarLastElement: '#toolbar-nav li:last-of-type',
|
||||
recommendedModulesButton: '#recommended-modules-button',
|
||||
fancybox: '.fancybox-quick-view',
|
||||
contentContainer: '#content',
|
||||
modulesListModal: '#modules_list_container',
|
||||
modulesListModalContent: '#modules_list_container_tab_modal',
|
||||
modulesListLoader: '#modules_list_loader',
|
||||
};
|
||||
|
||||
var pageMapNewTheme = {
|
||||
toolbarButtonsContainer: '.toolbar-icons .wrapper',
|
||||
toolbarHelpButton: '.toolbar-icons a.btn-help',
|
||||
toolbarLastElement: '.toolbar-icons a:last-of-type',
|
||||
recommendedModulesButton: '#recommended-modules-button',
|
||||
oldButton: '#page-header-desc-configuration-modules-list',
|
||||
contentContainer: '#main-div .content-div .container:last',
|
||||
modulesListModal: '#modules_list_container',
|
||||
modulesListModalContainer: '#main-div .content-div',
|
||||
modulesListModalContent: '#modules_list_container_tab_modal',
|
||||
modulesListLoader: '#modules_list_loader',
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles page interactions
|
||||
*
|
||||
* @param {object} pageMap
|
||||
* @constructor
|
||||
*/
|
||||
var Page = function(pageMap) {
|
||||
|
||||
/**
|
||||
* Indicates if the help button is the last one in the toolbar
|
||||
* @return {boolean}
|
||||
*/
|
||||
var lastElementIsHelpButton = function() {
|
||||
return $(pageMap.toolbarHelpButton).length > 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Inserts the button before the help one
|
||||
* @param {RecommendedModulesButton} button
|
||||
*/
|
||||
var insertItBeforeHelpButton = function(button) {
|
||||
$(pageMap.toolbarLastElement).before(button.getMarkup());
|
||||
};
|
||||
|
||||
/**
|
||||
* Inserts the button as the last item in the toolbar
|
||||
* @param {RecommendedModulesButton} button
|
||||
*/
|
||||
var insertItLastInToolbar = function(button) {
|
||||
$(pageMap.toolbarButtonsContainer).append(button.getMarkup());
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove core-generated "recommended module" button in PS < 1.7.6.0
|
||||
* @return this
|
||||
*/
|
||||
this.removeOldButton = function() {
|
||||
if (pageMap.toolbarButtons) {
|
||||
// default theme
|
||||
$(pageMap.toolbarButtons).filter(
|
||||
function() {
|
||||
var buttonIdPattern = /^page-header-desc-[a-z-_]+-modules-list$/;
|
||||
return String($(this).attr('id'))
|
||||
.match(buttonIdPattern);
|
||||
}
|
||||
).parent().remove();
|
||||
}
|
||||
|
||||
if (pageMap.oldButton) {
|
||||
// new theme
|
||||
$(pageMap.oldButton).remove();
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Inserts the provided button in the toolbar
|
||||
*
|
||||
* @param {RecommendedModulesButton} button
|
||||
* @return this
|
||||
*/
|
||||
this.insertToolbarButton = function(button) {
|
||||
if (lastElementIsHelpButton()) {
|
||||
insertItBeforeHelpButton(button);
|
||||
} else {
|
||||
insertItLastInToolbar(button);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Inserts the recommended modules in the DOM
|
||||
*
|
||||
* @param {object} config
|
||||
* @param {array} config.translations
|
||||
* @param {string} config.recommendedModulesUrl
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesAfterContent
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesButton
|
||||
* @param {boolean} config.shouldUseLegacyTheme
|
||||
*
|
||||
* @return this
|
||||
*/
|
||||
this.insertRecommendedModules = function(config) {
|
||||
if (pageMap.contentContainer) {
|
||||
var recommendedModulesRequest = $.ajax({
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
url: config.recommendedModulesUrl,
|
||||
});
|
||||
|
||||
recommendedModulesRequest.done(function(data) {
|
||||
var recommendedModulesContainer = new RecommendedModulesContainer(config, data.content);
|
||||
|
||||
$(pageMap.contentContainer).append(recommendedModulesContainer.getMarkup());
|
||||
});
|
||||
|
||||
recommendedModulesRequest.fail(function(jqXHR, textStatus, errorThrown) {
|
||||
var recommendedModulesAlertMessage = new RecommendedModulesAlertMessage(config, 'danger', errorThrown);
|
||||
var content = recommendedModulesAlertMessage.getMarkup().get(0).outerHTML;
|
||||
if (undefined !== jqXHR.responseJSON && undefined !== jqXHR.responseJSON.content) {
|
||||
content += jqXHR.responseJSON.content;
|
||||
}
|
||||
var recommendedModulesContainer = new RecommendedModulesContainer(config, content);
|
||||
|
||||
$(pageMap.contentContainer).append(recommendedModulesContainer.getMarkup().get(0).outerHTML);
|
||||
});
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles markup for the Recommended modules button
|
||||
*
|
||||
* @param {object} config
|
||||
* @param {array} config.translations
|
||||
* @param {string} config.recommendedModulesUrl
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesAfterContent
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesButton
|
||||
* @param {boolean} config.shouldUseLegacyTheme
|
||||
* @constructor
|
||||
*/
|
||||
var RecommendedModulesButton = function(config) {
|
||||
var label = config.translations['Recommended Modules and Services'];
|
||||
var buttonId = 'recommended-modules-button';
|
||||
var $markup;
|
||||
|
||||
if (config.shouldUseLegacyTheme) {
|
||||
$markup = $(
|
||||
'<li id="recommended-modules-button-container">\n' +
|
||||
' <a id="' + buttonId + '" class="toolbar_btn pointer" href="' + config.recommendedModulesUrl + '" title="' + label + '">\n' +
|
||||
' <i class="process-icon-modules-list"></i>\n' +
|
||||
' <div>' + label + '</div>\n' +
|
||||
' </a>\n' +
|
||||
'</li>'
|
||||
);
|
||||
} else {
|
||||
$markup = $(
|
||||
'<a class="btn btn-outline-secondary" id="' + buttonId + '" href="' + config.recommendedModulesUrl + '" title="' + label + '">\n' +
|
||||
label +
|
||||
'</a>'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the button's markup
|
||||
* @return {jQuery|HTMLElement}
|
||||
*/
|
||||
this.getMarkup = function() {
|
||||
return $markup;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles markup for the Recommended modules container
|
||||
*
|
||||
* @param {object} config
|
||||
* @param {array} config.translations
|
||||
* @param {string} config.recommendedModulesUrl
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesAfterContent
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesButton
|
||||
* @param {boolean} config.shouldUseLegacyTheme
|
||||
* @param {jQuery|HTMLElement} content
|
||||
* @constructor
|
||||
*/
|
||||
var RecommendedModulesContainer = function(config, content) {
|
||||
var containerTitle = config.translations['Recommended Modules and Services'];
|
||||
var containerId = 'recommended-modules-container';
|
||||
var $markup;
|
||||
|
||||
if (config.shouldUseLegacyTheme) {
|
||||
$markup = $(
|
||||
'<div class="panel" id="' + containerId + '">\n' +
|
||||
' <h3>\n' +
|
||||
' <i class="icon-puzzle-piece"></i>\n' +
|
||||
' ' + containerTitle + '\n' +
|
||||
' </h3>\n' +
|
||||
' <div class="modules_list_container_tab row">\n' +
|
||||
' ' + content +'\n' +
|
||||
' </div>\n' +
|
||||
'</div>'
|
||||
);
|
||||
} else {
|
||||
$markup = $(
|
||||
'<div class="row" id="' + containerId + '">\n' +
|
||||
' <div class="col">\n' +
|
||||
' <div class="card">\n' +
|
||||
' <h3 class="card-header">\n' +
|
||||
' <i class="material-icons">extension</i>\n' +
|
||||
' ' + containerTitle + '\n' +
|
||||
' </h3>\n' +
|
||||
' <div class="card-block">\n' +
|
||||
' ' + content +'\n' +
|
||||
' </div>\n' +
|
||||
' </div>\n' +
|
||||
' </div>\n' +
|
||||
'</div>'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the button's markup
|
||||
* @return {jQuery|HTMLElement}
|
||||
*/
|
||||
this.getMarkup = function() {
|
||||
return $markup;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles markup for the Recommended modules container
|
||||
*
|
||||
* @param {object} config
|
||||
* @param {array} config.translations
|
||||
* @param {string} config.recommendedModulesUrl
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesAfterContent
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesButton
|
||||
* @param {boolean} config.shouldUseLegacyTheme
|
||||
* @param {string} type
|
||||
* @param {string} text
|
||||
* @constructor
|
||||
*/
|
||||
var RecommendedModulesAlertMessage = function(config, type, text) {
|
||||
var $markup = $(
|
||||
'<div class="alert alert-' + type + '" role="alert">\n' +
|
||||
' <p class="alert-text">\n' +
|
||||
' ' + text + '\n' +
|
||||
' </p>\n' +
|
||||
'</div>'
|
||||
);
|
||||
|
||||
/**
|
||||
* Returns the button's markup
|
||||
* @return {jQuery|HTMLElement}
|
||||
*/
|
||||
this.getMarkup = function() {
|
||||
return $markup;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles markup for the Recommended modules container
|
||||
*
|
||||
* @param {object} pageMap
|
||||
* @param {object} config
|
||||
* @param {array} config.translations
|
||||
* @param {string} config.recommendedModulesUrl
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesAfterContent
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesButton
|
||||
* @param {boolean} config.shouldUseLegacyTheme
|
||||
* @constructor
|
||||
*/
|
||||
var RecommendedModulesModal = function(pageMap, config) {
|
||||
var $markup;
|
||||
|
||||
if (!config.shouldUseLegacyTheme) {
|
||||
$markup = $(
|
||||
'<div id="modules_list_container" class="modal modal-vcenter fade" role="dialog">\n' +
|
||||
' <div class="modal-dialog">\n' +
|
||||
' <div class="modal-content">\n' +
|
||||
' <div class="modal-header">\n' +
|
||||
' <h4 class="modal-title module-modal-title">\n' +
|
||||
' ' + config.translations['Recommended Modules and Services'] + '\n' +
|
||||
' </h4>\n' +
|
||||
' <button type="button" class="close" data-dismiss="modal" aria-label="' + config.translations['Close'] + '">\n' +
|
||||
' <span aria-hidden="true">×</span>\n' +
|
||||
' </button>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="modal-body row">\n' +
|
||||
' <div id="modules_list_container_tab_modal" class="col-md-12" style="display:none;"></div>\n' +
|
||||
' <div id="modules_list_loader" class="col-md-12 text-center">\n' +
|
||||
' <button class="btn-primary-reverse onclick unbind spinner"></button>\n' +
|
||||
' </div>\n' +
|
||||
' </div>\n' +
|
||||
' </div>\n' +
|
||||
' </div>\n' +
|
||||
'</div>'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the button's markup
|
||||
* @return {jQuery|HTMLElement}
|
||||
*/
|
||||
this.getMarkup = function() {
|
||||
return $markup;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {object} pageMap
|
||||
* @param {object} config
|
||||
* @param {array} config.translations
|
||||
* @param {string} config.recommendedModulesUrl
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesAfterContent
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesButton
|
||||
* @param {boolean} config.shouldUseLegacyTheme
|
||||
* @constructor
|
||||
*/
|
||||
var RecommendedModulesPopinHandler = function(pageMap, config) {
|
||||
|
||||
var initPopin = function() {
|
||||
if (config.shouldUseLegacyTheme) {
|
||||
$(pageMap.fancybox).fancybox({
|
||||
type: 'ajax',
|
||||
autoDimensions: false,
|
||||
autoSize: false,
|
||||
width: 600,
|
||||
height: 'auto',
|
||||
helpers: {
|
||||
overlay: {
|
||||
locked: false
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (!$(pageMap.modulesListModal).length) {
|
||||
var modal = new RecommendedModulesModal(pageMap, config);
|
||||
$(pageMap.modulesListModalContainer).append(modal.getMarkup().get(0).outerHTML);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var openModulesList = function() {
|
||||
var recommendedModulesRequest = $.ajax({
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
url: config.recommendedModulesUrl,
|
||||
});
|
||||
|
||||
$(pageMap.modulesListModal).modal('show');
|
||||
|
||||
recommendedModulesRequest.done(function (data) {
|
||||
$(pageMap.modulesListModalContent).html(data.content).slideDown();
|
||||
$(pageMap.modulesListLoader).hide();
|
||||
});
|
||||
|
||||
recommendedModulesRequest.fail(function(jqXHR, textStatus, errorThrown) {
|
||||
var recommendedModulesAlertMessage = new RecommendedModulesAlertMessage(config, 'danger', errorThrown);
|
||||
var content = recommendedModulesAlertMessage.getMarkup().get(0).outerHTML;
|
||||
if (undefined !== jqXHR.responseJSON && undefined !== jqXHR.responseJSON.content) {
|
||||
content += jqXHR.responseJSON.content;
|
||||
}
|
||||
|
||||
$(pageMap.modulesListModalContent).html(content).slideDown();
|
||||
$(pageMap.modulesListLoader).hide();
|
||||
});
|
||||
};
|
||||
|
||||
var bindButtonEvents = function() {
|
||||
// wait for dom ready
|
||||
$(document).on('click', pageMap.recommendedModulesButton, function(event) {
|
||||
event.preventDefault();
|
||||
openModulesList();
|
||||
});
|
||||
};
|
||||
|
||||
this.initialize = function() {
|
||||
// wait for dom ready
|
||||
$(function() {
|
||||
initPopin();
|
||||
bindButtonEvents();
|
||||
});
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Inserts the recommended modules button in the toolbar
|
||||
*
|
||||
* @param {object} config
|
||||
* @param {array} config.translations
|
||||
* @param {string} config.recommendedModulesUrl
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesAfterContent
|
||||
* @param {boolean} config.shouldAttachRecommendedModulesButton
|
||||
* @param {boolean} config.shouldUseLegacyTheme
|
||||
*/
|
||||
mbo.initialize = function(config) {
|
||||
var pageMap = config.shouldUseLegacyTheme ? pageMapDefault : pageMapNewTheme;
|
||||
var page = new Page(pageMap);
|
||||
|
||||
page.removeOldButton();
|
||||
|
||||
if (config.shouldAttachRecommendedModulesButton) {
|
||||
var button = new RecommendedModulesButton(config);
|
||||
var recommendedModulesPopinHandler = new RecommendedModulesPopinHandler(pageMap, config);
|
||||
page.insertToolbarButton(button);
|
||||
recommendedModulesPopinHandler.initialize();
|
||||
}
|
||||
|
||||
if (config.shouldAttachRecommendedModulesAfterContent) {
|
||||
page.insertRecommendedModules(config);
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
28
modules/ps_mbo/views/templates/admin/controllers/index.php
Normal file
28
modules/ps_mbo/views/templates/admin/controllers/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
@@ -0,0 +1,24 @@
|
||||
{#**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*#}
|
||||
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{{ pageContent|raw }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
@@ -0,0 +1,69 @@
|
||||
{#**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*#}
|
||||
|
||||
{% extends app.request.isxmlhttprequest ? '@Modules/ps_mbo/views/templates/admin/layout-ajax.html.twig' : '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{% if recommendedModulesNotInstalled is not empty or recommendedModulesInstalled is not empty %}
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
{% if recommendedModulesNotInstalled is not empty %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link active" data-toggle="tab" href="#tab_modules_list_not_installed" role="tab">
|
||||
{{ 'Not Installed'|trans({}) }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if recommendedModulesInstalled is not empty %}
|
||||
<li class="nav-item{% if recommendedModulesNotInstalled is empty %} active{% endif %}">
|
||||
<a class="nav-link{% if recommendedModulesNotInstalled is empty %} active{% endif %}" data-toggle="tab" href="#tab_modules_list_installed" role="tab">
|
||||
{{ 'Installed'|trans({}) }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div id="modules_list_container_content" class="tab-content">
|
||||
{% if recommendedModulesNotInstalled is not empty %}
|
||||
<div class="tab-pane active" id="tab_modules_list_not_installed" role="tabpanel">
|
||||
<table class="table">
|
||||
{% for recommendedModuleNotInstalled in recommendedModulesNotInstalled %}
|
||||
{{ include('@PrestaShop/Admin/Module/Includes/tab-module-line.html.twig',{'module': recommendedModuleNotInstalled}) }}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if recommendedModulesInstalled is not empty %}
|
||||
<div class="tab-pane {% if recommendedModulesNotInstalled is empty %}active{% endif %}" id="tab_modules_list_installed" role="tabpanel">
|
||||
<table class="table">
|
||||
{% for recommendedModuleInstalled in recommendedModulesInstalled %}
|
||||
{{ include('@PrestaShop/Admin/Module/Includes/tab-module-line.html.twig',{'module': recommendedModuleInstalled}) }}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="alert alert-addons row-margin-top" role="alert">
|
||||
<p class="alert-text">
|
||||
<a href="https://addons.prestashop.com/?utm_source=back-office&utm_medium=dispatch&utm_campaign=back-office-{{ app.request.locale }}&utm_content=download{% if adminListFromSource is defined %}&utm_term={{ adminListFromSource }}{% endif %}" onclick="return !window.open(this.href);">
|
||||
{{ 'More modules on addons.prestashop.com'|trans({}) }}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,24 @@
|
||||
{#**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*#}
|
||||
|
||||
{% extends app.request.isxmlhttprequest ? '@Modules/ps_mbo/views/templates/admin/layout-ajax.html.twig' : '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{{ pageContent|raw }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
38
modules/ps_mbo/views/templates/admin/error.html.twig
Normal file
38
modules/ps_mbo/views/templates/admin/error.html.twig
Normal file
@@ -0,0 +1,38 @@
|
||||
{#**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*#}
|
||||
|
||||
{% extends app.request.isxmlhttprequest ? '@Modules/ps_mbo/views/templates/admin/layout-ajax.html.twig' : '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body text-center">
|
||||
<img class="img-responsive"
|
||||
src="{{ asset('../modules/ps_mbo/views/img/error.svg') }}"
|
||||
alt="{{ 'It looks like we have trouble connecting to Addons. Please refresh the page or check your firewall configuration.'|trans({}, 'Admin.Notifications.Error') }}"
|
||||
>
|
||||
<p class="mt-3 error-header">
|
||||
{{ 'It looks like we have trouble connecting to Addons. Please refresh the page or check your firewall configuration.'|trans({}, 'Admin.Notifications.Error') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
28
modules/ps_mbo/views/templates/admin/index.php
Normal file
28
modules/ps_mbo/views/templates/admin/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
19
modules/ps_mbo/views/templates/admin/layout-ajax.html.twig
Normal file
19
modules/ps_mbo/views/templates/admin/layout-ajax.html.twig
Normal file
@@ -0,0 +1,19 @@
|
||||
{#**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*#}
|
||||
{% block content %}{% endblock %}
|
||||
28
modules/ps_mbo/views/templates/hook/index.php
Normal file
28
modules/ps_mbo/views/templates/hook/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
33
modules/ps_mbo/views/templates/hook/recommended-modules.tpl
Normal file
33
modules/ps_mbo/views/templates/hook/recommended-modules.tpl
Normal file
@@ -0,0 +1,33 @@
|
||||
{**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script>
|
||||
if (undefined !== mbo) {
|
||||
mbo.initialize({
|
||||
translations: {
|
||||
'Recommended Modules and Services': '{$recommendedModulesTitleTranslated|escape:'javascript'}',
|
||||
'Close': '{$recommendedModulesCloseTranslated|escape:'javascript'}',
|
||||
},
|
||||
recommendedModulesUrl: '{$recommendedModulesUrl|escape:'javascript'}',
|
||||
shouldAttachRecommendedModulesAfterContent: {$shouldAttachRecommendedModulesAfterContent|intval},
|
||||
shouldAttachRecommendedModulesButton: {$shouldAttachRecommendedModulesButton|intval},
|
||||
shouldUseLegacyTheme: {$shouldUseLegacyTheme|intval},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
28
modules/ps_mbo/views/templates/index.php
Normal file
28
modules/ps_mbo/views/templates/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
Reference in New Issue
Block a user