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="container" style="text-align:center;">
|
||||
<h1 class="sans header">
|
||||
|
|
|
@ -13,9 +13,15 @@
|
|||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<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>
|
||||
</a>
|
||||
{{end}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue