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
<%# Recent unread mentions. Each row links to the mention's source (notification_target_path resolves
    the polymorphic notifiable) and names who mentioned the viewer. Empty -> calm in-card line. %>
<div>
  <%= render WidgetHeaderComponent.new(title: t('overview.widgets.my_mentions')) %>
  <% if mentions.any? %>
    <ul class="divide-y divide-cream-200 border border-cream-300 rounded-lg bg-cream-50 overflow-hidden">
      <% mentions.each do |mention| %>
        <li>
          <%= link_to helpers.notification_target_path(mention),
                class: "flex items-center gap-3 px-4 py-2.5 hover:bg-cream-100 transition-colors" do %>
            <i class="bi bi-at text-cobalt-600 shrink-0" aria-hidden="true"></i>
            <span class="flex-1 truncate text-sm text-cream-900"><%= mention.actor && helpers.viewer_display_name(mention.actor) %></span>
            <span class="font-mono text-xs text-cream-500 shrink-0"><%= helpers.time_ago_in_words(mention.created_at) %></span>
          <% end %>
        </li>
      <% end %>
    </ul>
  <% else %>
    <%= render WidgetEmptyComponent.new(message: t('overview.mentions.empty')) %>
  <% end %>
</div>