<%= link to: Routes.page_path(CanneryWeb.Endpoint, :index) do %>
Cannery
<% end %>
<%= if @title_content do %>
|
<%= @title_content %>
<% end %>
<%# user settings %>
<%= if @current_user do %>
-
<%= link "Tags", class: "hover:underline",
to: Routes.tag_index_path(CanneryWeb.Endpoint, :index) %>
-
<%= link "Containers", class: "hover:underline",
to: Routes.container_index_path(CanneryWeb.Endpoint, :index) %>
-
<%= link "Ammo", class: "hover:underline",
to: Routes.ammo_type_index_path(CanneryWeb.Endpoint, :index) %>
-
<%= link "Manage", class: "hover:underline",
to: Routes.ammo_group_index_path(CanneryWeb.Endpoint, :index) %>
<%# search %>
<%= link @current_user.email, class: "hover:underline",
to: Routes.user_settings_path(CanneryWeb.Endpoint, :edit) %>
<%= link to: Routes.user_session_path(CanneryWeb.Endpoint, :delete), method: :delete,
data: [confirm: "Are you sure you want to log out?"] do %>
<% end %>
<%= if @current_user.role == :admin and function_exported?(Routes, :live_dashboard_path, 2) do %>
<%= link to: Routes.live_dashboard_path(CanneryWeb.Endpoint, :home) do %>
<% end %>
<% end %>
<% else %>
<%= if Accounts.allow_registration?() do %>
<%= link "Register", class: "hover:underline",
to: Routes.user_registration_path(CanneryWeb.Endpoint, :new) %>
<% end %>
<%= link "Log in", class: "hover:underline",
to: Routes.user_session_path(CanneryWeb.Endpoint, :new) %>
<% end %>