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

26 lines
1.3 KiB
Plaintext

<% cache notification do %>
<%= notification_tag notification do %>
<div class="notification__content border-radius pad shadow fill-white flex align-start txt-align-start gap">
<div class="avatar txt-small flex-item-no-shrink">
<%= avatar_image_tag(notification.creator) %>
</div>
<div class="flex flex-column txt-tight-lines min-width flex-item-grow">
<strong class="overflow-ellipsis"><%= notification_title(notification) %></strong>
<div class="overflow-ellipsis">
<% 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="overflow-ellipsis translucent"><%= notification.bubble.bucket.name %> · <%= local_datetime_tag(notification.created_at, style: :ago) %></div>
</div>
<div class="notification__unread_indicator flex flex-column flex-item-justify-end">
<div class="dot flex-item-no-shrink"></div>
</div>
</div>
<% end %>
<% end %>