Collapse navbar and iconify right-side navbar items on small screens
This commit is contained in:
parent
d86debd239
commit
c414dff049
57
app.php
57
app.php
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
@ -92,33 +91,55 @@ if (!is_empty($_GET['page'])) {
|
|||||||
<div class="collapse navbar-collapse" id="navbar-collapse">
|
<div class="collapse navbar-collapse" id="navbar-collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<?php
|
<?php
|
||||||
|
$counter = 0;
|
||||||
|
$more = "";
|
||||||
|
$curpagefound = false;
|
||||||
foreach (PAGES as $id => $pg) {
|
foreach (PAGES as $id => $pg) {
|
||||||
if ($pg['navbar'] === TRUE) {
|
if ($pg['navbar'] === TRUE) {
|
||||||
if ($pageid == $id) {
|
$counter++;
|
||||||
?>
|
if ($counter > ($curpagefound ? 4 : 3) && $pageid != $id) {
|
||||||
<li class="active">
|
$item = '<a href="app.php?page=' . $id . '">';
|
||||||
<?php
|
if (isset($pg['icon'])) {
|
||||||
} else {
|
$item .= '<i class="fa fa-' . $pg['icon'] . ' fa-fw"></i>';
|
||||||
|
}
|
||||||
|
$item .= lang($pg['title'], false) . '</a>';
|
||||||
|
echo '<li class="hidden-sm hidden-md">' . $item . "</li>";
|
||||||
|
$more .= '<li>' . $item . "</li>";
|
||||||
|
} else {
|
||||||
|
if ($pageid == $id) {
|
||||||
|
$curpagefound = true;
|
||||||
?>
|
?>
|
||||||
<li>
|
<li class="active">
|
||||||
<?php } ?>
|
<?php
|
||||||
<a href="app.php?page=<?php echo $id; ?>">
|
} else {
|
||||||
<?php
|
|
||||||
if (isset($pg['icon'])) {
|
|
||||||
?>
|
?>
|
||||||
<i class="fa fa-<?php echo $pg['icon']; ?> fa-fw"></i>
|
<li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php lang($pg['title']) ?>
|
<a href="app.php?page=<?php echo $id; ?>">
|
||||||
</a>
|
<?php
|
||||||
</li>
|
if (isset($pg['icon'])) {
|
||||||
<?php
|
?>
|
||||||
|
<i class="fa fa-<?php echo $pg['icon']; ?> fa-fw"></i>
|
||||||
|
<?php } ?>
|
||||||
|
<?php lang($pg['title']) ?>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($counter > 4) {
|
||||||
?>
|
?>
|
||||||
|
<li class="dropdown hidden-lg hidden-xs">
|
||||||
|
<a href="" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v fa-fw"></i> <?php lang("more"); ?></a>
|
||||||
|
<ul class="dropdown-menu"><?php echo $more; ?></ul>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li><a href="<?php echo PORTAL_URL; ?>"><i class="fa fa-user fa-fw"></i> <?php echo $_SESSION['realname'] ?></a></li>
|
<li><a href="<?php echo PORTAL_URL; ?>"><i class="fa fa-user fa-fw"></i> <span class="hidden-sm hidden-md"><?php echo $_SESSION['realname'] ?></span></a></li>
|
||||||
<li><a href="action.php?action=signout"><i class="fa fa-sign-out fa-fw"></i> <?php lang("sign out") ?></a></li>
|
<li><a href="action.php?action=signout"><i class="fa fa-sign-out fa-fw"></i> <span class="hidden-sm hidden-md"><?php lang("sign out") ?></span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,9 +32,10 @@ define("STRINGS", [
|
|||||||
"captcha error" => "There was a problem with the CAPTCHA (robot test). Try again.",
|
"captcha error" => "There was a problem with the CAPTCHA (robot test). Try again.",
|
||||||
"home" => "Home",
|
"home" => "Home",
|
||||||
"users" => "Users",
|
"users" => "Users",
|
||||||
|
"more" => "More",
|
||||||
"actions" => "Actions",
|
"actions" => "Actions",
|
||||||
"name" => "Name",
|
"name" => "Name",
|
||||||
"email" => "Email",
|
"email" => "Email",
|
||||||
"status" => "Status",
|
"status" => "Status",
|
||||||
"type" => "Type",
|
"type" => "Type",
|
||||||
"new user" => "New User",
|
"new user" => "New User",
|
||||||
@ -110,7 +111,7 @@ define("STRINGS", [
|
|||||||
"uid" => "User ID",
|
"uid" => "User ID",
|
||||||
"manager name" => "Manager",
|
"manager name" => "Manager",
|
||||||
"manager username" => "Mgr. Username",
|
"manager username" => "Mgr. Username",
|
||||||
"employee name" => "Employee",
|
"employee name" => "Employee",
|
||||||
"employee username" => "Emp. Username",
|
"employee username" => "Emp. Username",
|
||||||
"permission id" => "Perm. ID",
|
"permission id" => "Perm. ID",
|
||||||
"permissions assigned" => "Permissions assigned.",
|
"permissions assigned" => "Permissions assigned.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user