diff --git a/app/views/layouts/notifications.haml b/app/views/layouts/notifications.haml index 37225c3e..35267c08 100644 --- a/app/views/layouts/notifications.haml +++ b/app/views/layouts/notifications.haml @@ -1,4 +1,3 @@ -= render 'navigation/notification' .container-lg.container--main .row .col-md-3.col-xs-12.col-sm-4 diff --git a/app/views/navigation/_notification.haml b/app/views/navigation/_notification.haml deleted file mode 100644 index a7456422..00000000 --- a/app/views/navigation/_notification.haml +++ /dev/null @@ -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') diff --git a/app/views/tabs/_notifications.haml b/app/views/tabs/_notifications.haml index 74289536..ad4d7a63 100644 --- a/app/views/tabs/_notifications.haml +++ b/app/views/tabs/_notifications.haml @@ -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