From 2fff11beb06bdd22a27097b9ffab2d789b101656 Mon Sep 17 00:00:00 2001 From: Konstantin Sivakov Date: Mon, 9 May 2022 17:38:27 +0200 Subject: [PATCH 1/3] Add the harvesters tab to ckan admin dashboard --- ckanext/harvest/plugin/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ckanext/harvest/plugin/__init__.py b/ckanext/harvest/plugin/__init__.py index d412fd22..0978051b 100644 --- a/ckanext/harvest/plugin/__init__.py +++ b/ckanext/harvest/plugin/__init__.py @@ -302,6 +302,12 @@ def update_config(self, config): }) # https://github.com/ckan/ckan/pull/4521 config['ckan.legacy_route_mappings'] = json.dumps(mappings) + p.toolkit.add_ckan_admin_tab( + p.toolkit.config, + 'harvest.search', + 'Harvesters', + config_var='ckan.admin_tabs' + ) # IActions From d25c3c7f04679ba7a1d4543decc8e6bdf073f95f Mon Sep 17 00:00:00 2001 From: Konstantin Sivakov Date: Tue, 10 May 2022 15:29:55 +0200 Subject: [PATCH 2/3] Fix lint issue --- ckanext/harvest/plugin/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ckanext/harvest/plugin/__init__.py b/ckanext/harvest/plugin/__init__.py index 0978051b..bc50a8e6 100644 --- a/ckanext/harvest/plugin/__init__.py +++ b/ckanext/harvest/plugin/__init__.py @@ -303,10 +303,10 @@ def update_config(self, config): # https://github.com/ckan/ckan/pull/4521 config['ckan.legacy_route_mappings'] = json.dumps(mappings) p.toolkit.add_ckan_admin_tab( - p.toolkit.config, - 'harvest.search', - 'Harvesters', - config_var='ckan.admin_tabs' + p.toolkit.config, + 'harvest.search', + p.toolkit._('Harvesters'), + config_var='ckan.admin_tabs' ) # IActions From ab2ad310a153fe1932a6d62b98840b777be69043 Mon Sep 17 00:00:00 2001 From: Konstantin Sivakov Date: Tue, 10 May 2022 15:44:28 +0200 Subject: [PATCH 3/3] Fix lint issue --- ckanext/harvest/plugin/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/harvest/plugin/__init__.py b/ckanext/harvest/plugin/__init__.py index bc50a8e6..e0babaf2 100644 --- a/ckanext/harvest/plugin/__init__.py +++ b/ckanext/harvest/plugin/__init__.py @@ -307,7 +307,7 @@ def update_config(self, config): 'harvest.search', p.toolkit._('Harvesters'), config_var='ckan.admin_tabs' - ) + ) # IActions