Appease the dog overlords
This commit is contained in:
parent
c9c458252b
commit
80d8bebe57
|
@ -26,7 +26,7 @@ class NotificationsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def read
|
def read
|
||||||
current_user.notifications.where(new: true).update_all(new: false)
|
current_user.notifications.where(new: true).update_all(new: false) # rubocop:disable Rails/SkipsModelValidations
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.turbo_stream do
|
format.turbo_stream do
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
%span.badge= notification_count
|
%span.badge= notification_count
|
||||||
.dropdown-menu.dropdown-menu-end.notification-dropdown
|
.dropdown-menu.dropdown-menu-end.notification-dropdown
|
||||||
%turbo-frame#notifications-dropdown-list
|
%turbo-frame#notifications-dropdown-list
|
||||||
= render 'navigation/dropdown/notifications', notifications:, notification_count: nil
|
= render "navigation/dropdown/notifications", notifications:, notification_count: nil
|
||||||
%li.nav-item.d-none.d-sm-block{ data: { bs_toggle: 'tooltip', bs_placement: 'bottom' }, title: t('.ask_question') }
|
%li.nav-item.d-none.d-sm-block{ data: { bs_toggle: 'tooltip', bs_placement: 'bottom' }, title: t('.ask_question') }
|
||||||
%a.nav-link{ href: "#", name: "toggle-all-ask", data: { bs_target: "#modal-ask-followers", bs_toggle: :modal, hotkey: "n" } }
|
%a.nav-link{ href: "#", name: "toggle-all-ask", data: { bs_target: "#modal-ask-followers", bs_toggle: :modal, hotkey: "n" } }
|
||||||
%i.fa.fa-pencil-square-o
|
%i.fa.fa-pencil-square-o
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
.dropdown-menu.dropdown-menu-end.notification-dropdown{ id: "rs-#{size}-nav-notifications" }
|
- if notifications.count.zero?
|
||||||
- if notifications.count.zero?
|
|
||||||
%a.dropdown-item.text-center{ href: notifications_path('all') }
|
%a.dropdown-item.text-center{ href: notifications_path('all') }
|
||||||
%i.fa.fa-fw.fa-chevron-right
|
%i.fa.fa-fw.fa-chevron-right
|
||||||
= t(".all")
|
= t(".all")
|
||||||
.dropdown-item.text-center.p-2
|
.dropdown-item.text-center.p-2
|
||||||
%i.fa.fa-bell-o.notification__bell-icon
|
%i.fa.fa-bell-o.notification__bell-icon
|
||||||
%p= t(".none")
|
%p= t(".none")
|
||||||
- else
|
- else
|
||||||
%a.dropdown-item.text-center{ href: notifications_path }
|
%a.dropdown-item.text-center{ href: notifications_path }
|
||||||
%i.fa.fa-fw.fa-chevron-right
|
%i.fa.fa-fw.fa-chevron-right
|
||||||
= t(".new")
|
= t(".new")
|
||||||
|
@ -15,5 +14,5 @@
|
||||||
= t(".mark_as_read")
|
= t(".mark_as_read")
|
||||||
- notifications.each do |notification|
|
- notifications.each do |notification|
|
||||||
.dropdown-item
|
.dropdown-item
|
||||||
= render "notifications/type/#{notification.target.class.name.downcase.split('::').last}", notification: notification
|
= render "notifications/type/#{notification.target.class.name.downcase.split('::').last}", notification:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue