wiki/lib/wiki_web/templates/layout/_user_menu.html.eex

13 lines
481 B
Elixir
Raw Permalink Normal View History

2020-07-30 00:49:51 +00:00
<ul>
<%= if @current_user do %>
<li><%= @current_user.email %></li>
<li><%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %></li>
<li><%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete %></li>
<% else %>
2020-08-02 22:35:14 +00:00
<%= if registration_enabled() do %>
<li><%= link "Register", to: Routes.user_registration_path(@conn, :new) %></li>
<% end %>
2020-07-30 00:49:51 +00:00
<li><%= link "Log in", to: Routes.user_session_path(@conn, :new) %></li>
<% end %>
</ul>