module-and-template-store/app/views/shared/_top_navigation.html.erb

50 lines
1.9 KiB
Plaintext

<nav class="navbar navbar-static-top navbar-inverse nav-bar" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<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>
<%= link_to("Orbit Store", root_path, :class => "navbar-brand orbit-logo") %>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class=<%= "active" if request.path.at(extensions_path) %>>
<%= link_to "Modules", extensions_path %>
</li>
<li <%= 'class="active"' if request.path =~ /\/templates/ %>>
<%= link_to "Templates", "/templates" %>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<% if user_signed_in? %>
<li class="dropdown users">
<%= link_to(((placeholdit_image_tag "16x16", background_color: "#23b2be", :class => "avatar") + current_user.email + content_tag(:b, "", :class => "caret")), "#", :class => "dropdown-toggle", "data-toggle" => "dropdown") %>
<ul class="dropdown-menu">
<li>
<%= link_to "Purchased", "#" %>
</li>
<li class="divider"></li>
<li>
<%= link_to "Account Settings", "#" %>
</li>
<li>
<%= link_to "Sign Out", destroy_user_session_path, :method => :delete %>
</li>
</ul>
</li>
<% else %>
<li>
<!-- <%= link_to "Sign in", "#" %>
--> </li>
<% end %>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>