updated comment layout from upstream; added grouped_by_event behaviour to comments_dropdown and helper

This commit is contained in:
raluka 2015-09-21 15:56:57 +02:00
parent 5790d99fac
commit f7c70ba55c
7 changed files with 78 additions and 77 deletions

View file

@ -1,16 +1,12 @@
- @comments.each do |conference, events|
.well
%p.h4= conference.title
- events.each do |event, comments|
%h3.title
= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
%body
- comments.each do |comment|
.panel.panel-default
.panel-heading
%h4.title.panel-title= conference.title
.panel-body
- events.each do |event, comments|
.box
%h4.title= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
%hr
%ul.list-unstyled
%ul.list-inline
%li
%h5.strong Posted by: #{comment.user.name}
%li
%h5.strong Created at: #{comment.created_at}
%li= comment.body
- comments.each do |comment|
%h5.strong Posted by: #{comment.user.name} | Created at: #{comment.created_at}
%p= comment.body

View file

@ -1,16 +1,12 @@
- @posted_comments.each do |conference, events|
.well
%p.h4= conference.title
- events.each do |event, comments|
%h3.title
= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
%body
- comments.each do |comment|
.panel.panel-default
.panel-heading
%h4.title.panel-title= conference.title
.panel-body
- events.each do |event, comments|
.box
%h4.title= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
%hr
%ul.list-unstyled
%ul.list-inline
%li
%h5.strong Posted by: #{comment.user.name}
%li
%h5.strong Created at: #{comment.created_at}
%li= comment.body
- comments.each do |comment|
%h5.strong Created at: #{comment.created_at}
%p= comment.body

View file

@ -1,16 +1,12 @@
- @unread_comments.each do |conference, events|
.well
%p.h4= conference.title
- events.each do |event, comments|
%h3.title
= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
%body
- comments.each do |comment|
.panel.panel-default
.panel-heading
%h4.title.panel-title= conference.title
.panel-body
- events.each do |event, comments|
.box
%h4.title= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
%hr
%ul.list-unstyled
%ul.list-inline
%li
%h5.strong Posted by: #{comment.user.name}
%li
%h5.strong Created at: #{comment.created_at}
%li= comment.body
- comments.each do |comment|
%h5.strong Posted by: #{comment.user.name} | Created at: #{comment.created_at}
%p= comment.body

View file

@ -1,23 +1,24 @@
%h1 Comments
%br
.row
.col-lg-12
.col-md-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
Unread
%li
%a{:href=>"#posted_comments", "data-toggle"=>"tab"}
%span.fa.fa-pencil
Posted Comments
Posted
%li
%a{:href=>"#all_comments", "data-toggle"=>"tab"}
%span.fa.fa-comments-o
All
.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'
.tab-pane#all_comments
= render partial: 'all_comments'