From 642947437f72095daafb3f7a5a4a7b04a0f4c78f Mon Sep 17 00:00:00 2001 From: Vipul Narang Date: Thu, 6 Jun 2024 12:18:36 +0530 Subject: [PATCH] Fix editlink in pageadmin to close sideframe --- CHANGELOG.rst | 3 +++ djangocms_pageadmin/admin.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ba51be2..2bb1ae5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog ========= +Unreleased +================= +* Fixed edit link in pageadmin to close sideframe 1.7.0 (2024-05-16) ================== diff --git a/djangocms_pageadmin/admin.py b/djangocms_pageadmin/admin.py index 1171947..e239476 100644 --- a/djangocms_pageadmin/admin.py +++ b/djangocms_pageadmin/admin.py @@ -260,9 +260,10 @@ def _get_edit_link(self, obj, request, disabled=False): args=(version.pk,), ) + # close sideframe as edit will always be on page and not in sideframe return render_to_string( "djangocms_pageadmin/admin/icons/edit.html", - {"url": url, "disabled": disabled, "get": False}, + {"url": url, "disabled": disabled, "get": False, "keepsideframe": False}, ) def _get_duplicate_link(self, obj, request, disabled=False):