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