]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6553 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 4 Dec 2023 16:51:51 +0000 (17:51 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 4 Dec 2023 16:51:51 +0000 (17:51 +0100)
app/Jobs/FluidbookCollectionDownload.php
app/Models/FluidbookCollection.php

index d11006e25cd408fac265050b167d6a2bcae71a46..13c4f6d4efd5b5a0deebfdab3a11f6f11fde0008 100644 (file)
@@ -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 '';
index 7fc469bbfc75a5479975e05581fd8a2982088ff6..459e37a843b978a581ea33009ff993aee04403b9 100644 (file)
@@ -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']],