Files
fizzy/app/views/notifications/_notification.html.erb
T

20 lines
1.1 KiB
Plaintext

<% cache [notification, "2025-03-20"] do %>
<%= notification_tag notification do %>
<div class="avatar txt-x-small flex-item-no-shrink">
<%= avatar_image_tag(notification.creator) %>
</div>
<div class="flex flex-column min-width flex-item-grow">
<strong class="overflow-ellipsis notification__title txt-small txt-tight-lines"><%= notification_title(notification) %></strong>
<div class="overflow-ellipsis txt-small txt-tight-lines">
<% if notification.event.action == "commented" %>
<%= "#{ strip_tags(notification.event.comment.body_html).blank? ? "#{ notification.event.creator.name } replied" : "#{ notification.event.creator.name }:" } #{ strip_tags(notification.event.comment.body_html).truncate(200) }" %>
<% else %>
<%= notification_body(notification) %>
<% end %>
</div>
<div class="tray__item-meta overflow-ellipsis translucent"><%= notification.bubble.bucket.name %> · <%= local_datetime_tag(notification.created_at, style: :ago) %></div>
</div>
<% end %>
<% end %>