blessing-skin-server/resources/views/shared/user-menu.twig
2020-05-20 10:03:47 +08:00

39 lines
1.3 KiB
Twig

<li class="nav-item dropdown user-menu">
<a href="#" class="nav-link" data-toggle="dropdown">
<img src="{{ avatar }}" class="bs-avatar mr-1" 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>
{% if cli %}
<a class="dropdown-item" href="#" id="launch-cli">
Web CLI
</a>
{% endif %}
<div class="dropdown-divider"></div>
{% endif %}
<a class="dropdown-item" href="#" id="logout-button" data-toggle="modal" data-target="#modal-logout">
{{ trans('general.logout') }}
</a>
</div>
</li>