My Very Own CI-server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

52 lines
1.7 KiB

<header>
<nav>
<div class="brand">
<a href="/dashboard">
<img src="/static/img/logo.svg" />
{{ app_title }}
</a>
</div>
{{ if .user }}
<button class="collapse-button">
<i class="fa fa-bars"></i>
</button>
<ul>
<li class="{{ if eq .navPage "dashboard"}}active{{end}}">
<a href="/dashboard">Dashboard</a>
</li>
<li class="{{ if eq .navPage "repo"}}active{{end}}">
<a href="/repo">Repositories</a>
</li>
<li class="{{ if eq .navPage "integration"}}active{{end}}">
<a href="/integration">Integration</a>
</li>
{{ if .user.Superuser }}
<li class="{{ if eq .navPage "user"}}active{{end}}">
<a href="/user">Users</a>
</li>
<li class="{{ if eq .navPage "admin"}}active{{end}}">
<a href="/admin/info">Admin</a>
</li>
{{ end }}
<li class="{{ if eq .navPage "profile"}}active{{end}}">
<a href="/user/edit/{{ .user.ID }}">{{ .user.Name }}</a>
</li>
<li>
<a href="/logout"><i class="fa fa-sign-out"></i>Logout</a>
</li>
</ul>
{{ else }}
{{ if eq (config "PublicEnable") "true" }}
<ul>
<li class="{{ if eq .navPage "login"}}active{{end}}">
<a href="/login">Login</a>
</li>
<li class="{{ if eq .navPage "repo"}}active{{end}}">
<a href="/public">Public Repositories</a>
</li>
</ul>
{{ end }}
{{ end }}
</nav>
</header>