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
<%# Badge + switch for ONE per-org operator flag in the organisation list.
    Shared by every flag column so badge wording, button and confirm dialog stay
    identical across flags; the controller reads the SAME on/off translations for
    its flash (Admin::OrganisationsController#toggle_flag!).
    Locals: enabled, on_label, off_label, button_label, confirm, path %>
<div class="flex items-center gap-2">
  <% if enabled %>
    <span class="inline-flex items-center px-2 py-1 rounded-md text-xs font-bold bg-lime-100 text-lime-800 border border-lime-300"><%= on_label %></span>
  <% else %>
    <span class="inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-gray-100 text-gray-600 border border-gray-300"><%= off_label %></span>
  <% end %>
  <%= button_to button_label, path,
                method: :patch,
                data: { turbo_confirm: confirm },
                class: 'text-xs px-2 py-1 rounded-md border-2 border-black bg-white hover:bg-gray-100 font-medium shadow-[1px_1px_0_0_#000000]' %>
</div>