From 3265840a1b0858c47b23c64ee648780cd1c6ffde Mon Sep 17 00:00:00 2001 From: maebeale Date: Sun, 2 Aug 2026 10:13:46 -0400 Subject: [PATCH 1/7] Move dashboard form links into a Forms dropdown Consolidate the dashboard's inline quick-links row into a top-right Forms dropdown (below the sub-nav), reusing the parameterized form_actions_menu partial the registrants page already uses. Its "Manage forms" item deep-links to the Edit-event form-settings section so admins have one obvious path to configure forms. Also clarify the registration display toggle copy: "Show event details at top of registration form". Co-Authored-By: Claude Opus 4.8 (1M context) --- app/views/events/_form.html.erb | 2 +- app/views/events/_form_actions_menu.html.erb | 9 ++-- app/views/events/dashboard.html.erb | 46 ++++---------------- spec/requests/events_spec.rb | 10 +++++ 4 files changed, 26 insertions(+), 41 deletions(-) diff --git a/app/views/events/_form.html.erb b/app/views/events/_form.html.erb index 7cb00627d4..5280689941 100644 --- a/app/views/events/_form.html.erb +++ b/app/views/events/_form.html.erb @@ -352,7 +352,7 @@
- +

Add an at-a-glance list of dates, time, platform/location, fee, and deadline above the registration form. Pulled from this event's details.

diff --git a/app/views/events/_form_actions_menu.html.erb b/app/views/events/_form_actions_menu.html.erb index 9de3fe0e61..d02f32b524 100644 --- a/app/views/events/_form_actions_menu.html.erb +++ b/app/views/events/_form_actions_menu.html.erb @@ -1,3 +1,6 @@ +<% button_label = local_assigns.fetch(:button_label, "Form actions") %> +<% manage_label = local_assigns.fetch(:manage_label, "Change form settings") %> +<% sample_return_to = local_assigns.fetch(:sample_return_to, "registrants") %> <% dropdown_id = "form-actions-menu-#{SecureRandom.hex(4)}" %> <% item_class = "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50" %>
@@ -5,7 +8,7 @@ data-action="dropdown#toggle" data-dropdown-payload-param='[{"<%= dropdown_id %>":"hidden"}]' class="btn btn-utility-outline"> - Form actions + <%= button_label %> @@ -23,11 +26,11 @@ <%= link_to "Bulk payment form", new_event_bulk_payment_path(@event), class: item_class, target: "_blank", rel: "noopener noreferrer" %> <% end %>
- <%= link_to "Change form settings", edit_event_path(@event, anchor: "registration_form_section"), class: item_class %> + <%= link_to manage_label, edit_event_path(@event, anchor: "registration_form_section"), class: item_class %> <% else %> <%= link_to "Enable forms", edit_event_path(@event, anchor: "registration_form_section"), class: item_class %> <% end %>
- <%= link_to "Sample ticket", sample_ticket_event_path(@event, return_to: "registrants"), class: item_class, target: "_blank", rel: "noopener noreferrer" %> + <%= link_to "Sample ticket", sample_ticket_event_path(@event, return_to: sample_return_to), class: item_class, target: "_blank", rel: "noopener noreferrer" %>
diff --git a/app/views/events/dashboard.html.erb b/app/views/events/dashboard.html.erb index 553935f130..b42a98c40a 100644 --- a/app/views/events/dashboard.html.erb +++ b/app/views/events/dashboard.html.erb @@ -6,6 +6,15 @@ <%= render "events/subnav", event: @event, current: :dashboard %>
+ <%# Forms dropdown — sits top-right below the sub-nav, holding the public form + links, the sample-ticket preview, and "Manage forms" (the Edit-event form + settings section). %> + <% if allowed_to?(:edit?, @event) %> +
+ <%= render "form_actions_menu", button_label: "Forms", manage_label: "Manage forms", sample_return_to: "dashboard" %> +
+ <% end %> + <%# Centered title block %>
<%= link_to @event.decorate.compact_label, edit_event_path(@event), title: @event.title, class: "text-sm font-semibold text-gray-500 uppercase tracking-wide hover:text-gray-700" %> @@ -20,43 +29,6 @@
- <%# Quick links: registration forms and bulk payment. Each form link is gated by - its event setting — registration on an associated registration form, scholarship - on that form plus the "Enable scholarship application" checkbox (which is what - creates the scholarship event_form). The scholarship link points at the public - registration page, so it also needs the registration form or it dead-ends there. - Bulk payment is gated on the event having a bulk payment form. - Links open in a new tab. %> - <% link_base = "inline-flex items-center gap-2 rounded-lg border bg-white px-3 py-2 text-sm font-medium shadow-sm transition-colors" %> -
- <% if @event.event_forms.registration.exists? %> - <%= link_to new_event_public_registration_path(@event), target: "_blank", rel: "noopener noreferrer", - class: "#{link_base} #{DomainTheme.border_class_for(:events, intensity: 200)} text-gray-700 hover:#{DomainTheme.border_class_for(:events, intensity: 300)} hover:bg-gray-50" do %> - - Public registration form - - <% end %> - <% end %> - - <% if @event.event_forms.registration.exists? && @event.scholarship_form %> - <%= link_to new_event_public_registration_path(@event, scholarship_requested: true), target: "_blank", rel: "noopener noreferrer", - class: "#{link_base} #{DomainTheme.border_class_for(:scholarships, intensity: 200)} text-gray-700 hover:#{DomainTheme.border_class_for(:scholarships, intensity: 300)} hover:bg-gray-50" do %> - - Scholarship form - - <% end %> - <% end %> - - <% if @event.bulk_payment_form %> - <%= link_to new_event_bulk_payment_path(@event), target: "_blank", rel: "noopener noreferrer", - class: "#{link_base} #{DomainTheme.border_class_for(:payments, intensity: 200)} text-gray-700 hover:#{DomainTheme.border_class_for(:payments, intensity: 300)} hover:bg-gray-50" do %> - - Bulk payment form - - <% end %> - <% end %> -
- <%# Money cards (paid events only) — shown first %> <% if @dashboard.free? %>
diff --git a/spec/requests/events_spec.rb b/spec/requests/events_spec.rb index 6d17e0e883..756dad9863 100644 --- a/spec/requests/events_spec.rb +++ b/spec/requests/events_spec.rb @@ -1613,6 +1613,16 @@ def ce_chip_text expect(response.body).to include("Bulk payments") expect(response.body).to include(bulk_payments_event_path(event)) end + + it "renders a Forms menu with a Manage forms link to the edit form-settings section" do + create(:event_form, event: event, form: create(:form), role: "registration") + + get dashboard_event_path(event) + + expect(response.body).to include("Forms") + expect(response.body).to include("Manage forms") + expect(response.body).to include(edit_event_path(event, anchor: "registration_form_section")) + end end context "as non-admin non-owner" do From c4269310f7a84c760feecf3613b3504cc641d5d7 Mon Sep 17 00:00:00 2001 From: maebeale Date: Sun, 2 Aug 2026 10:17:29 -0400 Subject: [PATCH 2/7] Rename dashboard Forms dropdown item to 'Edit form settings' Co-Authored-By: Claude Opus 4.8 (1M context) --- app/views/events/dashboard.html.erb | 6 +++--- spec/requests/events_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/events/dashboard.html.erb b/app/views/events/dashboard.html.erb index b42a98c40a..3596842565 100644 --- a/app/views/events/dashboard.html.erb +++ b/app/views/events/dashboard.html.erb @@ -7,11 +7,11 @@
<%# Forms dropdown — sits top-right below the sub-nav, holding the public form - links, the sample-ticket preview, and "Manage forms" (the Edit-event form - settings section). %> + links, the sample-ticket preview, and "Edit form settings" (the Edit-event + form settings section). %> <% if allowed_to?(:edit?, @event) %>
- <%= render "form_actions_menu", button_label: "Forms", manage_label: "Manage forms", sample_return_to: "dashboard" %> + <%= render "form_actions_menu", button_label: "Forms", manage_label: "Edit form settings", sample_return_to: "dashboard" %>
<% end %> diff --git a/spec/requests/events_spec.rb b/spec/requests/events_spec.rb index 756dad9863..48a7e932d8 100644 --- a/spec/requests/events_spec.rb +++ b/spec/requests/events_spec.rb @@ -1614,13 +1614,13 @@ def ce_chip_text expect(response.body).to include(bulk_payments_event_path(event)) end - it "renders a Forms menu with a Manage forms link to the edit form-settings section" do + it "renders a Forms menu with an Edit form settings link to the edit form-settings section" do create(:event_form, event: event, form: create(:form), role: "registration") get dashboard_event_path(event) expect(response.body).to include("Forms") - expect(response.body).to include("Manage forms") + expect(response.body).to include("Edit form settings") expect(response.body).to include(edit_event_path(event, anchor: "registration_form_section")) end end From 0f6d6b41b7bb8862fafaafca07cbff69895f3727 Mon Sep 17 00:00:00 2001 From: maebeale Date: Sun, 2 Aug 2026 10:21:45 -0400 Subject: [PATCH 3/7] Unify the Forms dropdown across dashboard and registrants pages Both pages share _form_actions_menu, so make its defaults the shared labels (Forms button, Edit form settings) and rename the public-form items to Registration form / Scholarship form. Only sample_return_to differs per page so each eyebrow returns to its origin. Co-Authored-By: Claude Opus 4.8 (1M context) --- app/views/events/_form_actions_menu.html.erb | 8 ++++---- app/views/events/dashboard.html.erb | 2 +- app/views/events/sample_ticket.html.erb | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/events/_form_actions_menu.html.erb b/app/views/events/_form_actions_menu.html.erb index d02f32b524..e0e5bcb993 100644 --- a/app/views/events/_form_actions_menu.html.erb +++ b/app/views/events/_form_actions_menu.html.erb @@ -1,5 +1,5 @@ -<% button_label = local_assigns.fetch(:button_label, "Form actions") %> -<% manage_label = local_assigns.fetch(:manage_label, "Change form settings") %> +<% button_label = local_assigns.fetch(:button_label, "Forms") %> +<% manage_label = local_assigns.fetch(:manage_label, "Edit form settings") %> <% sample_return_to = local_assigns.fetch(:sample_return_to, "registrants") %> <% dropdown_id = "form-actions-menu-#{SecureRandom.hex(4)}" %> <% item_class = "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50" %> @@ -17,10 +17,10 @@ class="hidden absolute right-0 z-10 mt-1 bg-white border border-gray-200 rounded-md shadow-lg py-1 min-w-[180px]"> <% if @event.event_forms.registration.exists? || @event.scholarship_form || @event.bulk_payment_form %> <% if @event.event_forms.registration.exists? %> - <%= link_to "Public registration", new_event_public_registration_path(@event), class: item_class, target: "_blank", rel: "noopener noreferrer" %> + <%= link_to "Registration form", new_event_public_registration_path(@event), class: item_class, target: "_blank", rel: "noopener noreferrer" %> <% end %> <% if @event.scholarship_form %> - <%= link_to "Scholarship version", new_event_public_registration_path(@event, scholarship_requested: true), class: item_class, target: "_blank", rel: "noopener noreferrer" %> + <%= link_to "Scholarship form", new_event_public_registration_path(@event, scholarship_requested: true), class: item_class, target: "_blank", rel: "noopener noreferrer" %> <% end %> <% if @event.bulk_payment_form %> <%= link_to "Bulk payment form", new_event_bulk_payment_path(@event), class: item_class, target: "_blank", rel: "noopener noreferrer" %> diff --git a/app/views/events/dashboard.html.erb b/app/views/events/dashboard.html.erb index 3596842565..9a979df633 100644 --- a/app/views/events/dashboard.html.erb +++ b/app/views/events/dashboard.html.erb @@ -11,7 +11,7 @@ form settings section). %> <% if allowed_to?(:edit?, @event) %>
- <%= render "form_actions_menu", button_label: "Forms", manage_label: "Edit form settings", sample_return_to: "dashboard" %> + <%= render "form_actions_menu", sample_return_to: "dashboard" %>
<% end %> diff --git a/app/views/events/sample_ticket.html.erb b/app/views/events/sample_ticket.html.erb index 740d91f4cb..b0a2015590 100644 --- a/app/views/events/sample_ticket.html.erb +++ b/app/views/events/sample_ticket.html.erb @@ -1,7 +1,7 @@ <% content_for(:page_bg_class, "admin-only bg-blue-100") %> -<%# Eyebrow returns the admin to wherever they opened the preview from. The - Form actions menu lives on the registrants page; the dashboard has its own - quick link. Default to the dashboard when the origin is absent/unknown. %> +<%# Eyebrow returns the admin to wherever they opened the preview from — the + Forms menu (shared by the dashboard and registrants page) passes the origin + via return_to. Default to the dashboard when the origin is absent/unknown. %> <% case params[:return_to] when "registrants" %> <% back_label = "← Registrants" %> From 56c696fc86f91423c4d8f243af405ffafa592c5d Mon Sep 17 00:00:00 2001 From: maebeale Date: Sun, 2 Aug 2026 10:32:07 -0400 Subject: [PATCH 4/7] Gate Forms dropdown links by cost and registration form; label public registration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scholarship and bulk payment links only make sense with a fee, so show them only when the event has a cost. The registration link shows only when a registration form is selected, and reads 'Public registration form' when public registration is enabled (the flag reflects public advertising, not access — so it doesn't affect the other links). Co-Authored-By: Claude Opus 4.8 (1M context) --- app/views/events/_form_actions_menu.html.erb | 15 +++++--- spec/requests/events_spec.rb | 37 ++++++++++++++++++++ 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/app/views/events/_form_actions_menu.html.erb b/app/views/events/_form_actions_menu.html.erb index e0e5bcb993..4ba14f3301 100644 --- a/app/views/events/_form_actions_menu.html.erb +++ b/app/views/events/_form_actions_menu.html.erb @@ -15,14 +15,19 @@