Skip to content

Commit

Permalink
Submission wizard issues fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
GaziYucel committed Feb 27, 2024
1 parent da5b7ae commit 2884b7e
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 29 deletions.
2 changes: 1 addition & 1 deletion CitationManagerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function getSetting($contextId, $name): mixed
switch ($name) {
case 'isTestMode':
$config_value = Config::getVar(CITATION_MANAGER_PLUGIN_NAME, 'isTestMode');
if (!empty($config_value) && (strtolower($config_value) === 'true' || (string)$config_value === '1')){
if (!empty($config_value) && (strtolower($config_value) === 'true' || (string)$config_value === '1')) {
$config_value = true;
} else if (!empty($config_value)) {
$config_value = false;
Expand Down
20 changes: 4 additions & 16 deletions classes/Workflow/SubmissionWizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace APP\plugins\generic\citationManager\classes\Workflow;

use APP\plugins\generic\citationManager\CitationManagerPlugin;
use APP\plugins\generic\citationManager\classes\Db\PluginDAO;

class SubmissionWizard
{
Expand All @@ -27,7 +26,7 @@ public function __construct(CitationManagerPlugin $plugin)
}

/**
* Show citations part on step 3 in submission wizard
* Structured citations on submission wizard page
*
* @param string $hookname
* @param array $args
Expand All @@ -36,19 +35,8 @@ public function __construct(CitationManagerPlugin $plugin)
public function execute(string $hookname, array $args): void
{
$templateMgr = &$args[1];

$submission = $templateMgr->getTemplateVars('submission');
$publication = $submission->getCurrentPublication();

$pluginDao = new PluginDAO();
$this->plugin->templateParameters['publicationMetadata'] =
json_encode($pluginDao->getMetadataPublication($publication->getId()));

$this->plugin->templateParameters['structuredCitations'] =
json_encode($pluginDao->getCitations($publication->getId()));

$templateMgr->assign($this->plugin->templateParameters);

$templateMgr->display($this->plugin->getTemplateResource("submissionWizard.tpl"));
$templateMgr->display(
$this->plugin->getTemplateResource("submissionWizard.tpl")
);
}
}
10 changes: 10 additions & 0 deletions locale/de/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ msgid "plugins.generic.citationManager.citations.empty.description"
msgstr "Es sind keine strukturierten Zitationen vorhanden. Bitte klicken Sie auf den oben stehenden "
"Button \"Verarbeiten\", um die Zitationen zu strukturieren und anzureichern."

msgid "plugins.generic.citationManager.wizard.label"
msgstr "Citation Manager"

msgid "plugins.generic.citationManager.wizard.description"
msgstr "After submission of this article, the references will be processed further.<br/>"
"First PID's (e.g. DOI) will be extracted from the references.<br/>"
"With these PID's, additional metadata from external services (e.g. OpenAlex, Orcid) will be collected.<br/>"
"After publication of this article, the structured metadata will be deposited to external services (e.g. Wikidata, OpenCitations)<br/>"
"Additionally, the structured citations can be edited on the tab Citation Manager.<br/>"

msgid "plugins.generic.citationManager.process.button"
msgstr "Verarbeiten"

Expand Down
10 changes: 10 additions & 0 deletions locale/en/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ msgstr "The current parsed citations will be removed if you click OK. Are you su
msgid "plugins.generic.citationManager.citations.empty.description"
msgstr "Parsed citations are empty. Please use the button above to parse and enrich the citations."

msgid "plugins.generic.citationManager.wizard.label"
msgstr "Citation Manager"

msgid "plugins.generic.citationManager.wizard.description"
msgstr "After submission of this article, the references will be processed further.<br/>"
"First PID's (e.g. DOI) will be extracted from the references.<br/>"
"With these PID's, additional metadata from external services (e.g. OpenAlex, Orcid) will be collected.<br/>"
"After publication of this article, the structured metadata will be deposited to external services (e.g. Wikidata, OpenCitations)<br/>"
"Additionally, the structured citations can be edited on the tab Citation Manager.<br/>"

msgid "plugins.generic.citationManager.process.button"
msgstr "Process"

Expand Down
10 changes: 10 additions & 0 deletions locale/es/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ msgstr "The current parsed citations will be removed if you click OK. Are you su
msgid "plugins.generic.citationManager.citations.empty.description"
msgstr "Parsed citations are empty. Please use the button above to parse and enrich the citations."

msgid "plugins.generic.citationManager.wizard.label"
msgstr "Citation Manager"

msgid "plugins.generic.citationManager.wizard.description"
msgstr "After submission of this article, the references will be processed further.<br/>"
"First PID's (e.g. DOI) will be extracted from the references.<br/>"
"With these PID's, additional metadata from external services (e.g. OpenAlex, Orcid) will be collected.<br/>"
"After publication of this article, the structured metadata will be deposited to external services (e.g. Wikidata, OpenCitations)<br/>"
"Additionally, the structured citations can be edited on the tab Citation Manager.<br/>"

msgid "plugins.generic.citationManager.process.button"
msgstr "Process"

Expand Down
10 changes: 10 additions & 0 deletions locale/fr/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ msgstr "The current parsed citations will be removed if you click OK. Are you su
msgid "plugins.generic.citationManager.citations.empty.description"
msgstr "Parsed citations are empty. Please use the button above to parse and enrich the citations."

msgid "plugins.generic.citationManager.wizard.label"
msgstr "Citation Manager"

msgid "plugins.generic.citationManager.wizard.description"
msgstr "After submission of this article, the references will be processed further.<br/>"
"First PID's (e.g. DOI) will be extracted from the references.<br/>"
"With these PID's, additional metadata from external services (e.g. OpenAlex, Orcid) will be collected.<br/>"
"After publication of this article, the structured metadata will be deposited to external services (e.g. Wikidata, OpenCitations)<br/>"
"Additionally, the structured citations can be edited on the tab Citation Manager.<br/>"

msgid "plugins.generic.citationManager.process.button"
msgstr "Process"

Expand Down
10 changes: 10 additions & 0 deletions locale/nl/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ msgstr "The current parsed citations will be removed if you click OK. Are you su
msgid "plugins.generic.citationManager.citations.empty.description"
msgstr "Parsed citations are empty. Please use the button above to parse and enrich the citations."

msgid "plugins.generic.citationManager.wizard.label"
msgstr "Citation Manager"

msgid "plugins.generic.citationManager.wizard.description"
msgstr "After submission of this article, the references will be processed further.<br/>"
"First PID's (e.g. DOI) will be extracted from the references.<br/>"
"With these PID's, additional metadata from external services (e.g. OpenAlex, Orcid) will be collected.<br/>"
"After publication of this article, the structured metadata will be deposited to external services (e.g. Wikidata, OpenCitations)<br/>"
"Additionally, the structured citations can be edited on the tab Citation Manager.<br/>"

msgid "plugins.generic.citationManager.process.button"
msgstr "Process"

Expand Down
10 changes: 10 additions & 0 deletions locale/tr/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ msgstr "The current parsed citations will be removed if you click OK. Are you su
msgid "plugins.generic.citationManager.citations.empty.description"
msgstr "Parsed citations are empty. Please use the button above to parse and enrich the citations."

msgid "plugins.generic.citationManager.wizard.label"
msgstr "Citation Manager"

msgid "plugins.generic.citationManager.wizard.description"
msgstr "After submission of this article, the references will be processed further.<br/>"
"First PID's (e.g. DOI) will be extracted from the references.<br/>"
"With these PID's, additional metadata from external services (e.g. OpenAlex, Orcid) will be collected.<br/>"
"After publication of this article, the structured metadata will be deposited to external services (e.g. Wikidata, OpenCitations)<br/>"
"Additionally, the structured citations can be edited on the tab Citation Manager.<br/>"

msgid "plugins.generic.citationManager.process.button"
msgstr "Process"

Expand Down
16 changes: 4 additions & 12 deletions templates/submissionWizard.tpl
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<link rel="stylesheet" href="{$assetsUrl}/css/backend.css" type="text/css"/>
<link rel="stylesheet" href="{$assetsUrl}/css/frontend.css" type="text/css"/>

{if $citationsEnabled}
<div class="section" id="citationManager" style="clear:both;">

<div class="header">

<span class="label">{translate key="plugins.generic.citationManager.process.label"}</span>
<span class="description">{translate key="plugins.generic.citationManager.process.description"}</span>

</div>

</div>
{/if}
<div v-if="section.id == 'citations'">
<p><strong>{translate key="plugins.generic.citationManager.wizard.label"}</strong></p>
<p>{translate key="plugins.generic.citationManager.wizard.description"}</p>
</div>

0 comments on commit 2884b7e

Please sign in to comment.