22 lignes
1,1 Kio
HTML
22 lignes
1,1 Kio
HTML
{{define "badge_user"}}
|
|
{{with .User}}
|
|
<ul class="nav navbar-nav navbar-right badgemenu">
|
|
<li class="dropdown">
|
|
{{if gt .Id 0}}
|
|
<a href="{{ genRoute "user_profile" "id" (print .Id) "username" .Username }}" class="dropdown-toggle" data-toggle="dropdown">{{ .Username }} <b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="{{ genRoute "user_profile" "id" (print .Id) "username" .Username }}"><i class="fa fa-cog"></i> Profile</a></li>
|
|
<li class="divider"></li>
|
|
<li><a href="#soon"><i class="fa fa-sign-out"></i> Sign-out</a></li>
|
|
</ul>
|
|
{{ else }}
|
|
<a href="#" class="dropdown-toggle profile-image" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Member<span class="caret"></span></a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="{{ genRoute "user_login" }}"><i class="fa fa-sign-out"></i> Sign in</a></li>
|
|
<li><a href="{{ genRoute "user_register" }}"><i class="fa fa-cog"></i> Sign Up</a></li>
|
|
</ul>
|
|
{{end}}
|
|
</li>
|
|
</ul>
|
|
{{end}}
|
|
{{end}}
|