<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a class="navbar-brand" href="/" data-push=true><%= Rails.configuration.site_name.downcase rescue Rails.application.class.parent_name %></a>
+ <% site_name = Rails.configuration.site_name.downcase rescue Rails.application.class.parent_name %>
+ <% if current_user %>
+ <a class="navbar-brand" href="/" data-push=true><%= site_name %></a>
+ <% else %>
+ <span class="navbar-brand"><%= site_name %></span>
+ <% end %>
</div>
<div class="collapse navbar-collapse">
<li class="dropdown notification-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="notifications-menu">
- <span class="badge badge-alert notification-count"><%= @notification_count %></span>
+ <span class="badge badge-alert notification-count"><%= user_notifications.length if user_notifications.any? %></span>
<%= current_user.email %> <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<% end %>
<% end %>
<li role="menuitem"><a href="<%= logout_path %>" role="menuitem"><i class="fa fa-sign-out fa-fw"></i> Log out</a></li>
- <% if current_user.is_active and
- (@notifications || []).length > 0 %>
+ <% if user_notifications.any? %>
<li role="presentation" class="divider"></li>
- <% @notifications.each_with_index do |n, i| %>
+ <% user_notifications.each_with_index do |n, i| %>
<% if i > 0 %><li class="divider"></li><% end %>
<li class="notification"><%= n.call(self) %></li>
<% end %>
</nav>
<% end %>
+ <%= render partial: 'browser_unsupported' %><%# requires JS support below %>
+
<div id="page-wrapper">
<%= yield %>
</div>
<div class="modal-container"></div>
<div id="report-issue-modal-window"></div>
+<script src="/browser_unsupported.js"></script>