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.

828 B
Raw Blame
<%# Renders the notification override hint for a ticket %>
<% subscription = local_assigns[:subscription] || NotificationSubscription.for_user(user).for_item(item).first %>
<% watching = subscription&.mode_follow? || false %>
<% auto_state = item.is_a?(Ticket) && (item.assignee_ids.include?(user.id) || (item.creator_id == user.id && user.ticket_auto_follow_created?)) %>
<div id="notification_override_hint_<%= item.class.name.underscore %>_<%= item.id %>">
  <% if watching != auto_state %>
    <div class="text-xs text-gray-500 flex items-center gap-1">
      <i class="bi bi-bell<%= watching ? '' : '-slash' %>" style="font-size: 10px;"></i>
      <%= watching ? t('views.shared.notification_override_hint.manually_enabled') : t('views.shared.notification_override_hint.manually_disabled') %>
    </div>
  <% end %>
</div>