From: Vincent Vanwaelscappel Date: Tue, 15 Apr 2025 14:35:33 +0000 (+0200) Subject: wip #7459 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0ec33c65b0bcc7f316299e15bfc0f61ecc084da8;p=fluidbook-toolbox.git wip #7459 @2 --- diff --git a/app/Fluidbook/Link/LinksData.php b/app/Fluidbook/Link/LinksData.php index a542bd139..b9d3b5ba6 100644 --- a/app/Fluidbook/Link/LinksData.php +++ b/app/Fluidbook/Link/LinksData.php @@ -44,6 +44,7 @@ class LinksData 'display_area' => __('Activer la surbrillance'), 'video_loop' => __('Video : boucle'), 'video_auto_start' => __('Video : démarrage automatique'), 'video_controls' => __('Vidéo : afficher les contrôles'), 'video_sound_on' => __('Vidéo : activer le son'), 'inline' => __('Vidéo : afficher dans la page'), 'video_width' => __('Vidéo : Largeur du popup'), 'video_height' => __('Vidéo : Hauteur du popup'), + 'visibility_os' => __('Visible sur les systèmes'), 'interactive' => __('Interactivité'), 'video_service' => __('Webvideo : service'), 'close_button' => __('Bouton de fermeture'), 'transition' => __('Transition'), diff --git a/app/SubForms/Link/Base.php b/app/SubForms/Link/Base.php index 9f5b3533a..a6678d0a0 100644 --- a/app/SubForms/Link/Base.php +++ b/app/SubForms/Link/Base.php @@ -46,6 +46,7 @@ class Base extends Form protected $_extra = true; protected $_stats = true; protected $_uid = true; + protected $_visibility = true; protected $_canContainLinks = false; @@ -228,6 +229,15 @@ class Base extends Form if ($this->_multimedia) { $this->addMultimediaFields(); } + if ($this->_visibility) { + $this->addVisibilityFields(); + } + } + + protected function addVisibilityFields() + { + $this->addField('header_visibility', FormSection::class, __('Visibilité')); + $this->addField('visibility_os', SelectFromArray::class, __('Afficher sur les systèmes'), ['ajax' => false, 'allows_null' => false, 'default' => 'all', 'options' => ['all' => __('Tous'), 'desktop' => 'Desktop (Windows, MacOS, Linux)', 'mobile' => __('iOS, iPadOS, Android, ChromeOS')]]); } /** diff --git a/app/SubForms/Link/Meta.php b/app/SubForms/Link/Meta.php index 692c818d3..949b9b723 100644 --- a/app/SubForms/Link/Meta.php +++ b/app/SubForms/Link/Meta.php @@ -10,4 +10,5 @@ class Meta extends Base protected $_extra = false; protected $_stats = false; protected $_uid = false; + protected $_visibility = false; }