1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-11 23:54:06 +02:00

Update admin theme to the php template syntax guidelines

This commit is contained in:
Awilum
2019-01-19 15:55:39 +03:00
parent 79342397da
commit c4c9ccdb24
3 changed files with 17 additions and 15 deletions

View File

@@ -1,8 +1,8 @@
<?php namespace Flextype; ?>
<?php namespace Flextype ?>
</div> <!-- .main-panel -->
</div> <!-- .wrapper -->
<?php Themes::view('admin/views/partials/tail')->display() ?>
<?php Themes::view('admin/views/partials/tail')->display() ?>
</body>
</html>

View File

@@ -16,7 +16,7 @@ use function Flextype\Component\I18n\__;
<meta name="description" content="">
<meta name="author" content="">
<?php Event::dispatch('onAdminThemeMeta'); ?>
<?php Event::dispatch('onAdminThemeMeta') ?>
<title>FLEXTYPE</title>
@@ -26,15 +26,17 @@ use function Flextype\Component\I18n\__;
<?php Assets::add('css', Http::getBaseUrl() . '/site/plugins/admin/assets/dist/css/admin-build.min.css', 'admin', 8); ?>
<?php if (Registry::get('settings.admin_panel.theme') == 'light'): ?>
<?php Assets::add('css', Http::getBaseUrl() . '/site/plugins/admin/assets/dist/css/elegant.css', 'admin', 9); ?>
<?php Assets::add('css', Http::getBaseUrl() . '/site/plugins/admin/assets/dist/css/admin-light.min.css', 'admin', 10); ?>
<?php Assets::add('css', Http::getBaseUrl() . '/site/plugins/admin/assets/dist/css/elegant.css', 'admin', 9) ?>
<?php Assets::add('css', Http::getBaseUrl() . '/site/plugins/admin/assets/dist/css/admin-light.min.css', 'admin', 10) ?>
<?php elseif (Registry::get('settings.admin_panel.theme') == 'dark'): ?>
<?php Assets::add('css', Http::getBaseUrl() . '/site/plugins/admin/assets/dist/css/monokai.css', 'admin', 9); ?>
<?php Assets::add('css', Http::getBaseUrl() . '/site/plugins/admin/assets/dist/css/monokai.css', 'admin', 9) ?>
<?php endif ?>
<?php foreach (Assets::get('css', 'admin') as $assets_by_priorities) { foreach ($assets_by_priorities as $assets) { ?>
<link href="<?php echo $assets['asset']; ?>" rel="stylesheet">
<?php } } ?>
<?php foreach (Assets::get('css', 'admin') as $assets_by_priorities): ?>
<?php foreach ($assets_by_priorities as $assets): ?>
<link href="<?= $assets['asset'] ?>" rel="stylesheet">
<?php endforeach ?>
<?php endforeach ?>
<style media="screen">
.content-full-size .main-panel .navbar-fixed+.content {
@@ -49,9 +51,9 @@ use function Flextype\Component\I18n\__;
padding: 0;
}
</style>
<?php Event::dispatch('onAdminThemeHeader'); ?>
<?php Event::dispatch('onAdminThemeHeader') ?>
</head>
<body <?php if(Http::get('preview') && Http::get('preview') == 'true') { ?> class="content-full-size" <?php } ?>>
<body <?php if(Http::get('preview') && Http::get('preview') == 'true'): ?> class="content-full-size" <?php endif ?>>
<div class="wrapper">
<?php UsersManager::isLoggedIn() and Themes::view('admin/views/partials/sidebar')->display(); ?>
<?php UsersManager::isLoggedIn() and Themes::view('admin/views/partials/sidebar')->display() ?>
<div class="main-panel <?php if (isset($main_panel_class)) { echo $main_panel_class; }?>">

View File

@@ -20,9 +20,9 @@ use Flextype\Component\{Http\Http, Event\Event, Registry\Registry, Assets\Assets
theme: 'flat'
}
<?php if (Notification::get('success')) { ?> Messenger().post({ type: "success", message : "<?php echo Notification::get('success'); ?>", hideAfter: '3' }); <?php } ?>
<?php if (Notification::get('warning')) { ?> Messenger().post({ type: "warning", message : "<?php echo Notification::get('warning'); ?>", hideAfter: '3' }); <?php } ?>
<?php if (Notification::get('error')) { ?> Messenger().post({ type: "error", message : "<?php echo Notification::get('error'); ?>", hideAfter: '3' }); <?php } ?>
<?php if (Notification::get('success')): ?> Messenger().post({ type: "success", message : "<?php echo Notification::get('success'); ?>", hideAfter: '3' }); <?php endif ?>
<?php if (Notification::get('warning')): ?> Messenger().post({ type: "warning", message : "<?php echo Notification::get('warning'); ?>", hideAfter: '3' }); <?php endif ?>
<?php if (Notification::get('error')): ?> Messenger().post({ type: "error", message : "<?php echo Notification::get('error'); ?>", hideAfter: '3' }); <?php endif ?>
if (typeof $.flextype == 'undefined') $.flextype = {};