temporary fix
This commit is contained in:
parent
14cd1f95d0
commit
147fe6d566
2 changed files with 6 additions and 5 deletions
|
@ -39,13 +39,13 @@ class NotificationService
|
|||
|
||||
def self.text_for_notification(notification)
|
||||
if notification.notification_code == MAILBOXER_CODE_ACCESS_REQUEST
|
||||
map = notification.notified_object&.map
|
||||
map = notification.notified_object.map
|
||||
'wants permission to map with you on <span class="in-bold">' + map.name + '</span> <div class="action">Offer a response</div>'
|
||||
elsif notification.notification_code == MAILBOXER_CODE_ACCESS_APPROVED
|
||||
map = notification.notified_object&.map
|
||||
map = notification.notified_object.map
|
||||
'granted your request to edit map <span class="in-bold">' + map.name + '</span>'
|
||||
elsif notification.notification_code == MAILBOXER_CODE_INVITE_TO_EDIT
|
||||
map = notification.notified_object&.map
|
||||
map = notification.notified_object.map
|
||||
'gave you edit access to map <span class="in-bold">' + map.name + '</span>'
|
||||
elsif notification.notification_code == MAILBOXER_CODE_MESSAGE_FROM_DEVS
|
||||
notification.subject
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
<h2 class="title">Notifications</h4>
|
||||
</header>
|
||||
<ul class="notifications">
|
||||
<% @notifications.each do |notification| %>
|
||||
<% notifications = @notifications.to_a.delete_if{|n| n.notified_object.nil? || n.notified_object.map.nil? }%>
|
||||
<% notifications.each do |notification| %>
|
||||
<% receipt = @receipts.find_by(notification_id: notification.id) %>
|
||||
<li class="notification <%= receipt.is_read? ? 'read' : 'unread' %>" id="notification-<%= notification.id %>">
|
||||
<%= link_to notification_path(notification.id) do %>
|
||||
|
@ -32,7 +33,7 @@
|
|||
<div class="clearfloat"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if @notifications.count == 0 %>
|
||||
<% if notifications.count == 0 %>
|
||||
<div class="emptyInbox">
|
||||
You have no notifications. More time for dancing.
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue