From a646b491251c3554230f488f4b2ac6b4bd9ae4f8 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:12:15 +0200 Subject: [PATCH] Add patch to fix ckanext-pages - org/group templates using c.group_dict instead of newer group_dict. https://github.com/mjanez/ckanext-pages/pull/2 --- .../ckanext-pages/01_org_group_templates | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 ckan/patches/ckanext-pages/01_org_group_templates diff --git a/ckan/patches/ckanext-pages/01_org_group_templates b/ckan/patches/ckanext-pages/01_org_group_templates new file mode 100644 index 0000000..94b74a6 --- /dev/null +++ b/ckan/patches/ckanext-pages/01_org_group_templates @@ -0,0 +1,30 @@ +diff --git a/ckanext/pages/theme/templates_group/group/read_base.html b/ckanext/pages/theme/templates_group/group/read_base.html +index bbdae8f..6bf00fa 100644 +--- a/ckanext/pages/theme/templates_group/group/read_base.html ++++ b/ckanext/pages/theme/templates_group/group/read_base.html +@@ -3,8 +3,8 @@ + {% block content_primary_nav %} + {{ super() }} + {% if h.ckan_version().split('.')[1] | int >= 9 %} +- {{ h.build_nav_icon('pages.group_pages_index', _('Pages'), id=c.group_dict.name, icon='file') }} ++ {{ h.build_nav_icon('pages.group_pages_index', _('Pages'), id=group_dict.name, icon='file') }} + {% else %} +- {{ h.build_nav_icon('group_pages_index', _('Pages'), id=c.group_dict.name, icon='file') }} ++ {{ h.build_nav_icon('group_pages_index', _('Pages'), id=group_dict.name, icon='file') }} + {% endif %} + {% endblock %} +diff --git a/ckanext/pages/theme/templates_organization/organization/read_base.html b/ckanext/pages/theme/templates_organization/organization/read_base.html +index e5f3b47..eb2f39b 100644 +--- a/ckanext/pages/theme/templates_organization/organization/read_base.html ++++ b/ckanext/pages/theme/templates_organization/organization/read_base.html +@@ -3,8 +3,8 @@ + {% block content_primary_nav %} + {{ super() }} + {% if h.ckan_version().split('.')[1] | int >= 9 %} +- {{ h.build_nav_icon('pages.organization_pages_index', _('Pages'), id=c.group_dict.name, icon='file') }} ++ {{ h.build_nav_icon('pages.organization_pages_index', _('Pages'), id=group_dict.name, icon='file') }} + {% else %} +- {{ h.build_nav_icon('organization_pages_index', _('Pages'), id=c.group_dict.name, icon='file') }} ++ {{ h.build_nav_icon('organization_pages_index', _('Pages'), id=group_dict.name, icon='file') }} + {% endif %} + {% endblock %}