70 lines
2.9 KiB
Text
70 lines
2.9 KiB
Text
.container-fluid#notifications_container
|
|
.row
|
|
.col-md-3
|
|
%h3
|
|
= t('.notifications')
|
|
.list-group
|
|
%a.list-group-item{class: ('active' unless params[:type] && @grouped_unread_notification_counts.has_key?(params[:type])), href: '/notifications' + (params[:show] == 'unread' ? '?show=unread' : '') }
|
|
%span.pull-right.badge{class: ("hidden" unless @unread_notification_count > 0)}
|
|
= @unread_notification_count
|
|
= t('.all_notifications')
|
|
- @grouped_unread_notification_counts.each do |key, count|
|
|
%a.list-group-item{class: ('active' if params[:type] == key), data: { type: key }, href: '/notifications?type=' + key + (params[:show] == 'unread' ? '&show=unread' : '') }
|
|
%span.pull-right.badge{class: ("hidden" unless count > 0)}
|
|
= count
|
|
- case key
|
|
- when 'also_commented', 'comment_on_post'
|
|
%i.entypo-comment
|
|
- when 'liked'
|
|
%i.entypo-heart
|
|
- when 'mentioned'
|
|
%span.mentionIcon
|
|
@
|
|
- when 'reshared'
|
|
%i.entypo-reshare
|
|
- when 'started_sharing'
|
|
%i.entypo-add-user
|
|
= t('.'+key)
|
|
|
|
.col-md-9.stream.notifications
|
|
.row.header
|
|
.col-md-12
|
|
.btn-toolbar.pull-right
|
|
.btn-group
|
|
%a.btn.btn-default{class: ('active' unless params[:show] == 'unread'), href: '/notifications' + (params[:type] ? '?type=' + params[:type] : '') }
|
|
= t('.show_all')
|
|
%a.btn.btn-default{class: ('active' if params[:show] == 'unread'), href: '/notifications?show=unread' + (params[:type] ? '&type=' + params[:type] : '') }
|
|
= t('.show_unread')
|
|
%a.btn.btn-default.btn-group{href: read_all_notifications_path(type: params[:type] ),class: ('disabled' unless @unread_notification_count > 0)}
|
|
-if params[:type]
|
|
= t('.mark_all_shown_as_read')
|
|
-else
|
|
= t('.mark_all_as_read')
|
|
- if @group_days.length > 0
|
|
- year = nil
|
|
- @group_days.each do |date, notes|
|
|
- if display_year?(year, date)
|
|
- year = the_year(date)
|
|
.row.year_container
|
|
.col-md-4.col-md-offset-4.year= year
|
|
|
|
.day_group.row
|
|
.date.col-md-2
|
|
.day= the_day(date)
|
|
.month= the_month(date)
|
|
|
|
.notifications_for_day.col-md-10
|
|
- notes.each do |note|
|
|
= render partial: 'notifications/notification', locals: { note: note }
|
|
|
|
= will_paginate @notifications, renderer: WillPaginate::ActionView::BootstrapLinkRenderer
|
|
|
|
- else
|
|
.no_notifications.well
|
|
%h4
|
|
= t('.no_notifications')
|
|
|
|
:javascript
|
|
$(document).ready(function(){
|
|
new app.views.Notifications({ el: '#notifications_container' });
|
|
});
|