<%= image_tag notification.sender.image(:thirtytwo) %>
<%= notification.sender.name %>
<%=
case notification.notification_code
when MAP_ACCESS_APPROVED
map = notification.notified_object.map
'granted your request to edit map
' + map.name + ''
when MAP_ACCESS_REQUEST
map = notification.notified_object.map
'wants permission to map with you on
' + map.name + ' Offer a response
'
when MAP_INVITE_TO_EDIT
map = notification.notified_object.map
'gave you edit access to map
' + map.name + ''
when TOPIC_ADDED_TO_MAP
topic = notification.notified_object.eventable
map = notification.notified_object.map
'added topic
' + topic.name + ' to map
' + map.name + ''
when TOPIC_CONNECTED_1
topic1 = notification.notified_object.topic1
topic2 = notification.notified_object.topic2
'connected
' + topic1.name + ' to
' + topic2.name + ''
when TOPIC_CONNECTED_2
topic1 = notification.notified_object.topic1
topic2 = notification.notified_object.topic2
'connected
' + topic2.name + ' to
' + topic1.name + ''
when MESSAGE_FROM_DEVS
notification.subject
end
%>
<% end %>
<% if receipt.is_read? %>
<%= link_to 'mark as unread', mark_unread_notification_path(notification.id), remote: true, method: :put %>
<% else %>
<%= link_to 'mark as read', mark_read_notification_path(notification.id), remote: true, method: :put %>
<% end %>