blessing-skin-server/resources/views/shared/user-menu.twig

39 lines
1.3 KiB
Twig
Raw Normal View History

2019-11-24 14:32:58 +08:00
<li class="nav-item dropdown user-menu">
<a href="#" class="nav-link" data-toggle="dropdown">
2020-03-18 10:33:07 +08:00
<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>
2019-09-17 23:10:44 +08:00
</a>
2019-11-24 14:32:58 +08:00
<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>
2019-09-17 23:10:44 +08:00
{% if user.admin %}
2019-11-24 14:32:58 +08:00
<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>
2020-02-17 18:27:56 +08:00
{% if cli %}
<a class="dropdown-item" href="#" id="launch-cli">
Web CLI
</a>
{% endif %}
2019-11-24 14:32:58 +08:00
<div class="dropdown-divider"></div>
2019-09-17 23:10:44 +08:00
{% endif %}
2020-05-20 10:03:47 +08:00
<a class="dropdown-item" href="#" id="logout-button" data-toggle="modal" data-target="#modal-logout">
2019-11-24 14:32:58 +08:00
{{ trans('general.logout') }}
</a>
</div>
2019-09-17 23:10:44 +08:00
</li>