From: Vincent Vanwaelscappel Date: Mon, 4 Dec 2023 16:51:51 +0000 (+0100) Subject: wait #6553 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c98b6e93c930e584c56828e67633d339bbac7b37;p=fluidbook-toolbox.git wait #6553 @0.25 --- diff --git a/app/Jobs/FluidbookCollectionDownload.php b/app/Jobs/FluidbookCollectionDownload.php index d11006e25..13c4f6d4e 100644 --- a/app/Jobs/FluidbookCollectionDownload.php +++ b/app/Jobs/FluidbookCollectionDownload.php @@ -296,7 +296,9 @@ class FluidbookCollectionDownload extends DownloadBase $flag = $lang; } } - $multilang[] = $lang . ',' . strtolower($flag) . ',../' . $this->dirs[$fbid] . '/index.' . $ext; + + $suffix = $this->entry->locale_switch_currentpage ? '#/page/$currentPage' : ''; + $multilang[] = $lang . ',' . strtolower($flag) . ',../' . $this->dirs[$fbid] . '/index.' . $ext . $suffix; } if (count($multilang) <= 1) { return ''; diff --git a/app/Models/FluidbookCollection.php b/app/Models/FluidbookCollection.php index 7fc469bbf..459e37a84 100644 --- a/app/Models/FluidbookCollection.php +++ b/app/Models/FluidbookCollection.php @@ -67,6 +67,7 @@ class FluidbookCollection extends ToolboxStatusModel $this->addField('hash', Hidden::class); $this->addField('type', SelectFromArray::class, __('Type'), ['can' => 'fluidbook-collection:write', 'column' => true, 'options' => ['export' => __('Export'), 'export_multilang' => __('Export multilingue'), 'scorm_multilang' => __('SCORM multilingue')]]); $this->addField('locale_switch', Checkbox::class, __('Permettre le changement de langue'), ['when' => ['type' => ['scorm_multilang', 'export_multilang']], 'default' => true]); + $this->addField('locale_switch_currentpage', Checkbox::class, __('Rediriger vers la page en cours lors du changement de langue'), ['default' => false]); $this->addField('redirection_algorithm', SelectFromArray::class, __('Algorithme de choix de la version'), [ 'when' => ['type' => ['scorm_multilang', 'export_multilang']],