vidpush/app/views/layouts/_header.html.erb
2014-05-14 14:11:52 -04:00

30 lines
1.2 KiB
Plaintext

<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/"><%= image_tag asset_path("/assets/favicon.png"), size: "32x32" %> VidPush</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<% if admin_signed_in? %>
<li><%= link_to "Edit Users", accounts_path %></li>
<% else %>
<% if user_signed_in? %>
<li><%= link_to "Login as Admin", new_admin_session_path %></li>
<% end %>
<% end %>
<% if user_signed_in? %>
<li><%= link_to "Profile", edit_user_registration_path %></li>
<li><%= link_to "Logout", destroy_user_session_path, :method => :delete %></li>
<% else %>
<li><%= link_to "Sign in", new_user_session_path %></li>
<% end %>
</ul>
</div>
</div>
</div>