8000 Shortcut to edit a page after copying · Issue #13117 · wagtail/wagtail · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Shortcut to edit a page after copying #13117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
thibaudcolas opened this issue May 15, 2025 · 4 comments · May be fixed by #13129
Open

Shortcut to edit a page after copying #13117

thibaudcolas opened this issue May 15, 2025 · 4 comments · May be fixed by #13129

Comments

@thibaudcolas
Copy link
Member

Is your proposal related to a problem?

I wanted to create a new page by copying an existing one, so I used the dashboard’s search feature to find the existing page. Then used the "Copy" action from the filtered page explorer. From there, successfully copying takes you back to the "root" view of the page explorer, and I still need to find my way to the page I just copied in order to edit it. This takes a lot of time.

Describe the solution you'd like

It would be nice if the "Page [title] copied" success message just had a link / button to edit the copied page. That way I can directly proceed with the next step, rather than having to search my newly-created page.

Describe alternatives you've considered

An alternative could be to redirect to the listing view of the parent page always, rather than to the "next URL", but this seems like it’d just cater for fewer scenarios.

Additional context

Here is where the copying success messages are defined:

if form.cleaned_data.get("copy_subpages"):
messages.success(
request,
_("Page '%(page_title)s' and %(subpages_count)s subpages copied.")
% {
"page_title": page.specific_deferred.get_admin_display_title(),
"subpages_count": new_page.get_descendants().count(),
},
)
else:
messages.success(
request,
_("Page '%(page_title)s' copied.")
% {"page_title": page.specific_deferred.get_admin_display_title()},
)

The new button I’m after is already implemented for the "move" action:

messages.success(
request,
_("Page '%(page_title)s' moved.")
% {"page_title": page_to_move.get_admin_display_title()},
buttons=[
messages.button(
reverse("wagtailadmin_pages:edit", args=(page_to_move.id,)),
_("Edit"),
)
],
)

Working on this

Anyone can contribute to this. Since this is already implemented for "move", it should be a case of copying and adapting that implementation, then manual testing + writing unit tests. View our contributing guidelines, add a comment to the issue once you’re ready to start.

@dhruvipatel14
Copy link
Contributor

Hi @thibaudcolas , I would like to work on this.

@akshatggupta
Copy link
akshatggupta commented May 17, 2025

Hi @dhruvipatel14 , just checking in — are you still working on this issue?
I believe I’ve found a solution to the point raised by @thibaudcolas
If you’re not actively working on it, would it be alright if I go ahead and open a PR?

@dhruvipatel14
Copy link
Contributor

@akshatggupta I am working on this. Can you please look into another issue?

@akshatggupta
Copy link

@dhruvipatel14 Cool, no worries!!!

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

Successfully merging a pull request may close this issue.

3 participants
0