2015-05-13 15:02:19 -07:00
|
|
|
- provide(:title, generate_title("Notifications"))
|
2015-01-30 15:47:28 -08:00
|
|
|
= render 'notifications/notification_nav'
|
2014-12-09 14:07:04 -08:00
|
|
|
.container.j2-page
|
2020-04-19 14:34:09 -07:00
|
|
|
.row
|
|
|
|
= render 'notification_tabs'
|
|
|
|
.col-md-9.col-xs-12.col-sm-8
|
|
|
|
.card
|
|
|
|
%ul#notifications.list-group
|
|
|
|
- if @notifications.count == 0
|
|
|
|
%li.list-group-item.text-center
|
|
|
|
.notifications--none
|
|
|
|
%i.fa.fa-bell-o.no-notifications
|
|
|
|
%p
|
|
|
|
- if params[:type] != "all"
|
|
|
|
No new notifications.
|
|
|
|
- else
|
|
|
|
No notifications.
|
|
|
|
- else
|
|
|
|
- @notifications.each do |notification|
|
|
|
|
= render 'notifications/notification', notification: notification
|
2015-01-08 09:22:27 -08:00
|
|
|
|
2020-04-20 14:03:57 -07:00
|
|
|
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @notifications_last_id, permitted_params: %i[type]
|
2015-01-08 09:22:27 -08:00
|
|
|
|
2020-04-20 14:03:57 -07:00
|
|
|
- if @more_data_available
|
|
|
|
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @notifications_last_id }}
|
2015-01-08 09:23:03 -08:00
|
|
|
Load more
|
2015-05-10 10:48:47 -07:00
|
|
|
- Notification.for(current_user).update_all(new: false)
|