Skip to content

Commit

Permalink
adds search to navbar for authenticated users
Browse files Browse the repository at this point in the history
  • Loading branch information
underhilllabs committed Dec 9, 2017
1 parent 35770a4 commit 5c1dcbc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/templates/layout/app.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<%= if @current_user do %>
<li><%= link "Tags", to: tag_path(@conn, :index) %></li>
<li><a href="/bookmarks/new">Add a Bookmark</a></li>
<form class="navbar-form navbar-left" action="/search" method="get">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search" name="search_term">
</div>
</form>
<% end %>
</ul>
<ul class="nav navbar-nav navbar-right">
Expand All @@ -47,7 +52,7 @@
method: "delete" %>
</li>
<% else %>
<li><%= link "Register", to: user_path(@conn, :new) %></li>
<li><%# link "Register", to: user_path(@conn, :new) %></li>
<li><%= link "Log in", to: session_path(@conn, :new) %></li>
<% end %>
</ul>
Expand Down

0 comments on commit 5c1dcbc

Please sign in to comment.