diff --git a/Plugin.php b/Plugin.php index 4c35dcf..0f6a8cf 100644 --- a/Plugin.php +++ b/Plugin.php @@ -74,12 +74,6 @@ public function initialize() $customizer['login_btn_width'] = $this->configModel->get('login_btn_width', '95'); $customizer['login_note'] = $this->configModel->get('login_note', ''); - //Templates and Assets - if (!file_exists('plugins/ApplicationBranding')) { - $this->template->setTemplateOverride('header/title', 'customizer:header/title'); - $this->template->setTemplateOverride('layout', 'customizer:layout/layout'); - $this->template->setTemplateOverride('auth/index', 'customizer:layout/index'); - } $this->template->hook->attach('template:config:sidebar', 'customizer:config/sidebar'); $this->template->setTemplateOverride('header/user_dropdown', 'customizer:header/user_dropdown'); @@ -122,6 +116,19 @@ public function initialize() } else { $this->template->setTemplateOverride('header/title', 'customizer:header/title_older_kb'); } + + //Templates and Assets + if (!file_exists('plugins/ApplicationBranding')) { + $this->template->setTemplateOverride('header/title', 'customizer:header/title'); + if (strpos(APP_VERSION, 'master') !== false || strpos(APP_VERSION, 'main') !== false && file_exists('ChangeLog')) { $wasmaster = trim(file_get_contents('ChangeLog', false, null, 8, 6), ' '); } + if (version_compare($wasmaster, '1.2.29') >= 0) { + $this->template->setTemplateOverride('layout', 'customizer:layout/layout_1229'); + } else { + $this->template->setTemplateOverride('layout', 'customizer:layout/layout'); + } + + $this->template->setTemplateOverride('auth/index', 'customizer:layout/index'); + } } diff --git a/Template/layout/layout_1229.php b/Template/layout/layout_1229.php new file mode 100644 index 0000000..0b072a6 --- /dev/null +++ b/Template/layout/layout_1229.php @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + asset->colorCss() ?> + asset->css('assets/css/vendor.min.css') ?> + + asset->css('assets/css/'.$this->user->getTheme().'.min.css') ?> + + asset->css('assets/css/light.min.css') ?> + + + asset->css('assets/css/print.min.css', true, 'print') ?> + + asset->customCss() ?> + + + asset->js('assets/js/vendor.min.js') ?> + asset->js('assets/js/app.min.js') ?> + + + hook->asset('css', 'template:layout:css') ?> + hook->asset('js', 'template:layout:js') ?> + task->customizerFileModel->getByType(2)) : ?> + + + + + + + + + + + + + + + + <?php if (isset($page_title)): ?> + <?= $this->text->e($page_title) ?> + <?php elseif (isset($title)): ?> + <?= $this->text->e($title) ?> + <?php else: ?> + Kanboard + <?php endif ?> + + + hook->render('template:layout:head') ?> + + + + + app->flashMessage() ?> + + + hook->render('template:layout:top') ?> + render('header', array( + 'title' => $title, + 'description' => isset($description) ? $description : '', + 'board_selector' => isset($board_selector) ? $board_selector : array(), + 'project' => isset($project) ? $project : array(), + )) ?> +
+ app->flashMessage() ?> + +
+ hook->render('template:layout:bottom') ?> + + +