Skip to content

Feature - conference duplication#404

Closed
zhouyijun111 wants to merge 10 commits intosnap-cloud:mainfrom
cs169:feature/conference-duplication
Closed

Feature - conference duplication#404
zhouyijun111 wants to merge 10 commits intosnap-cloud:mainfrom
cs169:feature/conference-duplication

Conversation

@zhouyijun111
Copy link
Contributor

What this PR does:

This pull request implements the Conference Duplication feature (Iteration 2): a Duplicate button on the conference dashboard that takes the user to the “new conference” form pre-filled from the selected conference, with title, short title, and dates left for manual input. On create, it copies registration settings, email settings, event types, tracks, rooms, tickets, venue, sponsors, and custom CSS from the source conference, and excludes user-submitted events and attendee data.

Files changed and purpose

File Purpose
app/views/admin/conferences/show.html.haml Add a Duplicate button next to the dashboard title; links to the new conference form with duplicate_from set to the current conference.
app/controllers/admin/conferences_controller.rb new: When duplicate_from is present, build @conference from the source (description, timezone, limits, etc.) and set @duplicate_from_source. create: When duplicating, merge source attributes (description, custom_css, etc.) before save, then call @conference.copy_associations_from(source) after save to copy related data.
app/views/admin/conferences/new.html.haml When duplicating, show an alert and a hidden field duplicate_from so the form posts the source conference identifier back to create.
app/models/conference.rb Add public method copy_associations_from(source) to copy registration_period, email_settings, venue+rooms, tickets, event_types, tracks, difficulty_levels, sponsorship_levels, and sponsors; no copying of events or registrations/ticket_purchases.

Include screenshots, videos, etc.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants