From 870dc7a179c12b13bafd553a4aee4173dded4a93 Mon Sep 17 00:00:00 2001 From: Jhon Date: Thu, 10 Oct 2024 17:56:21 -0400 Subject: [PATCH] Fixes interference with assign form Issue: documentacao-e-tarefas/scielo#707 Signed-off-by: Jhon --- classes/dispatchers/DatasetTabDispatcher.php | 2 ++ js/DataverseWorkflowPage.js | 6 +++++- locale/en/locale.po | 6 ++++++ locale/es/locale.po | 6 ++++++ locale/pt_BR/locale.po | 6 ++++++ templates/datasetTab/datasetData.tpl | 4 ++-- version.xml | 4 ++-- 7 files changed, 29 insertions(+), 5 deletions(-) diff --git a/classes/dispatchers/DatasetTabDispatcher.php b/classes/dispatchers/DatasetTabDispatcher.php index 081c68bc..57cc6695 100644 --- a/classes/dispatchers/DatasetTabDispatcher.php +++ b/classes/dispatchers/DatasetTabDispatcher.php @@ -143,6 +143,7 @@ private function setupResearchDataDeposit(Submission $submission): void $templateMgr->setState([ 'dataversePluginApiUrl' => $dataversePluginApiUrl, + 'loadingCitationMsg' => __('plugins.generic.dataverse.metadataForm.loadingDatasetCitation'), 'hasDepositedDataset' => false ]); } @@ -212,6 +213,7 @@ private function setupResearchDataUpdate(Submission $submission, DataverseStudy 'confirmPublishDatasetMessage' => __('plugins.generic.dataverse.modal.confirmDatasetPublish', [ 'serverUrl' => $configuration->getDataverseServerUrl(), ]), + 'loadingCitationMsg' => __('plugins.generic.dataverse.metadataForm.loadingDatasetCitation'), 'datasetCitationUrl' => $dispatcher->url($request, Application::ROUTE_API, $context->getPath(), 'datasets/' . $study->getId() . '/citation'), 'canSendEmail' => in_array(Role::ROLE_ID_MANAGER, $userRoles), 'hasDepositedDataset' => true diff --git a/js/DataverseWorkflowPage.js b/js/DataverseWorkflowPage.js index d55a8178..2458146e 100644 --- a/js/DataverseWorkflowPage.js +++ b/js/DataverseWorkflowPage.js @@ -23,6 +23,10 @@ var DataverseWorkflowPage = $.extend(true, {}, pkp.controllers.WorkflowPage, { }, datasetIsPublished: function () { + if (this.datasetIsLoading) { + return true; + } + return this.dataset.versionState === 'RELEASED'; }, @@ -225,7 +229,7 @@ var DataverseWorkflowPage = $.extend(true, {}, pkp.controllers.WorkflowPage, { return; } var self = this; - this.datasetCitation = this.__('common.loading') + '...'; + this.datasetCitation = this.loadingCitationMsg; $.ajax({ url: self.datasetCitationUrl, data: { diff --git a/locale/en/locale.po b/locale/en/locale.po index af6ec685..5573beb3 100644 --- a/locale/en/locale.po +++ b/locale/en/locale.po @@ -217,6 +217,12 @@ msgstr "Publish research data" msgid "plugins.generic.dataverse.dataset.titlePrefix" msgstr "Replication data for: " +msgid "plugins.generic.dataverse.metadataForm.loadingDataset" +msgstr "Loading research data information..." + +msgid "plugins.generic.dataverse.metadataForm.loadingDatasetCitation" +msgstr "Loading citation..." + msgid "plugins.generic.dataverse.metadataForm.title" msgstr "Title" diff --git a/locale/es/locale.po b/locale/es/locale.po index df686e45..235bc84e 100644 --- a/locale/es/locale.po +++ b/locale/es/locale.po @@ -220,6 +220,12 @@ msgstr "Publicar datos de investigación" msgid "plugins.generic.dataverse.dataset.titlePrefix" msgstr "Datos de réplica: " +msgid "plugins.generic.dataverse.metadataForm.loadingDataset" +msgstr "Cargando información de los datos de investigación..." + +msgid "plugins.generic.dataverse.metadataForm.loadingDatasetCitation" +msgstr "Cargando citación..." + msgid "plugins.generic.dataverse.metadataForm.title" msgstr "Título" diff --git a/locale/pt_BR/locale.po b/locale/pt_BR/locale.po index b1bd5895..bb9b542a 100644 --- a/locale/pt_BR/locale.po +++ b/locale/pt_BR/locale.po @@ -220,6 +220,12 @@ msgstr "Publicar dados de pesquisa" msgid "plugins.generic.dataverse.dataset.titlePrefix" msgstr "Dados de replicação para: " +msgid "plugins.generic.dataverse.metadataForm.loadingDataset" +msgstr "Carregando informações dos dados de pesquisa..." + +msgid "plugins.generic.dataverse.metadataForm.loadingDatasetCitation" +msgstr "Carregando citação..." + msgid "plugins.generic.dataverse.metadataForm.title" msgstr "Título" diff --git a/templates/datasetTab/datasetData.tpl b/templates/datasetTab/datasetData.tpl index f12b46a3..97786b1a 100644 --- a/templates/datasetTab/datasetData.tpl +++ b/templates/datasetTab/datasetData.tpl @@ -1,8 +1,8 @@ - {{ __('common.loading')}} ... + {translate key="plugins.generic.dataverse.metadataForm.loadingDataset"} -
+

{translate key="plugins.generic.dataverse.researchData"} diff --git a/version.xml b/version.xml index 7323f3f5..bd58a46a 100644 --- a/version.xml +++ b/version.xml @@ -13,8 +13,8 @@ dataverse plugins.generic - 3.1.0.0 - 2024-09-30 + 3.1.1.0 + 2024-10-10 1 DataversePlugin