2021-02-26 12:07:33 -05:00
|
|
|
<li class="nav-item dropdown">
|
2021-02-25 18:21:43 -05:00
|
|
|
|
|
|
|
<a href="#" class="nav-link dropdown-toggle" id="navbarDropdownUserMenu" data-bs-toggle="dropdown" aria-expanded="false">
|
2022-08-14 09:14:42 -04:00
|
|
|
<i class="bi bi-person-circle me-1"></i> Hello!
|
2021-02-25 18:21:43 -05:00
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownUserMenu">
|
|
|
|
|
2021-03-09 11:06:23 -05:00
|
|
|
<li><%= content_tag :span, @current_user.email, class: "dropdown-item-text" %></li>
|
|
|
|
<li><hr class="dropdown-divider"></li>
|
|
|
|
<%= if Roles.can?(@current_user, %User{}, :index) do %>
|
2021-03-01 13:42:26 -05:00
|
|
|
<li>
|
2021-03-09 11:06:23 -05:00
|
|
|
<%= link nav_link_opts(@conn, to: Routes.user_management_index_path(@conn, :index), class: "dropdown-item") do %>
|
2022-08-13 07:32:36 -04:00
|
|
|
<i class="bi bi-people me-1"></i> Users
|
2021-03-01 13:42:26 -05:00
|
|
|
<% end %>
|
|
|
|
</li>
|
2021-03-09 11:06:23 -05:00
|
|
|
<li><hr class="dropdown-divider"></li>
|
2021-02-25 18:21:43 -05:00
|
|
|
<% end %>
|
2021-03-09 11:06:23 -05:00
|
|
|
<li>
|
|
|
|
<%= link nav_link_opts(@conn, to: Routes.user_settings_path(@conn, :edit), class: "dropdown-item") do %>
|
2022-08-13 07:32:36 -04:00
|
|
|
<i class="bi bi-sliders me-1"></i> Settings
|
2021-03-09 11:06:23 -05:00
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<%= link nav_link_opts(@conn, to: Routes.user_session_path(@conn, :delete), method: :delete, class: "dropdown-item") do %>
|
2022-08-13 07:32:36 -04:00
|
|
|
<i class="bi bi-door-closed me-1"></i> Log out
|
2021-03-09 11:06:23 -05:00
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
|
2021-02-25 18:21:43 -05:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
</li>
|