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
This commit is contained in:
mjanez 2024-09-19 15:12:15 +02:00
parent a7c2031f2a
commit a646b49125
No known key found for this signature in database
GPG Key ID: 7A62FDE17C5A4929
1 changed files with 30 additions and 0 deletions

View File

@ -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 %}