Skip to content
Browse files

Notifications almost done

  • Loading branch information...
1 parent bd81887 commit c6a156795a18e09961593dcf76bab15b968e8675 @adiezbal adiezbal committed Jun 24, 2011
View
BIN app/assets/images/btn/btn_notification_read.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN app/assets/images/btn/btn_notification_unread.png
Deleted file not rendered
View
30 app/views/notifications/_notification.html.erb
@@ -1,16 +1,12 @@
<%= div_for(notification, :class => read_class + ' conversation') do %>
-<div class="notification">
-</div>
+<div class="notification"></div>
<div class="sender_photo">
- <%= link_to image_tag(current_subject.logo.url(:actor),
- :title => current_subject.name, :alt => current_subject.name),
- current_subject %>
+ <%= link_to image_tag(notification.object.tie.sender.logo.url(:actor),
+ :title => notification.object.tie.sender.name, :alt => notification.object.tie.sender.name),
+ notification.object.tie.sender.subject %>
</div>
<div class="content_left">
- <div class="sender_name">
- <%#= link_to conversation.last_sender.name, conversation.last_sender.subject %>
- </div>
<div class="date">
<%= t('time.ago', :time => time_ago_in_words(notification.created_at)) %>
</div>
@@ -25,23 +21,19 @@
<div class="clearfloat">
</div>
</div>
-<div class="action">
- <% if notification.is_unread?(current_subject) %>
- <%= link_to(image_tag('btn/btn_notification_read.png', :alt => t('notification.read'),
- :title => t('notification.read')), notification_path(notification, :page => params[:page], :read => "Read"),
- :method => :put, :remote => true) %>
- <% else%>
- <%= link_to(image_tag('btn/btn_notification_unread.png', :alt => t('notification.unread'),
- :title => t('notification.unread')), notification_path(notification, :page => params[:page], :read => "Unread"),
- :method => :put, :remote => true) %>
- <% end%>
-</div>
<div class="action">
<%= link_to(image_tag('btn/btn_notification_delete.png', :alt => "Delete", :title => "Delete"),
notification_path(notification, :page => params[:page]),
:confirm => t('notification.destroy_sure'),
:method => :delete, :remote => true) %>
</div>
+<div class="action">
+ <% if notification.is_unread?(@actor) %>
+ <%= link_to(image_tag('btn/btn_notification_read.png', :alt => t('notification.read'),
+ :title => t('notification.read')), notification_path(notification, :page => params[:page], :read => "Read"),
+ :method => :put, :remote => true) %>
+ <% end%>
+</div>
<div class="clearfloat">
</div>
<% end %>

0 comments on commit c6a1567

Please sign in to comment.
Something went wrong with that request. Please try again.