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.

2.0 KB
Raw Blame
<%# Save target for the ORGANISATION OVERVIEW: one radio group with two destinations. The overview
    is a single org-level surface, so there is no cross-project "_all" scope (unlike the project
    dashboard's four). `personal` writes the viewer's own overview; `default` writes the shared org
    default and is admin-only (the server re-checks, see SAVE_SCOPES). The radios live OUTSIDE the
    standalone form, so they associate via form="dashboard_edit_form". Values must match SAVE_SCOPES.
    Surface-specific partial — the project dashboard has its own 4-scope version. %>
<div class="mb-6 p-4 bg-surface-raised border-2 border-stroke rounded-lg space-y-2">
  <p class="text-sm font-bold text-ink mb-1"><%= t('dashboard.configuration.save_scope_label') %></p>

  <label class="flex items-start gap-2 cursor-pointer">
    <input type="radio" name="save_scope" value="personal" form="dashboard_edit_form" checked
           class="mt-0.5 w-4 h-4 accent-ink"
           data-action="change->dashboard-inline-edit#changeScope">
    <span>
      <span class="text-sm font-bold text-ink"><%= t('overview.configuration.scope_personal') %></span>
      <span class="block text-xs text-cream-900/60"><%= t('overview.configuration.scope_personal_hint') %></span>
    </span>
  </label>

  <% if @is_admin %>
    <%# Admin-only: writes the shared org default (affects all members) → amber zone. %>
    <div class="border-t border-stroke/10 pt-2 mt-2 space-y-2 bg-amber-50 -mx-4 px-4 pb-2">
      <label class="flex items-start gap-2 cursor-pointer">
        <input type="radio" name="save_scope" value="default" form="dashboard_edit_form"
               class="mt-0.5 w-4 h-4 accent-ink"
               data-action="change->dashboard-inline-edit#changeScope">
        <span>
          <span class="text-sm font-bold text-ink"><%= t('overview.configuration.scope_default') %></span>
          <span class="block text-xs text-cream-900/60"><%= t('overview.configuration.scope_default_hint') %></span>
        </span>
      </label>
    </div>
  <% end %>
</div>