Aggiedit/lib/aggiedit_web/templates/layout/_user_menu.html.heex

15 lines
609 B
Plaintext
Raw Permalink Normal View History

<%= if @current_user do %>
2022-04-14 02:18:01 -04:00
<li class="nav-item active">
2022-04-14 13:43:34 -04:00
<%= link "#{@current_user.username}/settings", to: Routes.user_settings_path(@conn, :edit), class: "nav-link" %>
2022-04-14 02:18:01 -04:00
</li>
<li class="nav-item active">
<%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete, class: "nav-link" %>
</li>
<% else %>
2022-04-14 02:18:01 -04:00
<li class="nav-item active">
<%= link "Register", to: Routes.user_registration_path(@conn, :new), class: "nav-link" %>
</li>
<li class="nav-item active">
<%= link "Log in", to: Routes.user_session_path(@conn, :new), class: "nav-link" %>
</li>
<% end %>