The notification body has been extracted to a new partial to allow notifications without link to be rendered without needing an if-else duplicating view code. Note the `link_to_if` at _notification partial, as well as the optional body attribute.
18 lines
434 B
Plaintext
18 lines
434 B
Plaintext
<p>
|
|
<% if notification && notification.notifiable_action %>
|
|
<em>
|
|
<%= t("notifications.notification.action.#{notification.notifiable_action}",
|
|
count: notification.counter) %>
|
|
</em>
|
|
<% end %>
|
|
<strong id="<%= dom_id(notification) if notification %>_title">
|
|
<%= title %>
|
|
</strong>
|
|
<% if body %>
|
|
<p><%= body %></p>
|
|
<% end %>
|
|
</p>
|
|
<p class="time">
|
|
<%= l(timestamp, format: :datetime) %>
|
|
</p>
|