From 3f6acf69ca7719c9cd45193e23621aac8a9a8a08 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 15 Mar 2024 11:28:28 +0100 Subject: [PATCH] wip #6799 @1.5 --- app/SubForms/Link/Base.php | 3 ++- app/SubForms/Link/PDF.php | 1 + app/SubForms/Link/PDFInline.php | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 app/SubForms/Link/PDFInline.php diff --git a/app/SubForms/Link/Base.php b/app/SubForms/Link/Base.php index 3607aaec8..265248450 100644 --- a/app/SubForms/Link/Base.php +++ b/app/SubForms/Link/Base.php @@ -104,7 +104,8 @@ class Base extends Form ['type' => \Fluidbook\Tools\Links\Link::DOWNLOAD_PORTION, 'label' => __('Télécharger un extrait'), 'color' => '#AAAAAA', 'class' => DownloadPortion::class], ['type' => \Fluidbook\Tools\Links\Link::TRIGGERSLINK, 'label' => __('Déclencher un lien'), 'color' => '#cc0000', 'class' => TriggerLink::class], ['type' => \Fluidbook\Tools\Links\Link::FLIPCARD, 'label' => __('Flipcard'), 'color' => '#460e3f', 'class' => Flipcard::class], - ['type' => \Fluidbook\Tools\Links\Link::PDF, 'label' => __('PDF'), 'color' => '#af48d1', 'class' => PDF::class], + ['type' => \Fluidbook\Tools\Links\Link::PDF, 'label' => __('PDF') . ' (' . __('Popup') . ')', 'color' => '#af48d1', 'class' => PDF::class], + ['type' => \Fluidbook\Tools\Links\Link::PDF_INLINE, 'label' => __('PDF'), 'color' => '#af48d1', 'class' => PDFInline::class], ['type' => \Fluidbook\Tools\Links\Link::ACTION, 'label' => __('Action'), 'color' => '#880000', 'class' => Action::class], ['type' => \Fluidbook\Tools\Links\Link::LOTTIE, 'label' => __('Animation Lottie'), 'color' => '#ffaaff', 'class' => Lottie::class], ['type' => \Fluidbook\Tools\Links\Link::COPY_TO_CLIPBOARD, 'label' => __('Copier un texte dans le presse-papiers'), 'color' => '#437ac7', 'class' => CopyToClipboard::class], diff --git a/app/SubForms/Link/PDF.php b/app/SubForms/Link/PDF.php index 242cff0ef..c6e8de91e 100644 --- a/app/SubForms/Link/PDF.php +++ b/app/SubForms/Link/PDF.php @@ -12,6 +12,7 @@ class PDF extends File { public $type = Link::PDF; + public function addDestinationField() { $this->addField('to', FilesOrURL::class, __('Fichier'), $this->getFilesOrURLEntry()); diff --git a/app/SubForms/Link/PDFInline.php b/app/SubForms/Link/PDFInline.php new file mode 100644 index 000000000..9ded22bc1 --- /dev/null +++ b/app/SubForms/Link/PDFInline.php @@ -0,0 +1,21 @@ +addField('to', FilesOrURL::class, __('Fichier'), $this->getFilesOrURLEntry()); + $this->addField('pdfjs', PDFJSType::class, __('Interface PDFJS')); + } +} -- 2.39.5