mirror of https://github.com/gophish/gophish
Updated dashboard and nav template to handle user context
parent
6944854005
commit
e993e8c898
|
@ -1,4 +1,4 @@
|
||||||
{{define "content"}} {{template "nav"}}
|
{{define "content"}} {{template "nav" .User}}
|
||||||
<div class="jumbotron">
|
<div class="jumbotron">
|
||||||
<div class="container" style="text-align:center;">
|
<div class="container" style="text-align:center;">
|
||||||
<h1 class="sans header">
|
<h1 class="sans header">
|
||||||
|
|
|
@ -13,9 +13,15 @@
|
||||||
<div class="navbar-collapse collapse">
|
<div class="navbar-collapse collapse">
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li>
|
<li>
|
||||||
<a id="navbar-login" href="/login">
|
{{if .}}
|
||||||
|
<a href="/settings">
|
||||||
|
<button type="button" class="btn btn-primary"><i class="fa fa-user"></i> {{.Username}}</button>
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
|
<a href="/login">
|
||||||
<button type="button" class="btn btn-primary">Login</button>
|
<button type="button" class="btn btn-primary">Login</button>
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue