diff options
author | Malf Furious <m@lfurio.us> | 2016-03-06 15:39:06 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-03-27 20:16:32 -0400 |
commit | 0cc2192ff7582f5f9c2c9a20adcceae3bbc1fa84 (patch) | |
tree | 58fa3cef5733f4d6d4bc0f53473add01ec97449a | |
parent | 3168dceb5434ac8a6f0bd397712019597ea2dd4c (diff) | |
download | scrott-0cc2192ff7582f5f9c2c9a20adcceae3bbc1fa84.tar.gz scrott-0cc2192ff7582f5f9c2c9a20adcceae3bbc1fa84.zip |
Update application navbar
The navbar now has a different view when logged in. I added the 'user button' which shows alert info and has a menu. Currently, the only menu item is 'Log out'.
-rw-r--r-- | app/view/common/topp.view.php | 15 | ||||
-rw-r--r-- | examples/example.html | 28 |
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 </i></p> + <?php if (!$mod->getCurrentUser()) { ?> + <p class="navbar-text navbar-right"><i>Not Logged In </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> |