Omit sidebar for non-logged in users
parent
64d19f61f2
commit
d2a9280d7d
|
@ -12,13 +12,17 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="static/js/sidebar.js"></script>
|
<?php if (isset($currentUser) && $page !== 'logout') { ?>
|
||||||
|
<script src="static/js/sidebar.js"></script>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// dismissible messages
|
// dismissible messages
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<link rel="stylesheet" type="text/css" href="<?= htmlspecialchars($app_root) ?>static/css/main.css">
|
<link rel="stylesheet" type="text/css" href="<?= htmlspecialchars($app_root) ?>static/css/main.css">
|
||||||
<link rel="stylesheet" type="text/css" href="<?= htmlspecialchars($app_root) ?>static/css/messages.css">
|
<link rel="stylesheet" type="text/css" href="<?= htmlspecialchars($app_root) ?>static/css/messages.css">
|
||||||
<script src="<?= htmlspecialchars($app_root) ?>static/js/messages.js"></script>
|
<script src="<?= htmlspecialchars($app_root) ?>static/js/messages.js"></script>
|
||||||
|
<?php if (isset($currentUser)) { ?>
|
||||||
<script>
|
<script>
|
||||||
// restore sidebar state before the page is rendered
|
// restore sidebar state before the page is rendered
|
||||||
(function () {
|
(function () {
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
<?php } ?>
|
||||||
<?php if ($page === 'logs') { ?>
|
<?php if ($page === 'logs') { ?>
|
||||||
<link rel="stylesheet" type="text/css" href="<?= htmlspecialchars($app_root) ?>static/css/logs.css">
|
<link rel="stylesheet" type="text/css" href="<?= htmlspecialchars($app_root) ?>static/css/logs.css">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -180,6 +180,7 @@ if ($page == 'logout') {
|
||||||
include '../app/templates/page-header.php';
|
include '../app/templates/page-header.php';
|
||||||
include '../app/templates/page-menu.php';
|
include '../app/templates/page-menu.php';
|
||||||
include '../app/pages/login.php';
|
include '../app/pages/login.php';
|
||||||
|
include '../app/templates/page-footer.php';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -223,9 +224,8 @@ if ($page == 'logout') {
|
||||||
// the page is not in allowed urls, loading "not found" page
|
// the page is not in allowed urls, loading "not found" page
|
||||||
include '../app/templates/error-notfound.php';
|
include '../app/templates/error-notfound.php';
|
||||||
}
|
}
|
||||||
|
include '../app/templates/page-footer.php';
|
||||||
}
|
}
|
||||||
// end with the footer
|
|
||||||
include '../app/templates/page-footer.php';
|
|
||||||
|
|
||||||
// flush the output buffer and show the page
|
// flush the output buffer and show the page
|
||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
|
|
Loading…
Reference in New Issue