Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

1.1 KB
Raw Blame
<% if @actor %>
  <div class="actor-info">
    <span class="actor-name"><%= @actor.full_name %></span> 
    <%= @notification.payload['action']&.humanize || 'performed an action' %>
  </div>
<% end %>

<% if @notification.notifiable %>
  <p>
    <strong>Item:</strong> <%= @notification.notifiable.try(:title) || @notification.notifiable.try(:name) || @notification.notifiable.class.name %>
  </p>
<% end %>

<% if @notification.payload.present? %>
  <div style="margin: 16px 0; padding: 16px; background-color: #f8fafc; border-radius: 6px;">
    <% @notification.payload.each do |key, value| %>
      <% next if %w[activity_id actor_name action parameters].include?(key.to_s) %>
      <strong><%= key.humanize %>:</strong> <%= value %><br>
    <% end %>
  </div>
<% end %>

<a href="<%= @action_url %>" class="action-button">View Details</a>

<p style="margin-top: 24px; color: #6b7280; font-size: 14px;">
  <% if @notification.group_count > 1 %>
    This notification includes <%= pluralize(@notification.group_count, 'related activity', 'related activities') %>.
  <% end %>
</p>