mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
updated comment layout from upstream; added grouped_by_event behaviour to comments_dropdown and helper
This commit is contained in:
parent
5790d99fac
commit
f7c70ba55c
7 changed files with 78 additions and 77 deletions
|
|
@ -28,17 +28,19 @@
|
|||
- if can? :index, Comment
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
%li.dropdown
|
||||
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#", id: "unread-comments-preview"}
|
||||
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
|
||||
- if unread_notifications(current_user)
|
||||
Notifications (#{unread_notifications(current_user).length})
|
||||
%span.fa.fa-comment
|
||||
%b.caret
|
||||
%ul.dropdown-menu
|
||||
- unread_notifications(current_user).limit(5).each do |unread_comment|
|
||||
%li= link_to("New comment for: #{unread_comment.commentable.title}", admin_conference_event_path(unread_comment.commentable.conference.short_title, unread_comment.commentable_id))
|
||||
%li.divider
|
||||
%li= link_to 'See comments', admin_comments_path
|
||||
-else
|
||||
No Notifications
|
||||
- if unread_notifications(current_user).length > 0
|
||||
%li.dropdown-header Last 5 Comments for:
|
||||
- unread_notifications(current_user).limit(5).group_by{ |comment| comment.commentable}.each do |event, comments|
|
||||
%li= link_to("#{event.title}(#{comments.count})", admin_conference_event_path(event.conference.short_title, event.id))
|
||||
%li.divider
|
||||
%li= link_to "See all unread Comments (#{unread_notifications(current_user).length})", admin_comments_path
|
||||
%li= link_to 'See all Comments', admin_comments_path(anchor: 'all_comments')
|
||||
- else
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
- if CONFIG['authentication']['ichain']['enabled']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue