diff --git a/ckanext/crc1153/controllers/crcSpecificMetadataController.py b/ckanext/crc1153/controllers/crcSpecificMetadataController.py index 673df60..52abaea 100644 --- a/ckanext/crc1153/controllers/crcSpecificMetadataController.py +++ b/ckanext/crc1153/controllers/crcSpecificMetadataController.py @@ -57,8 +57,8 @@ def save_metadata(): # raise return toolkit.abort(500, "") - if Commons.check_plugin_enabled("semantic_media_wiki"): - return redirect(h.url_for('semantic_media_wiki.machines_view', id=str(package_name) , _external=True)) + if Commons.check_plugin_enabled("machine_link"): + return redirect(h.url_for('machine_link.machines_view', id=str(package_name) , _external=True)) return redirect(h.url_for('dataset.read', id=str(package_name) , _external=True)) diff --git a/ckanext/crc1153/controllers/systemStatsController.py b/ckanext/crc1153/controllers/systemStatsController.py index 9d399c0..99dc07f 100644 --- a/ckanext/crc1153/controllers/systemStatsController.py +++ b/ckanext/crc1153/controllers/systemStatsController.py @@ -6,7 +6,7 @@ from sqlalchemy.sql.expression import false from ckan.model import Package, Group, User -if Commons.check_plugin_enabled("semantic_media_wiki"): +if Commons.check_plugin_enabled("machine_link"): from ckanext.semantic_media_wiki.libs.media_wiki import Helper as machineHelper if Commons.check_plugin_enabled("sample_link"): @@ -82,7 +82,7 @@ def get_user_count(): @staticmethod def get_linked_machines_count(): - if not Commons.check_plugin_enabled("semantic_media_wiki"): + if not Commons.check_plugin_enabled("machine_link"): return [0, 0] count = 0 dataset_count = 0 @@ -213,7 +213,7 @@ def get_dataset_with_publication(): @staticmethod def get_dataset_with_machines(): - if not Commons.check_plugin_enabled("semantic_media_wiki"): + if not Commons.check_plugin_enabled("machine_link"): return [] result_datasets = [] dataset_found = False diff --git a/ckanext/crc1153/libs/crc_layout/helpers.py b/ckanext/crc1153/libs/crc_layout/helpers.py index 3d9ec9f..7d3d562 100644 --- a/ckanext/crc1153/libs/crc_layout/helpers.py +++ b/ckanext/crc1153/libs/crc_layout/helpers.py @@ -10,7 +10,7 @@ class Helper(): @staticmethod def stages_count(): - plugins_with_stages = ['crc1153_specific_metadata', 'organization_group', 'semantic_media_wiki', 'sample_link'] + plugins_with_stages = ['crc1153_specific_metadata', 'organization_group', 'machine_link', 'sample_link'] enabled_plugins = toolkit.config.get("ckan.plugins") count = 0 for pl in plugins_with_stages: diff --git a/ckanext/crc1153/libs/crc_profile/helpers.py b/ckanext/crc1153/libs/crc_profile/helpers.py index 2b8bb6c..1d25cb2 100644 --- a/ckanext/crc1153/libs/crc_profile/helpers.py +++ b/ckanext/crc1153/libs/crc_profile/helpers.py @@ -11,7 +11,7 @@ if Commons.check_plugin_enabled("dataset_reference"): from ckanext.dataset_reference.models.package_reference_link import PackageReferenceLink -if Commons.check_plugin_enabled("semantic_media_wiki"): +if Commons.check_plugin_enabled("machine_link"): from ckanext.semantic_media_wiki.libs.media_wiki import Helper as mediaWikiHelper if Commons.check_plugin_enabled("sample_link"): from ckanext.semantic_media_wiki.libs.sample_link import SampleLinkHelper @@ -50,7 +50,7 @@ def get_linked_publication(dataset_name): @staticmethod def get_linked_machines(resource_id): - if not Commons.check_plugin_enabled("semantic_media_wiki"): + if not Commons.check_plugin_enabled("machine_link"): return {} # a dict of machines [machine_name:machine_link] return mediaWikiHelper.get_machine_link(resource_id) diff --git a/ckanext/crc1153/templates/package/resource_read.html b/ckanext/crc1153/templates/package/resource_read.html index c0216ad..b7d02b9 100644 --- a/ckanext/crc1153/templates/package/resource_read.html +++ b/ckanext/crc1153/templates/package/resource_read.html @@ -108,11 +108,11 @@ {% endif %} {# machine links #} - {% if h.is_plugin_enabled("semantic_media_wiki") %} + {% if h.is_plugin_enabled("machine_link") %} {% asset 'ckanext-semantic-media-wiki/resource-machine-js' %}