]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7459 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 15 Apr 2025 14:35:33 +0000 (16:35 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 15 Apr 2025 14:35:33 +0000 (16:35 +0200)
app/Fluidbook/Link/LinksData.php
app/SubForms/Link/Base.php
app/SubForms/Link/Meta.php

index a542bd139f1937cc7dd65c59860f00e9a229ebc8..b9d3b5ba6c2ce61d28820017322a88990b495d5c 100644 (file)
@@ -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'),
index 9f5b3533a752e0f7a4b901238499db13315cc353..a6678d0a0f3a8420b638272fa17b58a225a515d6 100644 (file)
@@ -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')]]);
     }
 
     /**
index 692c818d38ea823125deda6b46b53eb926b5ce47..949b9b7237bd3304dadc0e3b707b2d370020e8e1 100644 (file)
@@ -10,4 +10,5 @@ class Meta extends Base
     protected $_extra = false;
     protected $_stats = false;
     protected $_uid = false;
+    protected $_visibility = false;
 }