Issue#15: Added Comment Notifications: notification_emails and comments view

This commit is contained in:
raluka 2015-07-17 18:55:47 +02:00
parent a73ca335a9
commit 38e8be8793
16 changed files with 155 additions and 13 deletions

View file

@ -0,0 +1,16 @@
.panel.well
-@ordered_events.each do |event|
- if event.comment_threads.count > 0
%panel
%panel.panel-header
%h4.title
= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
%hr
-event.comment_threads.order(created_at: :desc).each do |comment|
%panel-body
%ul.list-unstyled
%li= comment.body
%ul.list-inline
%li Posted by: #{comment.user.name}
%li Created at: #{comment.created_at}
%hr

View file

@ -0,0 +1,14 @@
.panel.well
-@ordered_events.each do |event|
- if event.comment_threads.find_comments_by_user(current_user).count > 0
%panel
%panel.panel-header
%h4.title
= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
%hr
-event.comment_threads.find_comments_by_user(current_user).each do |comment|
%panel-body
%ul.list-unstyled
%li= comment.body
%li Created at: #{comment.created_at}
%hr

View file

@ -0,0 +1,16 @@
.panel.well
-@ordered_events.each do |event|
- if event.comment_threads.find_since_last_login(current_user).count > 0
%panel
%panel.panel-header
%h4.title
= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
%hr
-event.comment_threads.find_since_last_login(current_user).each do |comment|
%panel-body
%ul.list-unstyled
%li= comment.body
%ul.list-inline
%li Posted by: #{comment.user.name}
%li Created at: #{comment.created_at}
%hr

View file

@ -0,0 +1,23 @@
%h1 Comments
.row
.col-lg-12
%ul.nav.nav-tabs#commentsTable
%li.active
%a{:href=>"#unread_comments", "data-toggle"=>"tab"}
%span.fa.fa-comment
Unread comments
%li
%a{:href=>"#all_comments", "data-toggle"=>"tab"}
%span.fa.fa-comments-o
Comments
%li
%a{:href=>"#posted_comments", "data-toggle"=>"tab"}
%span.fa.fa-pencil
Posted Comments
.tab-content
.tab-pane.active#unread_comments
= render partial: 'unread_comments'
.tab-pane#all_comments
= render partial: 'all_comments'
.tab-pane#posted_comments
= render partial: 'posted_comments'