2.15.0 Support

This commit is contained in:
Nick Thompson 2018-12-24 02:31:44 -07:00
parent 3b4552fe5c
commit e4452899df
17 changed files with 25328 additions and 5 deletions

BIN
.DS_Store vendored

Binary file not shown.

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.DS_Store

View file

@ -17,7 +17,7 @@ Mautic Whitelabeler makes customizing the core branding elements of Mautic a sup

## Requirements

* Mautic versions 2.5.0 - 2.14.2
* Mautic versions 2.5.0 - 2.15.0
* `allow_url_fopen` php.ini directive set to true (uses file_get_contents)
* Apache `mod_rewrite` enabled
* GD Library

View file

@ -5,8 +5,8 @@
require_once('whitelabeler.php');
$whitelabeler = new Whitelabeler;

$v1_path = '../2.14.1';
$v2_path = '../2.14.2';
$v1_path = '../2.14.2';
$v2_path = '../2.15.0';

$compare = $whitelabeler->compareMauticVersions($v1_path, $v2_path);


BIN
templates/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -31,7 +31,7 @@
<div class="panel" name="form-login">
<div class="panel-body">
<div class="mautic-logo img-circle mb-md text-center" style="width:{{login_logo_width}}px;">
<img src="{{login_logo}}" style="width:{{login_logo_width}}px; margin:{{login_logo_margin_top}}px 0 {{login_logo_margin_bottom}}px 0;" />
<img src="{{login_logo}}" style="width:{{login_logo_width}}px; margin:{{login_logo_margin_top}}px 0 {{login_logo_margin_bottom}}px 0;" />
</div>
<div id="main-panel-flash-msgs">
<?php echo $view->render('MauticCoreBundle:Notification:flashes.html.php'); ?>

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,86 @@
<?php

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
?>
<!DOCTYPE html>
<html>
<?php echo $view->render('MauticCoreBundle:Default:head.html.php'); ?>
<body class="header-fixed">
<!-- start: app-wrapper -->
<section id="app-wrapper">
<?php $view['assets']->outputScripts('bodyOpen'); ?>

<!-- start: app-sidebar(left) -->
<aside class="app-sidebar sidebar-left">
<?php echo $view->render('MauticCoreBundle:LeftPanel:index.html.php'); ?>
</aside>
<!--/ end: app-sidebar(left) -->

<!-- start: app-sidebar(right) -->
<aside class="app-sidebar sidebar-right">
<?php echo $view->render('MauticCoreBundle:RightPanel:index.html.php'); ?>
</aside>
<!--/ end: app-sidebar(right) -->

<!-- start: app-header -->
<header id="app-header" class="navbar">
<?php echo $view->render('MauticCoreBundle:Default:navbar.html.php'); ?>

<?php echo $view->render('MauticCoreBundle:Notification:flashes.html.php'); ?>
</header>
<!--/ end: app-header -->

