]> _ Git - odl.git/commitdiff
wip #4832 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 22 Oct 2021 15:22:16 +0000 (17:22 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 22 Oct 2021 15:22:31 +0000 (17:22 +0200)
app/Http/Controllers/Admin/ToolsController.php [new file with mode: 0644]
app/Http/Controllers/Tools/Search.php [deleted file]
app/Http/Controllers/ToolsController.php [deleted file]
app/Models/Asset.php
app/Models/Translate.php [new file with mode: 0644]

diff --git a/app/Http/Controllers/Admin/ToolsController.php b/app/Http/Controllers/Admin/ToolsController.php
new file mode 100644 (file)
index 0000000..9cdd924
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+namespace App\Http\Controllers\Admin;
+
+use App\Http\Controllers\Tools\FluidbookConvert;
+use App\Http\Controllers\Tools\FluidbookPreview;
+
+class ToolsController
+{
+    use FluidbookConvert;
+    use FluidbookPreview;
+
+    public function index($tool, $args = '')
+    {
+
+        if (!$args) {
+            $args = [];
+        } else {
+            $args = explode('/', $args);
+        }
+
+        if (!method_exists($this, $tool)) {
+            return view('tools.' . $tool, ['args' => $args]);
+        }
+        return $this->$tool($args);
+    }
+}
diff --git a/app/Http/Controllers/Tools/Search.php b/app/Http/Controllers/Tools/Search.php
deleted file mode 100644 (file)
index c31c018..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Tools;
-
-trait Search
-{
-    protected function fluidbookconvert($args)
-    {
-        return view('tools.search');
-    }
-}
diff --git a/app/Http/Controllers/ToolsController.php b/app/Http/Controllers/ToolsController.php
deleted file mode 100644 (file)
index 5f68511..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-namespace App\Http\Controllers;
-
-use App\Http\Controllers\Tools\FluidbookConvert;
-
-class ToolsController
-{
-    use FluidbookConvert;
-
-    protected function index($tool, $args = '')
-    {
-
-        if (!$args) {
-            $args = [];
-        } else {
-            $args = explode('/', $args);
-        }
-
-        if (!method_exists($this, $tool)) {
-            return view('tools.' . $tool, ['args' => $args]);
-        }
-        return $this->$tool($args);
-    }
-}
index 9e731f092ca0e517a805dc0332519b43652b8299..a8f57b73c36be93e2661854d943e7d92b49ed751 100644 (file)
@@ -39,7 +39,7 @@ class Asset extends CubistMagicAbstractModel
                     ],
                 'column' => true,
             ]);
-        $this->addField('file_upload', Files::class, 'Fichier');
+        $this->addField('file_upload', Files::class, 'Fichier', ['maxFiles' => 100]);
         $this->addField('theme', SelectFromModel::class, 'Thème', ['optionsmodel' => AssetTheme::class, 'allows_null' => true, 'column' => true]);
         $this->addField('keywords', Tags::class, 'Mots-clé', ['column' => true]);
     }
diff --git a/app/Models/Translate.php b/app/Models/Translate.php
new file mode 100644 (file)
index 0000000..0b8159e
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+
+namespace App\Models;
+
+class Translate extends \Cubist\Backpack\Magic\Models\Translate
+{
+
+}