css for marking as unread, and hook for notification page to be part of it when called.

This commit is contained in:
Steven Fuchs 2012-01-17 19:21:25 -05:00
parent a11c8d8a96
commit aae5fe04ce
2 changed files with 42 additions and 28 deletions

View file

@ -2,15 +2,15 @@
-self.extend AspectsHelper -self.extend AspectsHelper
-self.extend ApplicationHelper -self.extend ApplicationHelper
-self.extend ErrorMessagesHelper -self.extend ErrorMessagesHelper
.span-13 #notifications_content
.span-13
%h2 %h2
%span.notification_count{:class => ('unread' if @notification_count > 0)} %span.notification_count{:class => ('unread' if @notification_count > 0)}
= @notification_count = @notification_count
= t('.notifications') = t('.notifications')
.span-8.last .span-8.last
= link_to t('.mark_all_as_read'), read_all_notifications_path, :class => 'button' = link_to t('.mark_all_as_read'), read_all_notifications_path, :class => 'button'
.span-24.last
.span-24.last
.stream.notifications .stream.notifications
- group_days.each do |day, notes| - group_days.each do |day, notes|
.day_group.span-24.last .day_group.span-24.last
@ -21,7 +21,7 @@
.span-8.notifications_for_day .span-8.notifications_for_day
- notes.each do |note| - notes.each do |note|
.stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : ''}"} .stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : 'read'}"}
- if note.type == "Notifications::StartedSharing" && contact = current_user.contact_for(note[:target]) - if note.type == "Notifications::StartedSharing" && contact = current_user.contact_for(note[:target])
.right .right
= aspect_membership_dropdown(contact, note[:target], 'left') = aspect_membership_dropdown(contact, note[:target], 'left')
@ -30,5 +30,12 @@
= notification_message_for(note) = notification_message_for(note)
%br %br
%time= timeago(note.created_at) %time= timeago(note.created_at)
%a{:class => 'unread-setter'}
mark unread
.span-13.last .span-13.last
= will_paginate notifications = will_paginate notifications
:javascript
$(document).ready(function(){
Diaspora.page.header.notifications.setUpNotificationPage( $("#notifications_content" ) );
});

View file

@ -2987,6 +2987,12 @@ ul.left_nav
.user_card .user_card
:margin-left 8px :margin-left 8px
.unread-setter
:float right
:display none
:cursor pointer
:margin-top 8px
.stream_container .stream_container
:min-height 500px :min-height 500px
@ -3139,7 +3145,8 @@ a.toggle_selector
.notification_element .notification_element
:padding 10px :padding 10px
:min-height 30px :min-height 30px
&:hover
:background-color #FAFAFA
> img > img
:height 30px :height 30px
:width 30px :width 30px