Remove notification navigation bar

This commit is contained in:
Andreas Nedbal 2022-07-07 01:14:10 +02:00 committed by Georg Gadinger
parent 7731524d85
commit 334c30e773
3 changed files with 9 additions and 24 deletions

View File

@ -1,4 +1,3 @@
= render 'navigation/notification'
.container-lg.container--main
.row
.col-md-3.col-xs-12.col-sm-4

View File

@ -1,14 +0,0 @@
%nav.navbar.navbar-light.bg-white.navbar-static-top.d-flex.d-sm-none{ role: :navigation }
%a.navbar-brand{ href: notifications_path } Notifications
%button.navbar-toggler{ data: { target: '#j2-tl-navbar-collapse', toggle: :collapse }, type: :button }
%span.sr-only Toggle navigation
%span.navbar-toggler-icon
.collapse.navbar-collapse#j2-tl-navbar-collapse
%ul.nav.navbar-nav
= nav_entry 'New Notifications', notifications_path
= nav_entry 'All Notifications', notifications_path('all')
= nav_entry t('views.notifications.tabs.answer'), notifications_path('answer')
= nav_entry t('views.notifications.tabs.smile'), notifications_path('smile')
= nav_entry t('views.notifications.tabs.comment'), notifications_path('comment')
= nav_entry t('views.notifications.tabs.commentsmile'), notifications_path('commentsmile')
= nav_entry t('views.notifications.tabs.relationship'), notifications_path('relationship')

View File

@ -1,25 +1,25 @@
.card.d-none.d-sm-block
.card
.list-group
= list_group_item 'New Notifications', notifications_path, badge: Notification.for(current_user).where(new: true).count
= list_group_item 'All Notifications', notifications_path('all')
= list_group_item t(".new"), notifications_path, badge: Notification.for(current_user).where(new: true).count
= list_group_item t(".all"), notifications_path('all')
.card.d-none.d-sm-block
.card
.card-header
Filter by Type
.list-group
= list_group_item t('views.notifications.tabs.answer'),
= list_group_item t('.answer'),
notifications_path('answer'),
badge: Notification.for(current_user).where(target_type: 'Answer', new: true).count
= list_group_item t('views.notifications.tabs.smile'),
= list_group_item t('.smile'),
notifications_path('smile'),
badge: Notification.for(current_user).where(target_type: 'Smile', new: true).count
= list_group_item t('views.notifications.tabs.comment'),
= list_group_item t('.comment'),
notifications_path('comment'),
badge: Notification.for(current_user).where(target_type: 'Comment', new: true).count
= list_group_item t('views.notifications.tabs.commentsmile'),
= list_group_item t('.commentsmile'),
notifications_path('commentsmile'),
badge: Notification.for(current_user).where(target_type: 'CommentSmile', new: true).count
= list_group_item t('views.notifications.tabs.relationship'),
= list_group_item t('.relationship'),
notifications_path('relationship'),
badge: Notification.for(current_user).where(target_type: 'Relationship', new: true).count