Don't show search link if logged out
This commit is contained in:
parent
1a1a58cb82
commit
803fc4c36e
|
@ -13,12 +13,14 @@
|
|||
<nav role="navigation">
|
||||
<ul>
|
||||
<li><a href="/"><%= instance_name() %></a></li>
|
||||
<%= if @conn.assigns[:user] do %>
|
||||
<li><a href="<%= Routes.frontend_path(@conn, :search) %>">Search</a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul>
|
||||
<%= if @conn.assigns[:user] do %>
|
||||
<li>
|
||||
Logged in as <a href="<%= Routes.actor_path(@conn, :get, @conn.assigns[:user].username) %>"><%= @conn.assigns[:user].username %></a>.
|
||||
Logged in as <a href="<%= Routes.actor_path(@conn, :get, @user.username) %>"><%= @user.username %></a>.
|
||||
</li>
|
||||
<li>
|
||||
<%= form_for @conn, Routes.login_path(@conn, :logout), [method: :post], fn f -> %>
|
||||
|
|
Loading…
Reference in New Issue