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
<%# Bulk archive-all response. Uses the same master list refresh
    pattern as update.turbo_stream.erb (date header + empty state
    are re-rendered correctly via the presenter). %>
<% 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 %>

<% unread_count = current_user.unread_notifications_count(current_organisation) %>
<%= 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 %>