summaryrefslogtreecommitdiff
path: root/src/application/views/nav_logged_in.php
blob: 8dbb3256655cb0970fc06b14d57141d780d2560d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<?php
use mystic\forum\orm\User;
?>
<ul class="nav navbar-nav navbar-right">
<li><p class="navbar-text"><?= __("Welcome, %user%!", [
    "user" => ($user->id === User::SUPERUSER_ID) ? ('<strong class="text-danger">' . htmlentities($user->displayName) . '</strong>') : ('<strong>' . htmlentities($user->displayName) . '</strong>')
]) ?>
</p></li>
<li<?= $GLOBALS["action"] === "search" ? ' class="active"' : '' ?>><a href="?_action=search"><span class="fa fa-search" aria-hidden="true"></span><span class="sr-only"><?= __("Search") ?></span></a></li>
<li<?= ($isViewingOwnProfile ?? false) ? ' class="active"' : '' ?>><a href="?_action=viewuser&amp;user=<?= htmlentities(urlencode($user->id)) ?>"><span class="fa fa-user" aria-hidden="true"></span><span class="sr-only">View profile</span></a></li>
<li><a href="?_action=logout&amp;next=<?= htmlentities(urlencode($_SERVER["REQUEST_URI"])) ?>"><span class="fa fa-sign-out" aria-hidden="true"></span><span class="sr-only">Log out</span></a></li>
</ul>