Files
nairobi/app/views/notifications/_notification_body.html.erb
Bertocq a683fcff98 Refactor notification partials and index view
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.
2018-07-25 18:31:41 +02:00

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>