From c0920f046fb28a00cb915d9cf249fd2e9d94b94e Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 21 Nov 2025 09:29:21 -0600 Subject: [PATCH] Move to bottom, use utility classes --- .../index/_unread_notifications.html.erb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/views/notifications/index/_unread_notifications.html.erb b/app/views/notifications/index/_unread_notifications.html.erb index 4fbfdba7d..9a9898788 100644 --- a/app/views/notifications/index/_unread_notifications.html.erb +++ b/app/views/notifications/index/_unread_notifications.html.erb @@ -4,13 +4,6 @@

New for you

<%= button_to "Mark all as read", bulk_reading_path, class: "btn txt-small", form: { data: { turbo: false } }, data: { action: "badge#clear" } %> - - <% total_unread_count = Current.user.notifications.unread.count %> - <% if Current.user.notifications.unread.count > NotificationsController::MAX_UNREAD_NOTIFICATIONS %> - - <% end %> <% else %>
Nothing new for you. @@ -20,4 +13,13 @@
<%= render partial: "notifications/index/notification", collection: unread, cached: true %>
+ + <% if unread.any? %> + <% total_unread_count = Current.user.notifications.unread.count %> + <% if Current.user.notifications.unread.count > NotificationsController::MAX_UNREAD_NOTIFICATIONS %> +
+ Showing the <%= NotificationsController::MAX_UNREAD_NOTIFICATIONS %> most recent (<%= total_unread_count - NotificationsController::MAX_UNREAD_NOTIFICATIONS %> are hidden) +
+ <% end %> + <% end %>