summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/view/common/topp.view.php15
-rw-r--r--examples/example.html28
2 files changed, 25 insertions, 18 deletions
diff --git a/app/view/common/topp.view.php b/app/view/common/topp.view.php
index 05e4862..460887d 100644
--- a/app/view/common/topp.view.php
+++ b/app/view/common/topp.view.php
@@ -14,7 +14,20 @@
</div>
<div class="collapse navbar-collapse" id="scrottnav">
- <p class="navbar-text navbar-right"><i>Not Logged In&nbsp;</i></p>
+ <?php if (!$mod->getCurrentUser()) { ?>
+ <p class="navbar-text navbar-right"><i>Not Logged In&nbsp;</i></p>
+ <?php } else { ?>
+ <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->getCurrentUserGlyphicon()?>"></span> <?=$mod->getCurrentUser()->getDisplayName()?> <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="<?=$mod->ar()?>/logout">Log out</a></li>
+ </ul>
+ </li>
+ </ul>
+ <?php } ?>
</div>
</div>
diff --git a/examples/example.html b/examples/example.html
index 7f1ac2a..ca22361 100644
--- a/examples/example.html
+++ b/examples/example.html
@@ -34,23 +34,17 @@
</div>
</form>
- <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="glyphicon glyphicon-exclamation-sign"></span>
- <span class="glyphicon glyphicon-envelope"></span>
- <span class="glyphicon glyphicon-user"></span> Sonic the Hedgehog <span class="caret"></span>
- </a>
- <ul class="dropdown-menu">
- <li><a href="#">Issues assigned to Me <span class="badge">1</span></a></li>
- <li><a href="#">My open Issues</a></li>
- <li role="separator" class="divider"></li>
- <li><a href="#">Private Messages <span class="badge">1</span></a></li>
- <li><a href="#">Settings</a></li>
- <li><a href="#">Log out</a></li>
- </ul>
- </li>
- </ul>
+
+ <!--USER BUTTON-->
+ <span class="glyphicon glyphicon-exclamation-sign"></span>
+ <span class="glyphicon glyphicon-envelope"></span>
+
+ <li><a href="#">Issues assigned to Me <span class="badge">1</span></a></li>
+ <li><a href="#">My open Issues</a></li>
+ <li role="separator" class="divider"></li>
+ <li><a href="#">Private Messages <span class="badge">1</span></a></li>
+ <li><a href="#">Settings</a></li>
+ <!--END-->
</div>
</div>
</nav>