* Update ja-jp.all.json * Update ja-jp.all.json * Update _user_list_torrents.html * Update dumps.html * Update _user_list_torrents.html * Update dumps.html * Update _badgemenu.html
29 lignes
1,7 Kio
HTML
29 lignes
1,7 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 profile-image" data-toggle="dropdown">
|
|
<img src="https://www.gravatar.com/avatar/{{ .MD5 }}?s=50" class="img-circle special-img"> {{ .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> {{T "profile"}}</a></li>
|
|
<li><a href="{{ genRoute "user_profile_edit" "id" (print .ID) "username" .Username }}"><i class="fa fa-cog"></i> {{T "settings"}}</a></li>
|
|
{{if HasAdmin . }}<li><a href="{{ genRoute "mod_index" }}"><i class="fa fa-cog"></i> {{T "moderation"}}</a></li>{{end}}
|
|
<li class="divider"></li>
|
|
<li><a href="{{ genRoute "user_logout" }}"><i class="fa fa-sign-out"></i> {{ T "sign_out"}}</a></li>
|
|
</ul>
|
|
{{ else }}
|
|
<a href="#" class="dropdown-toggle profile-image" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
|
<span class="hidden-md hidden-sm">{{ T "member" }}</span>
|
|
<span class="glyphicon glyphicon-user visible-md"></span>
|
|
<span class="caret"></span>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="{{ genRoute "user_login" }}"><i class="fa fa-sign-out"></i> {{ T "sign_in"}}</a></li>
|
|
<li><a href="{{ genRoute "user_register" }}"><i class="fa fa-cog"></i> {{ T "sign_up"}}</a></li>
|
|
</ul>
|
|
{{end}}
|
|
</li>
|
|
</ul>
|
|
{{end}}
|
|
{{end}}
|