blessing-skin-server/resources/views/shared/user-menu.twig
2019-11-30 12:01:17 +08:00

34 lines
1.2 KiB
Twig

<li class="nav-item dropdown user-menu">
<a href="#" class="nav-link" data-toggle="dropdown">
<img src="{{ avatar }}" class="user-image img-circle elevation-2" alt="User Image">
<span class="d-none d-md-inline d-sm-block" data-mark="nickname">
{{ user.nickname ?? user.email }}
</span>
</a>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
<a class="dropdown-item" href="{{ url('user') }}">
{{ trans('general.user-center') }}
</a>
<a class="dropdown-item" href="{{ url('user/profile') }}">
{{ trans('general.profile') }}
</a>
<div class="dropdown-divider"></div>
{% if user.admin %}
<a class="dropdown-item" href="{{ url('admin') }}">
{{ trans('general.admin-panel') }}
</a>
<a class="dropdown-item" href="{{ url('admin/users') }}">
{{ trans('general.user-manage') }}
</a>
<a class="dropdown-item" href="{{ url('admin/reports') }}">
{{ trans('general.report-manage') }}
</a>
<div class="dropdown-divider"></div>
{% endif %}
<a class="dropdown-item" href="#" id="logout-button">
{{ trans('general.logout') }}
</a>
</div>
</li>