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.6 KB
Raw Blame
<%# Project-dashboard binding of the shared inline editor (shared/dashboards/_editor). Everything
    surface-specific is computed HERE and handed down as locals: the turbo-frame id (must match the
    read view's frame in projects/show), the editor routes, the title box, the widget registry, and
    the project's 4-scope save-target partial. The overview renders the SAME shared body from its own
    thin edit view with the org-scoped values (DRY: one editor body, two bindings). %>
<%= render 'shared/dashboards/editor',
      frame_id: 'dashboard',
      title: @project.name,
      subtitle: t('dashboard.configuration.title'),
      title_variant: :project,
      preview_url: widget_preview_organisation_project_dashboard_configuration_path(@current_organisation, @project),
      update_url: organisation_project_dashboard_configuration_path(@current_organisation, @project),
      done_url: organisation_project_path(@current_organisation, @project),
      reset_url: reset_organisation_project_dashboard_configuration_path(@current_organisation, @project),
      registry: Dashboards::LayoutEngine::WIDGET_REGISTRY,
      base_params: { project: @project, user: current_user },
      save_scopes_partial: 'organisations/dashboard_configurations/save_scopes',
      widget_settings_partial: 'organisations/dashboard_configurations/widget_settings',
      default_scope: 'personal_this',
      confirm_scopes: %w[personal_all default_all],
      stats_widget_keys: %w[stats_cards],
      configuration: @configuration,
      available_widgets: @available_widgets,
      smart_folders: @smart_folders %>