]> _ Git - fluidbook-toolbox.git/commitdiff
wip #4857 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 3 Nov 2021 11:31:55 +0000 (12:31 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 3 Nov 2021 11:31:55 +0000 (12:31 +0100)
app/Models/FluidbookIconset.php [new file with mode: 0644]
app/Models/FluidbookPublication.php
app/Models/FluidbookTheme.php
resources/views/vendor/backpack/crud/inc/form_save_buttons.blade.php
update

diff --git a/app/Models/FluidbookIconset.php b/app/Models/FluidbookIconset.php
new file mode 100644 (file)
index 0000000..2d0f9e3
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+
+namespace App\Models;
+
+use App\Fields\User;
+use Cubist\Backpack\Magic\Fields\Checkbox;
+use Cubist\Backpack\Magic\Fields\Code;
+use Cubist\Backpack\Magic\Fields\Text;
+use Cubist\Backpack\Magic\Models\CubistMagicAbstractModel;
+use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Support\Facades\Auth;
+
+class FluidbookIconset extends CubistMagicAbstractModel
+{
+    protected $table = 'fluidbook_iconset';
+    protected $_options = ['name' => 'fluidbook-iconset',
+        'singular' => 'icon set',
+        'plural' => 'icon sets'];
+
+    public static function addOwnerClause(Builder $builder)
+    {
+        if (null === backpack_user()) {
+            return;
+        }
+        if (Auth::user()->hasPermissionTo('fluidbook-iconset:admin')) {
+            return;
+        }
+        $builder->where('owner', Auth::id())->orWhere('public', 1);
+    }
+
+    public function setFields()
+    {
+        parent::setFields();
+
+        $this->addField(['name' => 'name',
+            'label' => __('Nom'),
+            'type' => Text::class,
+            'column' => true]);
+
+        $this->addField(['name' => 'owner',
+                'label' => __('Propriétaire'),
+                'type' => User::class,
+                'column' => true,
+                'can' => 'fluidbook-iconset:admin',
+                'column_attribute' => 'companyWithNameOnTwoLines',
+                'attribute' => 'companyWithName',
+                'default' => Auth::id()]
+        );
+
+        $this->addField(['name' => 'public',
+            'label' => __('Publique'),
+            'type' => Checkbox::class,
+            'column' => true,
+            'default' => 0,
+            'database_default' => 1]);
+
+        $this->addField([
+            'name' => 'icons',
+            'label' => __('Icons'),
+            'type' => Code::class,
+            'language' => 'xml']);
+    }
+}
index 7a4cfe5332afb23c62a775d38dfacc8f0cf24b7f..2640f7047dd4189b1e9b2929b2bc23816c614844 100644 (file)
@@ -58,7 +58,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
             'name' => 'mobileLVersion',
             'type' => FluidbookDevelopmentVersion::class,
             'label' => __('Version logicielle'),
-            'default' => 'dev',
+            'default' => 'stable',
             'translatable' => false,
         ]);
         $this->addField([
@@ -75,14 +75,14 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'title',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Titre de la publication'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'url_link',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('URL du lien de retour au site'),
             'default' => 'https://',
             'translatable' => false,
@@ -103,7 +103,6 @@ class FluidbookPublication extends CubistMagicAbstractModel
             'name' => 'assetsDir',
             'type' => 'Integer',
             'label' => __('Utiliser le dossier d\'assets du fluidbook'),
-            'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
@@ -127,14 +126,14 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'googleAnalytics',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Code Google Analytics'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'googleTagManager',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Code Google Tag Manager'),
             'default' => '',
             'translatable' => false,
@@ -156,7 +155,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'email_title',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Titre de l\'email "Envoyer à un ami"'),
             'hint' => __('Laisser vide pour utiliser la valeur par défaut'),
             'default' => '',
@@ -175,7 +174,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'facebook_title',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Titre du contenu partagé'),
             'hint' => __('Titre proposé sur les fonction de partage (par défaut, titre de la publication)'),
             'default' => '',
@@ -260,7 +259,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'customSharer',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Classe personnalisée de partage'),
             'default' => '',
             'translatable' => false,
@@ -320,7 +319,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'seoBaseURL',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('URL de base'),
             'default' => '',
             'translatable' => false,
@@ -569,21 +568,18 @@ class FluidbookPublication extends CubistMagicAbstractModel
             'name' => 'pages',
             'type' => 'Integer',
             'label' => __('Nombre de pages'),
-            'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'width',
             'type' => 'Number',
             'label' => __('Largeur'),
-            'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'height',
             'type' => 'Number',
             'label' => __('Hauteur'),
