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.0 KB
Raw Blame
<%# Bulk mark-all-read response. Uses the same master list refresh pattern
    as update.turbo_stream.erb, so that date headers and the empty state are
    re-rendered correctly. %>
<% presenter = build_master_list_presenter %>

<%= turbo_stream.replace 'inbox_master_list' do %>
  <%= render 'master_list',
             presenter: presenter,
             selected_notification: @selected_notification,
             query_context: presenter_query_context(presenter) %>
<% end %>

<%= turbo_stream.replace 'inbox_unread_count_banner' do %>
  <div id="inbox_unread_count_banner">
    <% if @unread_count.to_i > 0 && show_unread_banner? %>
      <div class="mb-4 p-3 bg-lime-50 border border-lime-200 rounded-lg">
        <p class="text-sm text-lime-800 font-medium">
          <%= t('organisations.notifications.index.unread_notifications', count: @unread_count) %>
        </p>
      </div>
    <% end %>
  </div>
<% end %>

<%# Unread count: sidebar frame + count-data frame, one owner. %>
<%= render 'notifications/unread_count_streams', unread_count: @unread_count.to_i %>