summaryrefslogtreecommitdiffstats
path: root/examples/app/view/common/topp.view.php
diff options
context:
space:
mode:
Diffstat (limited to 'examples/app/view/common/topp.view.php')
-rw-r--r--examples/app/view/common/topp.view.php83
1 files changed, 83 insertions, 0 deletions
diff --git a/examples/app/view/common/topp.view.php b/examples/app/view/common/topp.view.php
new file mode 100644
index 0000000..d9e0df0
--- /dev/null
+++ b/examples/app/view/common/topp.view.php
@@ -0,0 +1,83 @@
+<?php
+
+/*
+ * SCROTT Copyright (C) 2016 Malf Furious
+ *
+ * Scrott is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * Scrott is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ * License for more details.
+ */
+
+?>
+
+<?php include "view/master/topp.view.php"; ?>
+
+<?php if ($mod->getCurrentUser()) { ?>
+ <?php include "view/common/setting.modal.view.php"; ?>
+ <?php include "view/common/newgroup.modal.view.php"; ?>
+<?php } ?>
+
+<nav class="navbar navbar-inverse navbar-fixed-top">
+ <div class="container-fluid">
+
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#scrottnav" aria-expanded="false">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+
+ <a href="<?=$mod->ar()?>/" class="navbar-brand"><span class="glyphicon glyphicon-pencil"></span> Scrott</a>
+ </div>
+
+ <div class="collapse navbar-collapse" id="scrottnav">
+ <?php if (!$mod->getCurrentUser()) { ?>
+ <p class="navbar-text navbar-right"><i>Not Logged In&nbsp;</i></p>
+ <?php } else { ?>
+ <ul class="nav navbar-nav">
+ <li><a href="<?=$mod->ap()?>"><span class="glyphicon glyphicon-refresh"></span></a></li>
+
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
+ <?=(isset($mod->obj) ? $mod->obj->name : "<i>Dashboard</i>")?> <span class="caret"></span>
+ </a>
+
+ <ul class="dropdown-menu">
+ <?php foreach ($mod->getCurrentUser()->getGroups() as $group) { ?>
+ <li><a href="<?=$mod->ar()?>/<?=$group->guid?>"><?=$group->name?></a></li>
+ <?php } ?>
+ </ul>
+ </li>
+
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
+ <span class="glyphicon glyphicon-plus"></span> <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="#" data-toggle="modal" data-target="#newgroupModal">New Group</a></li>
+ </ul>
+ </li>
+ </ul>
+
+ <ul class="nav navbar-nav navbar-right">
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
+ <span class="<?=$mod->getCurrentUser()->getGlyphicon()?>"></span> <?=$mod->getCurrentUser()->getDisplayName()?> <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="#" data-toggle="modal" data-target="#settingModal">Settings</a></li>
+ <li><a href="<?=$mod->ar()?>/logout">Log out</a></li>
+ </ul>
+ </li>
+ </ul>
+ <?php } ?>
+ </div>
+
+ </div>
+</nav>