projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
3021: Merge branch 'master' into 3021-api-performance
[arvados.git]
/
apps
/
workbench
/
app
/
views
/
layouts
/
body.html.erb
diff --git
a/apps/workbench/app/views/layouts/body.html.erb
b/apps/workbench/app/views/layouts/body.html.erb
index 5cfa2ca373c79f7708f63f77b65dc547adab5f42..fb28efe1d40cb8cdf14b48f926b318c7bc016674 100644
(file)
--- a/
apps/workbench/app/views/layouts/body.html.erb
+++ b/
apps/workbench/app/views/layouts/body.html.erb
@@
-41,7
+41,7
@@
<li class="dropdown notification-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="notifications-menu">
<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">
<%= current_user.email %> <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
@@
-52,10
+52,9
@@
<% end %>
<% end %>
<li role="menuitem"><a href="<%= logout_path %>" role="menuitem"><i class="fa fa-sign-out fa-fw"></i> Log out</a></li>
<% 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>
<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 %>
<% if i > 0 %><li class="divider"></li><% end %>
<li class="notification"><%= n.call(self) %></li>
<% end %>