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
<%# Compact unread-notifications card. Big tabular number + label; the whole card links to the inbox.
    Zero unread shows the calm all-caught-up line instead of a 0. %>
<div>
  <%= render WidgetHeaderComponent.new(title: t('overview.widgets.unread_summary')) %>
  <%= link_to helpers.organisation_notifications_path(organisation_id: organisation.id),
        class: "block p-5 bg-cream-50 border border-cream-300 rounded-lg hover:border-cobalt-400 transition-colors" do %>
    <% if unread_count.positive? %>
      <div class="flex items-baseline gap-2">
        <span class="font-mono text-4xl font-bold tracking-tight text-cobalt-600 tabular-nums"><%= unread_count %></span>
        <span class="font-mono text-sm text-cream-600"><%= t('overview.widgets.unread_summary_label') %></span>
      </div>
    <% else %>
      <div class="flex items-center gap-2 text-cream-600">
        <i class="bi bi-check2-circle text-lg" aria-hidden="true"></i>
        <span class="font-mono text-sm"><%= t('dashboard.briefing.no_unread_notifications') %></span>
      </div>
    <% end %>
  <% end %>
</div>