-            'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
@@ -617,7 +613,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'menuBreakpoint',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Breakpoint burger menu'),
             'hint' => __('Par défaut 1023px'),
             'default' => '',
@@ -664,14 +660,14 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'navExtraLink',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('URL'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'navExtraTooltip',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Infobulle ou label'),
             'default' => '',
             'translatable' => false,
@@ -705,7 +701,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'navExtraLink1',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('URL 1'),
             'default' => '',
             'translatable' => false,
@@ -751,7 +747,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'navExtraLink2',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('URL 2'),
             'default' => '',
             'translatable' => false,
@@ -797,7 +793,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'navExtraLink3',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('URL 3'),
             'default' => '',
             'translatable' => false,
@@ -843,7 +839,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'navExtraLink4',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('URL 4'),
             'default' => '',
             'translatable' => false,
@@ -889,7 +885,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'navExtraLink5',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('URL 5'),
             'default' => '',
             'translatable' => false,
@@ -911,7 +907,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'mobileBottomNav',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Barre de boutons en bas'),
             'hint' => __('Identifiants des boutons séparés par des virgules'),
             'default' => '',
@@ -967,12 +963,12 @@ class FluidbookPublication extends CubistMagicAbstractModel
             'name' => 'bookmarkSendEnable',
             'type' => 'Checkbox',
             'label' => __('Activer l\'envoi des marques-pages par e-mail'),
-            'default' => 'true',
+            'default' => true,
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'bookmark_email_title',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Titre de l\'email "Envoyer à un ami"'),
             'hint' => __('Laisser vide pour utiliser la valeur par défaut'),
             'default' => '',
@@ -1015,7 +1011,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
             'name' => 'bookmarkBlinkOnPageChange',
             'type' => 'Checkbox',
             'label' => __('Faire clignoter le marque page à l\'apparition de la page'),
-            'default' => 'false',
+            'default' => false,
             'translatable' => false,
         ]);
         $this->addField([
@@ -1023,7 +1019,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'bookmarkDisablePages',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Désactiver les marques-pages sur ces pages'),
             'hint' => __('1-3,5 = 1,2,3,5'),
             'default' => '',
@@ -1085,7 +1081,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'helpArrowTooltip',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Bulle affichée au niveau de la flèche de droite'),
             'default' => '',
             'translatable' => false,
@@ -1188,7 +1184,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'ignoreSearchSeparators',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Caractères à ne pas considérer comme un séparateur de mot'),
             'default' => '',
             'translatable' => false,
@@ -1327,7 +1323,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'pdfName',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Nom du fichier PDF'),
             'default' => 'document.pdf',
             'translatable' => false,
@@ -1424,7 +1420,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'relay_url_params',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Relayer les paramètres d\'url dans les liens sortants'),
             'default' => '',
             'translatable' => false,
@@ -1481,7 +1477,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'tagcommander_id',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Tag commander ID'),
             'default' => '',
             'translatable' => false,
@@ -1555,7 +1551,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'chaptersPage',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Faire pointer le sommaire sur la page'),
             'hint' => __('Laisser vide pour utiliser le sommaire classique'),
             'default' => '',
@@ -1668,7 +1664,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'tabsPages',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Pages des onglets'),
             'hint' => __('Numéros de pages séparas par une virgule'),
             'default' => '',
@@ -1676,7 +1672,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'tabsSections',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Sections des onglets'),
             'hint' => __('Numéros de pages séparés par une virgule'),
             'default' => '',
@@ -1720,7 +1716,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'tabsHideOnPages',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Cacher les onglets sur les pages'),
             'hint' => __('1-3,5 = 1,2,3,5'),
             'default' => '',
@@ -1833,7 +1829,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'openLinkAtStartup',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Déclencher un lien à l\'ouverture du fluidbook'),
             'default' => '',
             'translatable' => false,
@@ -1843,14 +1839,14 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'customLinkClass',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Classe pour les liens personnalisés'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'ignoreLinksTypes',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Ignorer les liens de type'),
             'hint' => __('Liste des numéros séparés par des virgules'),
             'default' => '',
@@ -1865,7 +1861,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'linkTooltipManager',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Gestionnaire des info-bulles'),
             'default' => '',
             'translatable' => false,
@@ -1890,14 +1886,14 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'linkTracker',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Tracking des liens'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'linkTrackerRegexp',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Tracking des liens applicables aux liens du domaine'),
             'default' => '',
             'translatable' => false,
@@ -1907,7 +1903,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'linkFilePrefix',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Préfixer les liens de téléchargement'),
             'default' => '',
             'translatable' => false,
