Remove org notifications count from notifications view (#3158)

This commit is contained in:
Ben Halpern 2019-06-14 10:09:44 -04:00 committed by GitHub
parent 8605f29b98
commit 362b9eb663
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ class NotificationsController < ApplicationController
num = 45
notified_at_offset = Notification.find(params[:page])&.notified_at
else
num = 10
num = 8
end
@notifications = if (params[:org_id].present? || params[:filter] == "org") && allowed_user?
organization_notifications

View file

@ -36,7 +36,7 @@
<% @organizations.each do |org| %>
<hr>
<header>
<h4><%= org.name %> <%= "(#{org.notifications.where(read: false).size})" if org.notifications.where(read: false).size.positive? %></h4>
<h4><%= org.name %></h4>
</header>
<div class="widget-body">
<a class="query-filter-button <%= "selected" if params[:filter].to_s.casecmp("org").zero? && params[:org_id].to_i == org.id %>" href="/notifications/org/<%= org.id %>">ALL</a>
@ -56,7 +56,7 @@
<% @organizations.each do |org| %>
<div class="notifications-mobile-filters">
<hr>
<span class="organization-name"><%= org.name %> <%= "(#{org.notifications.where(read: false).size})" if org.notifications.where(read: false).size.positive? %></span>
<span class="organization-name"><%= org.name %></span>
<a class="query-filter-button <%= "selected" if params[:filter].to_s.casecmp("org").zero? && params[:org_id].to_i == org.id %>" href="/notifications/org/<%= org.id %>">ALL</a>
<a class="query-filter-button <%= "selected" if params[:filter].to_s.casecmp("comments").zero? && params[:org_id].to_i == org.id %>" href="/notifications/comments/<%= org.id %>">COMMENTS</a>
</div>