<!-- start: app-footer(need to put on top of #app-content)-->
<footer id="app-footer">
<div class="container-fluid">
<div class="row">
<div class="col-xs-6 text-muted">&copy; <?php echo date('Y');?> {{company_name}}</div>
<div class="col-xs-6 text-muted text-right small">v<?php
/** @var \Mautic\CoreBundle\Templating\Helper\VersionHelper $version */
$version = $view['version'];
echo $version->getVersion(); ?>
</div>
</div>
</div>
</footer>
<!--/ end: app-footer -->

<!-- start: app-content -->
<section id="app-content">
<?php $view['slots']->output('_content'); ?>
</section>
<!--/ end: app-content -->

</section>
<!--/ end: app-wrapper -->

<script>
Mautic.onPageLoad('body');
<?php if ($app->getEnvironment() === 'dev'): ?>
mQuery( document ).ajaxComplete(function(event, XMLHttpRequest, ajaxOption){
if(XMLHttpRequest.responseJSON && typeof XMLHttpRequest.responseJSON.ignore_wdt == 'undefined' && XMLHttpRequest.getResponseHeader('x-debug-token')) {
if (mQuery('[class*="sf-tool"]').length) {
mQuery('[class*="sf-tool"]').remove();
}

mQuery.get(mauticBaseUrl + '_wdt/'+XMLHttpRequest.getResponseHeader('x-debug-token'),function(data){
mQuery('body').append('<div class="sf-toolbar-reload">'+data+'</div>');
});
}
});
<?php endif; ?>
</script>
<?php $view['assets']->outputScripts('bodyClose'); ?>
<?php echo $view->render('MauticCoreBundle:Helper:modal.html.php', [
'id' => 'MauticSharedModal',
'footerButtons' => true,
]); ?>
</body>
</html>

View file

@ -0,0 +1,28 @@
<?php

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
?>
<head>
<meta charset="UTF-8" />
<title><?php if (!empty($view['slots']->get('headerTitle', ''))): ?>
<?php echo strip_tags(str_replace('<', ' <', $view['slots']->get('headerTitle', ''))); ?> |
<?php endif; ?>
<?php echo $view['slots']->get('pageTitle', '{{company_name}}'); ?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/x-icon" href="<?php echo $view['assets']->getUrl('media/images/favicon.ico') ?>" />
<link rel="icon" sizes="192x192" href="<?php echo $view['assets']->getUrl('media/images/favicon.ico') ?>">
<link rel="apple-touch-icon" href="<?php echo $view['assets']->getUrl('media/images/apple-touch-icon.png') ?>" />

<?php echo $view['assets']->outputSystemStylesheets(); ?>

<?php echo $view->render('MauticCoreBundle:Default:script.html.php'); ?>
<?php $view['assets']->outputHeadDeclarations(); ?>
</head>

View file

@ -0,0 +1,53 @@
<?php

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
$extraMenu = $view['menu']->render('extra');
?>
<!-- start: sidebar-header -->
<div class="sidebar-header">
<!-- brand -->
<a class="mautic-brand<?php echo (!empty($extraMenu)) ? ' pull-left pl-0 pr-0' : ''; ?>" href="#" style="text-align:center; padding:0;">
<img src="{{sidebar_image}}" style="width:{{sidebar_width}}px; margin:{{margin_top}}px {{margin_right}}px 0 {{margin_left}}px;" />
</a>
<?php if (!empty($extraMenu)): ?>
<div class="dropdown extra-menu">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<i class="fa fa-chevron-down fa-lg"></i>
</a>
<?php echo $extraMenu; ?>
</div>
<?php endif; ?>
<!--/ brand -->
</div>
<!--/ end: sidebar-header -->

<!-- start: sidebar-content -->
<div class="sidebar-content">
<!-- scroll-content -->
<div class="scroll-content slimscroll">
<!-- start: navigation -->
<nav class="nav-sidebar">
<?php echo $view['content']->getCustomContent('menu.above', $mauticTemplateVars); ?>
<?php echo $view['menu']->render('main'); ?>

<!-- start: left nav -->
<ul class="nav sidebar-left-dark">
<li class="hidden-xs">
<a href="javascript:void(0)" data-toggle="minimize" class="sidebar-minimizer"><span class="direction icon pull-left fa"></span><span class="nav-item-name pull-left text"><?php echo $view['translator']->trans('mautic.core.menu.left.collapse'); ?></span></a>
</li>
</ul>
<!--/ end: left nav -->

</nav>
<!--/ end: navigation -->
</div>
<!--/ scroll-content -->
</div>
<!--/ end: sidebar-content -->

View file

@ -0,0 +1,55 @@
<?php

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
?>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title><?php echo $view['slots']->get('pageTitle', '{{company_name}}'); ?></title>
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/x-icon" href="<?php echo $view['assets']->getUrl('media/images/favicon.ico') ?>" />
<link rel="apple-touch-icon" href="<?php echo $view['assets']->getUrl('media/images/apple-touch-icon.png') ?>" />
<?php $view['assets']->outputSystemStylesheets(); ?>
<?php echo $view->render('MauticCoreBundle:Default:script.html.php'); ?>
<?php $view['assets']->outputHeadDeclarations(); ?>
</head>
<body>
<section id="main" role="main">
<div class="container" style="margin-top:100px;">
<div class="row">
<div class="col-lg-4 col-lg-offset-4">
<div class="panel" name="form-login">
<div class="panel-body">

<div class="mautic-logo img-circle mb-md text-center" style="width:{{login_logo_width}}px;">
<img src="{{login_logo}}" style="width:{{login_logo_width}}px; margin:{{login_logo_margin_top}}px 0 {{login_logo_margin_bottom}}px 0;" />
</div>

<div id="main-panel-flash-msgs">
<?php echo $view->render('MauticCoreBundle:Notification:flashes.html.php'); ?>
</div>
<?php $view['slots']->output('_content'); ?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-lg-offset-4 text-center text-muted">
&copy; <?php echo date('Y');?> {{company_name}}
</div>
</div>
</div>
</section>
<?php echo $view['security']->getAuthenticationContent(); ?>
</body>
</html>

View file

@ -77,7 +77,8 @@ class Whitelabeler {
'2.13.1',
'2.14.0',
'2.14.1',
'2.14.2'
'2.14.2',
'2.15.0'
);

if ( in_array($version, $content_versions) ) {