@@ -1993,7 +1989,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'slideshowCaptionSize',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Taille de police de la légende du diaporama'),
             'hint' => __('Laisser vide pour utiliser la valeur par défaut'),
             'default' => '',
@@ -2023,7 +2019,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'mobileVideosPath',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Chemin vers les vidéos'),
             'default' => '',
             'translatable' => false,
@@ -2033,14 +2029,14 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'brightcovePlayerId',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Brightcove Player Id'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'brightcovePlayerSecret',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Brightcove Player Secret'),
             'default' => '',
             'translatable' => false,
@@ -2133,14 +2129,14 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'product_zoom_label_1',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Label du bouton 1'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'product_zoom_tooltip_1',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Label de l\'infobulle 1'),
             'default' => '',
             'translatable' => false,
@@ -2192,14 +2188,14 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'product_zoom_label_2',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Label du bouton 2'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'product_zoom_tooltip_2',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Label de l\'infobulle 2'),
             'default' => '',
             'translatable' => false,
@@ -2251,14 +2247,14 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'product_zoom_label_3',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Label du bouton 3'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'product_zoom_tooltip_3',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Label de l\'infobulle 3'),
             'default' => '',
             'translatable' => false,
@@ -2328,7 +2324,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'product_email_title',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Titre de l\'email "Envoyer à un ami"'),
             'default' => '',
             'translatable' => false,
@@ -2395,7 +2391,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'splashURL',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('URL'),
             'default' => '',
             'translatable' => false,
@@ -2511,7 +2507,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'archivesLabel',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Label'),
             'default' => '',
             'translatable' => false,
@@ -2647,14 +2643,14 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'offlineTitle',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Titre de l\'application'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'offlineLink',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('URL du Fluidbook'),
             'hint' => __('URL du fluidbook utilisée pour la version Offline (CD-ROM, clé USB, Exécutables)'),
             'default' => 'http://',
@@ -2677,14 +2673,14 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'mobilefirstFluidbookId',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Identifiant du fluidbook "Mobile first"'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'mobilefirstBreakpoint',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Breakpoint du passage à la version "Mobile first" (en pixels)'),
             'default' => '640',
             'translatable' => false,
@@ -2696,7 +2692,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'phonegapId',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Identifiant de l\'identifiant'),
             'hint' => __('De la forme com.fluidbook.phonegap.xxxxx'),
             'default' => 'com.fluidbook.phonegap.$id',
