mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Move notifications into user menu
This commit is contained in:
parent
c4219bbaf9
commit
cddc3e6f93
2 changed files with 12 additions and 15 deletions
|
|
@ -32,21 +32,6 @@
|
||||||
%b.caret
|
%b.caret
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
= render 'layouts/user_menu'
|
= render 'layouts/user_menu'
|
||||||
- if can? :index, Comment
|
|
||||||
%ul.nav.navbar-nav.navbar-right
|
|
||||||
%li.dropdown
|
|
||||||
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
|
|
||||||
Notifications (#{unread_notifications(current_user).length})
|
|
||||||
%span.fa.fa-comment
|
|
||||||
%b.caret
|
|
||||||
%ul.dropdown-menu
|
|
||||||
- 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_program_event_path(event.program.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
|
- else
|
||||||
%ul.nav.navbar-nav.navbar-right
|
%ul.nav.navbar-nav.navbar-right
|
||||||
- if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
- if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,15 @@
|
||||||
|
- if can? :index, Comment
|
||||||
|
%li.dropdown-header
|
||||||
|
%span.fa.fa-comment
|
||||||
|
Notifications (#{unread_notifications(current_user).length})
|
||||||
|
- 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_program_event_path(event.program.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')
|
||||||
|
%li.divider
|
||||||
- unless ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
- unless ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
||||||
%li
|
%li
|
||||||
= link_to(edit_user_registration_path) do
|
= link_to(edit_user_registration_path) do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue