From afb3af3a108a006be5f2d964a223a017abceba71 Mon Sep 17 00:00:00 2001 From: Catalin Date: Tue, 19 Dec 2023 12:50:44 +0200 Subject: [PATCH 1/4] fix hdx_license_list helper --- ckanext-hdx_theme/ckanext/hdx_theme/helpers/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/helpers.py b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/helpers.py index 243d2cf4ac..e93cc01d8e 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/helpers.py +++ b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/helpers.py @@ -687,7 +687,7 @@ def hdx_popular(type_, number, min=1, title=None): def hdx_license_list(): - license_touple_list = base.model.Package.get_license_options() + license_touple_list = model.Package.get_license_options() license_dict_list = [{'value': _id, 'text': _title} for _title, _id in license_touple_list] return license_dict_list From aad427b9fa2164d3f74db6fcf1d36b6b0271a9da Mon Sep 17 00:00:00 2001 From: Catalin Date: Tue, 19 Dec 2023 15:20:16 +0200 Subject: [PATCH 2/4] fix werkzeug.local.LocalProxy object has no attribute group_dict error --- .../hdx_theme/templates/group/read_base.html | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/group/read_base.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/group/read_base.html index 053e4c3e7e..2440f65ca8 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/group/read_base.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/group/read_base.html @@ -1,43 +1,43 @@ {% extends "page.html" %} -{% block subtitle %}{{ c.group_dict.display_name }}{% endblock %} +{% block subtitle %}{{ group_dict.display_name }}{% endblock %} {% block breadcrumb_content %} {% snippet "snippets/other_breadcrumb_item.html", title=_('Groups'), controller='group', action='index', position=2 %} - + {% endblock %} {% block page_header %}

- {{ c.group_dict.display_name }} + {{ group_dict.display_name }}

- {{ h.follow_button('group', c.group_dict.id) }} + {{ h.follow_button('group', group_dict.id) }}
{% if self.content_action() | trim %}
{% block content_action %} - {% if h.check_access('group_update', {'id': c.group_dict.id}) %} - {% link_for _('Edit'), controller='group', action='edit', id=c.group_dict.name, class_='btn', icon='wrench' %} + {% if h.check_access('group_update', {'id': group_dict.id}) %} + {% link_for _('Edit'), controller='group', action='edit', id=group_dict.name, class_='btn', icon='wrench' %} {% endif %} {% endblock %}
{% endif %}
- {% if c.group_dict.description %} + {% if group_dict.description %}

- {{ c.group_dict.description }} + {{ group_dict.description }}

{% else %}

{{ _('There is no description for this group') }}

@@ -46,7 +46,7 @@

{% endblock %} {% block secondary_content %} - {% snippet "group/snippets/info.html", group=c.group_dict, show_nums=true %} + {% snippet "group/snippets/info.html", group=group_dict, show_nums=true %} {% endblock %} {% block links %} From 6489377137d6e9d1a77ca8969dbfbf004ed8a932 Mon Sep 17 00:00:00 2001 From: Catalin Date: Tue, 19 Dec 2023 15:20:41 +0200 Subject: [PATCH 3/4] update routes --- .../ckanext/hdx_theme/templates/package/hdx_read.html | 2 +- .../hdx_theme/templates/snippets/other_sidebar_links.html | 2 +- .../ckanext/hdx_theme/templates/user/dashboard.html | 4 ++-- .../hdx_theme/templates/user/snippets/followee_dropdown.html | 4 ++-- .../ckanext/hdx_theme/tests/test_pages/test_page_load.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/package/hdx_read.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/package/hdx_read.html index 67f68a71c7..764c84af3d 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/package/hdx_read.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/package/hdx_read.html @@ -175,7 +175,7 @@

{{_('Related Showcases')}}

{% snippet 'package/snippets/activity_stream.html', activity_stream=hdx_activities, id=pkg.id, object_type='package' %}
{% if h.follow_status('dataset', pkg.name) %} - See more in your dashboard + See more in your dashboard {% endif %}

diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/snippets/other_sidebar_links.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/snippets/other_sidebar_links.html index 9734dae08b..1c2d594d91 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/snippets/other_sidebar_links.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/snippets/other_sidebar_links.html @@ -1,6 +1,6 @@

{{ _('Misc') }}

- View {{ _('Activity Stream') }} + View {{ _('Activity Stream') }}

diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/user/dashboard.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/user/dashboard.html index 61efd250f9..920b3d249f 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/user/dashboard.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/user/dashboard.html @@ -25,7 +25,7 @@

{% block page_header %}