@@ -2704,7 +2700,7 @@ class FluidbookPublication extends CubistMagicAbstractModel
         ]);
         $this->addField([
             'name' => 'phonegapVersion',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Version de l\'application'),
             'hint' => __('De la forme 1.2.3'),
             'default' => '1.0.0',
@@ -2734,7 +2730,7 @@ L,index',
         ]);
         $this->addField([
             'name' => 'secureURL',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('URL de sécurisation'),
             'hint' => __('URL intérrogé pour vérifier si le visiteur à les droits pour consulter la publication'),
             'default' => 'http://',
@@ -2742,7 +2738,7 @@ L,index',
         ]);
         $this->addField([
             'name' => 'secureURLRedirect',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Redirection'),
             'hint' => __('Si l\'authentification échoue, redirection vers cette adresse'),
             'default' => 'http://',
@@ -2784,7 +2780,7 @@ L,index',
         ]);
         $this->addField([
             'name' => 'restrictPrintDownload',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Paramètre de l\'url permettant de désactiver la restriction (non vide pour activer les restrictions)'),
             'hint' => __('Ne pas indiquer le ?'),
             'default' => '',
@@ -2818,14 +2814,14 @@ L,index',
         ]);
         $this->addField([
             'name' => 'home',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Accueil de l\'interface multibrochure'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'country',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Pays de la brochure'),
             'default' => '',
             'translatable' => false,
@@ -2901,7 +2897,7 @@ L,index',
         ]);
         $this->addField([
             'name' => 'htmlExtension',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Extension des fichiers html'),
             'hint' => __('Ex : php, htm, html, phtml, asp, aspx'),
             'default' => 'html',
@@ -2909,7 +2905,7 @@ L,index',
         ]);
         $this->addField([
             'name' => 'actualHtmlExtension',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Extension des fichiers html réellement appliquée au fluidbook'),
             'hint' => __('Ex : php, htm, html, phtml, asp'),
             'default' => 'html',
@@ -2924,7 +2920,7 @@ L,index',
         ]);
         $this->addField([
             'name' => 'baseUrl',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Base de l\'url'),
             'default' => '',
             'translatable' => false,
@@ -2950,7 +2946,7 @@ L,index',
         ]);
         $this->addField([
             'name' => 'redirectDemo',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Rediriger le lien de démo vers'),
             'default' => '',
             'translatable' => false,
@@ -2980,21 +2976,21 @@ L,index',
         ]);
         $this->addField([
             'name' => 'scorm_id',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Identifiant SCORM'),
             'default' => '',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'scorm_org',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Organisation SCORM'),
             'default' => 'ACME-ORG-1350650111249',
             'translatable' => false,
         ]);
         $this->addField([
             'name' => 'scorm_title',
-            'type' => 'Text',
+            'type' => 'LongText',
             'label' => __('Titre SCORM'),
             'hint' => __('Laisser vide pour utiliser le titre de la publication'),
             'default' => '',
@@ -3119,42 +3115,42 @@ L,index',
             'translatable' => false,
         ]);
         $this->addField([
-            'name' => 'download_win-inss-html',
+            'name' => 'download_win_inss_html',
             'type' => 'Checkbox',
             'label' => __('Version offline - Executable Windows'),
             'default' => false,
             'translatable' => false,
         ]);
         $this->addField([
-            'name' => 'download_win-ins-html',
+            'name' => 'download_win_ins_html',
             'type' => 'Checkbox',
             'label' => __('Version offline - Installeur Auto-executable Windows'),
             'default' => false,
             'translatable' => false,
         ]);
         $this->addField([
-            'name' => 'download_win-exe-html',
+            'name' => 'download_win_exe_html',
             'type' => 'Checkbox',
             'label' => __('Version offline - ZIP Windows'),
             'default' => false,
             'translatable' => false,
         ]);
         $this->addField([
-            'name' => 'download_mac-exe-html',
+            'name' => 'download_mac_exe_html',
             'type' => 'Checkbox',
             'label' => __('Version offline - Exécutable Mac OS X'),
             'default' => false,
             'translatable' => false,
         ]);
         $this->addField([
-            'name' => 'download_win-cd-html',
+            'name' => 'download_win_cd_html',
             'type' => 'Checkbox',
             'label' => __('Version offline - CD-ROM / Clé USB'),
             'default' => false,
             'translatable' => false,
         ]);
         $this->addField([
-            'name' => 'download_win-html',
+            'name' => 'download_win_html',
             'type' => 'Checkbox',
             'label' => __('Version offline - HTML (Non adaptée à l\'installation sur un serveur web)'),
             'default' => false,
index 36c3803f1d1b2398fe6b8c0e1cd5c1bca3c952bc..89832b63af1a445075ab13e104037106669714fe 100644 (file)
@@ -36,7 +36,7 @@ class FluidbookTheme extends CubistMagicAbstractModel
         if (null === backpack_user()) {
             return;
         }
-        if (Auth::user()->hasPermissionTo('fluidbook-quote:admin')) {
+        if (Auth::user()->hasPermissionTo('fluidbook-theme:admin')) {
             return;
         }
         $builder->where('owner', Auth::id());
index 285dffe3f56ac4f17fb7f1201cd22c8f5d962f41..e13390b5850ae684bf3057cabd25bbf0b51e4b7b 100644 (file)
@@ -35,7 +35,7 @@
                 @if(!empty($saveAction['options']))
             </div>
         @endif
-        @if($crud->entry)
+        @if($crud->entry && $crud->entry instanceof \Cubist\Backpack\Magic\Models\CubistMagicAbstractModel)s
             @foreach($crud->entry->getEditActions() as $view)
                 @include($view)
             @endforeach
diff --git a/update b/update
index 049b4b4cde3a5bc7538360971b097860060bf68b..d91e7045ce0fa11eecd4fc6df712ba6450dde7bf 100644 (file)
--- a/update
+++ b/update
@@ -1,13 +1,6 @@
-#!/usr/bin/env php
-<?php
-echo `composer update -v --no-progress --profile --prefer-dist`;
-echo `composer dump-autoload`;
-echo `php artisan cache:clear`;
-echo `php artisan config:cache`;
-echo `php artisan view:cache`;
-#`php artisan vendor:publish --provider="CubistBackpackServiceProvider"`;
-// Database migrations
-//`php artisan vendor:publish --tag=migrations`;
-//`php artisan migrate`;
-#`composer dump-autoload`;
-echo `php artisan cubist:magic:generate`;
+#!/bin/sh
+/usr/bin/php8.0 /usr/local/bin/composer update
+/usr/bin/php8.0 /usr/local/bin/composer dump-autoload
+/usr/bin/php8.0 artisan cubist:magic:migrate
+/usr/bin/php8.0 artisan cubist:magic:generate
+/usr/bin/php8.0 artisan optimize:clear