From a9af94b64c3405cbdbf5cb448601a16e1bae9433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Tue, 13 May 2025 13:19:13 +0200 Subject: [PATCH 1/4] pkp/pkp-lib#10067 Add locales for expand/collapse --- locale/en/common.po | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/locale/en/common.po b/locale/en/common.po index 9936b701ffb..e2d1abe72c4 100644 --- a/locale/en/common.po +++ b/locale/en/common.po @@ -2105,6 +2105,13 @@ msgstr "Expand all" msgid "list.collapseAll" msgstr "Collapse all" +msgid "list.expand" +msgstr "Expand all" + +msgid "list.collapse" +msgstr "Collapse all" + + msgid "showAll" msgstr "Show All" From f7b8034cd7ff499d2f97b422179666d91719c64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Tue, 13 May 2025 14:54:49 +0200 Subject: [PATCH 2/4] pkp/pkp-lib#11372 Add vocabularies to FieldBaseAutosuggest --- .../components/forms/FieldBaseAutosuggest.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/classes/components/forms/FieldBaseAutosuggest.php b/classes/components/forms/FieldBaseAutosuggest.php index 8e49b5de674..e76a081ba88 100644 --- a/classes/components/forms/FieldBaseAutosuggest.php +++ b/classes/components/forms/FieldBaseAutosuggest.php @@ -32,6 +32,31 @@ abstract class FieldBaseAutosuggest extends Field /** @var array List of selected items. */ public $selected = []; + /** + * @var array List of controlled vocabularies available for selection. + * Each vocabulary should be structured as: + * [ + * 'locale' => string // The locale this vocabulary applies to (e.g., 'en') + * 'addButtonLabel' => string // Label for the button to add from this vocabulary + * 'title' => string // Title to display in the vocabulary selection modal + * 'modalComponent' => string // (Optional) Custom modal component to use for this vocabulary. Defaults to VocabularyModal + * 'items' => [ // Hierarchical tree of vocabulary items + * [ + * 'identifier' => string // Unique identifier for the vocabulary item + * 'name' => string // Display name of the vocabulary item + * 'source' => string // (Optional) Source of the vocabulary (e.g., 'Frascati') + * 'items' => [ // (Optional) Child items for hierarchical vocabularies + * // Each child follows the same structure (identifier, name, source, items) + * ] + * ], + * // Additional top-level vocabulary items... + * ] + * ] + */ + public $vocabularies = []; + + + /** * @copydoc Field::getConfig() */ @@ -43,6 +68,7 @@ public function getConfig() $config['getParams'] = empty($this->getParams) ? new \stdClass() : $this->getParams; $config['selectedLabel'] = __('common.selectedPrefix'); $config['selected'] = $this->selected; + $config['vocabularies'] = $this->vocabularies; return $config; } From 8c86b09096d038522a124843b5250acd2d236964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Wed, 14 May 2025 10:23:28 +0200 Subject: [PATCH 3/4] Update classes/components/forms/FieldBaseAutosuggest.php Co-authored-by: Taslan A. Graham <49318261+taslangraham@users.noreply.github.com> --- classes/components/forms/FieldBaseAutosuggest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/components/forms/FieldBaseAutosuggest.php b/classes/components/forms/FieldBaseAutosuggest.php index e76a081ba88..e081989e7c1 100644 --- a/classes/components/forms/FieldBaseAutosuggest.php +++ b/classes/components/forms/FieldBaseAutosuggest.php @@ -53,7 +53,7 @@ abstract class FieldBaseAutosuggest extends Field * ] * ] */ - public $vocabularies = []; + public array $vocabularies = []; From dc1ae446ff2781bbbd338cef74caaa387eeb84f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Wed, 14 May 2025 10:24:27 +0200 Subject: [PATCH 4/4] pkp/pkp-lib#11372 Fix translation --- locale/en/common.po | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/locale/en/common.po b/locale/en/common.po index e2d1abe72c4..921f102745f 100644 --- a/locale/en/common.po +++ b/locale/en/common.po @@ -2106,11 +2106,10 @@ msgid "list.collapseAll" msgstr "Collapse all" msgid "list.expand" -msgstr "Expand all" +msgstr "Expand" msgid "list.collapse" -msgstr "Collapse all" - +msgstr "Collapse" msgid "showAll" msgstr "Show All"