|
@@ -1,3 +1,10 @@
|
|
|
+<% if user_masquerade? %>
|
|
|
+ <div class="alert alert-warning text-center">
|
|
|
+ You're logged in as <b><%= current_user.name %> (<%= current_user.email %>)</b>
|
|
|
+ <%= link_to back_masquerade_path(current_user) do %><%= icon("times") %> Logout <% end %>
|
|
|
+ </div>
|
|
|
+<% end %>
|
|
|
+
|
|
|
<nav class="navbar navbar-toggleable-md navbar-light bg-faded">
|
|
|
<div class="container">
|
|
|
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
@@ -12,11 +19,21 @@
|
|
|
<ul class="navbar-nav">
|
|
|
<li class="nav-item"><%= link_to "What's New", announcements_path, class: "nav-link #{unread_announcements(current_user)}" %></li>
|
|
|
<% if user_signed_in? %>
|
|
|
- <li class="nav-item">
|
|
|
- <a class="nav-link" href="javascript:void(0)" data-uv-lightbox="classic_widget" data-uv-mode="full" data-uv-primary-color="#3aa2e3" data-uv-link-color="#56b68b" data-uv-default-mode="support" data-uv-forum-id="259979">Support</a>
|
|
|
+
|
|
|
+ <li class="nav-item dropdown">
|
|
|
+ <%= link_to root_path, id: "navbar-dropdown", class: "nav-link dropdown-toggle", data: { toggle: "dropdown" }, aria: { haspopup: true, expanded: false } do %>
|
|
|
+ <%= image_tag gravatar_image_url(current_user.email, size: 40), height: 20, width: 20, class: "rounded" %>
|
|
|
+ <% end %>
|
|
|
+ <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbar-dropdown">
|
|
|
+ <% if current_user.admin? %>
|
|
|
+ <%= link_to "Admin Area", admin_root_path, class: "dropdown-item" %>
|
|
|
+ <% end %>
|
|
|
+ <%= link_to "Settings", edit_user_registration_path, class: "dropdown-item" %>
|
|
|
+ <div class="dropdown-divider"></div>
|
|
|
+ <%= link_to "Logout", destroy_user_session_path, method: :delete, class: "dropdown-item" %>
|
|
|
+ </div>
|
|
|
</li>
|
|
|
- <li class="nav-item"><%= link_to "Account", edit_user_registration_path, class: "nav-link" %></li>
|
|
|
- <li class="nav-item"><%= link_to "Logout", destroy_user_session_path, method: :delete, class: "nav-link" %></li>
|
|
|
+
|
|
|
<% else %>
|
|
|
<li class="nav-item"><%= link_to "Sign Up", new_user_registration_path, class: "nav-link" %></li>
|
|
|
<li class="nav-item"><%= link_to "Login", new_user_session_path, class: "nav-link" %></li>
|