]> gitweb.hamatoma.de Git - zentrum.gemeinwohl-gesellschaft.org.git/commitdiff
V0.1.4 Process
authorHamatoma <author@hamatoma.de>
Fri, 28 Mar 2025 21:27:15 +0000 (22:27 +0100)
committerHamatoma <author@hamatoma.de>
Fri, 28 Mar 2025 21:27:15 +0000 (22:27 +0100)
- Process: neu: +xmlfile +image
- ProcessController:
  - parseDrawIoXml(): Fehler bei "Data sources"
  - store(): Speichern der Bilddatei
- index.blade:
  - Spalte "Bild"

CHANGELOG.md
app/Http/Controllers/ProcessController.php
app/Models/Process.php
composer.lock
database/migrations/2025_03_25_125345_create_processes_table.php
resources/views/process/create.blade.php
resources/views/process/edit.blade.php
resources/views/process/index.blade.php
resources/views/process/show.blade.php

index cf2f7d8eed2e59c50bd5f641d4e97669396fdb92..a9aaebbfe798dbee2ab125f4cb0eb99b316a5b29 100644 (file)
@@ -1,5 +1,14 @@
 # Änderungen an zentrum
 
+# V0.1.4 Process
+
+- Process: neu: +xmlfile +image
+- ProcessController:
+  - parseDrawIoXml(): Fehler bei "Data sources"
+  - store(): Speichern der Bilddatei
+- index.blade:
+  - Spalte "Bild"
+
 # V0.1.3 Process ExportController drawio2db.py
 
 - ExportController: $_SERVER['documentroot] replaced by FileHelper::documentRoot()
index 7cd1cb15df2c8a7d64962967ccbf684c1373bb6f..ca9b30eb49f1bb6bc4ecbf1a31d6056f368ecc19 100644 (file)
@@ -38,8 +38,8 @@ class ProcessController extends Controller
                 ];
             }
             $context = new ContextLaraKnife($request, $fields);
-            $optionsDivision = SProperty::optionsByScope('division', $fields['division_scope'], '');
-            $optionsActivity = SProperty::optionsByScope('activity', $fields['activity_scope'], '');
+            $optionsDivision = SProperty::optionsByScope('division', $fields['division_scope'], '-');
+            $optionsActivity = SProperty::optionsByScope('activity', $fields['activity_scope'], '-');
             $rc = view('process.create', [
                 'context' => $context,
                 'optionsDivision' => $optionsDivision,
@@ -69,13 +69,15 @@ class ProcessController extends Controller
                     'datasources' => $process->datasources,
                     'texts' => $process->texts,
                     'info' => $process->info,
-                    'owner_id' => $process->owner_id
+                    'owner_id' => $process->owner_id,
+                    'xmlfile' => $process->xmlfile,
+                    'image' => $process->image
                 ];
             }
             $context = new ContextLaraKnife($request, $fields, $process);
             $optionsDivision = SProperty::optionsByScope('division', $process->division_scope, '');
             $optionsActivity = SProperty::optionsByScope('activity', $process->activity_scope, '');
-            $optionsOwner = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['owner_id'], __('<Please select>'));
+            $optionsOwner = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['owner_id'], __('-'));
             $rc = view('process.edit', [
                 'context' => $context,
                 'optionsDivision' => $optionsDivision,
@@ -147,7 +149,7 @@ LEFT JOIN users t3 ON t3.id=t0.owner_id
             $records = $pagination->records;
             $optionsDivision = SProperty::optionsByScope('division', $fields['division'], 'all');
             $optionsActivity = SProperty::optionsByScope('activity', $fields['activity'], 'all');
-            $optionsOwner = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['owner'], __('all'));
+            $optionsOwner = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['owner'], 'all');
             $context = new ContextLaraKnife($request, $fields);
             return view('process.index', [
                 'context' => $context,
@@ -174,7 +176,7 @@ LEFT JOIN users t3 ON t3.id=t0.owner_id
                 $fields['title'] = substr($line, 7);
             } elseif (str_starts_with($line, '  ')) {
                 $multiline .= substr($line, 2) . "\n";
-            } elseif (preg_match('/^(Roles|SubProcesses|Data Sources|Texts)/', $line, $matches)) {
+            } elseif (preg_match('/^(Roles|SubProcesses|Data sources|Texts)/', $line, $matches)) {
                 switch ($target) {
                     case 'Roles':
                         $fields['roles'] = $multiline;
@@ -182,7 +184,7 @@ LEFT JOIN users t3 ON t3.id=t0.owner_id
                     case 'SubProcesses':
                         $fields['subprocesses'] = $multiline;
                         break;
-                    case 'Data Sources':
+                    case 'Data sources':
                         $fields['datasources'] = $multiline;
                         break;
                     case 'Texts':
@@ -210,14 +212,16 @@ LEFT JOIN users t3 ON t3.id=t0.owner_id
             'serialno' => $isCreate ? '' : 'required',
             'division_scope' => $isCreate ? '' : 'required',
             'activity_scope' => $isCreate ? '' : 'required',
-            'path' => $isCreate ? '' : 'required',
-            'title' => $isCreate ? '' : 'required',
+            'path' => '',
+            'title' => '',
             'roles' => '',
             'subprocesses' => '',
             'datasources' => '',
             'texts' => '',
             'info' => '',
-            'owner_id' => $isCreate ? '' : 'required'
+            'owner_id' => '',
+            'xmlfile' => '',
+            'image' => '',
         ];
         return $rc;
     }
@@ -243,7 +247,7 @@ LEFT JOIN users t3 ON t3.id=t0.owner_id
         } else {
             $optionsDivision = SProperty::optionsByScope('division', $process->division_scope, '');
             $optionsActivity = SProperty::optionsByScope('activity', $process->activity_scope, '');
-            $optionsOwner = DbHelper::comboboxDataOfTable('users', 'name', 'id', $process->owner_id, __(''));
+            $optionsOwner = DbHelper::comboboxDataOfTable('users', 'name', 'id', $process->owner_id, '-');
             $context = new ContextLaraKnife($request, null, $process);
             $rc = view('process.show', [
                 'context' => $context,
@@ -268,11 +272,12 @@ LEFT JOIN users t3 ON t3.id=t0.owner_id
                 $rc = back()->withErrors($validator)->withInput();
             } else {
                 $validated = $validator->validated();
-                $fullName = $this->storeFile($request);
-                if ($fullName == null) {
+                $relativeName = $this->storeFile($request);
+                if ($relativeName == null) {
                     $rc = back()->withErrors($validator)->withInput();
                 } else {
-                    $this->parseDrawIoXml($fullName, $validated);
+                    $this->parseDrawIoXml($relativeName, $validated);
+                    $validated['xmlfile'] = $relativeName;
                     $process = Process::create($validated);
                     Change::createFromFields($validated, Change::$CREATE, 'Process', $process->id);
                     $rc = redirect('/process-edit/' . $process->id);
@@ -295,8 +300,7 @@ LEFT JOIN users t3 ON t3.id=t0.owner_id
         $file = $request->file();
         $file = $request->file('file');
         if ($file != null) {
-            $name = $file->getClientOriginalName();
-            $filename = session('userName') . '_' . strval(time()) . '!' . $name;
+            $filename = substr($file->getClientOriginalName(), 0, 200);
             $rc = FileHelper::storeFile($request, 'file', $filename);
         }
         return $rc;
@@ -312,6 +316,7 @@ LEFT JOIN users t3 ON t3.id=t0.owner_id
             $fields = $request->all();
             $validator = Validator::make($fields, $this->rules(false));
             if ($validator->fails()) {
+                $errors = $validator->errors();
                 $rc = back()->withErrors($validator)->withInput();
             } else {
                 $validated = $validator->validated();
@@ -321,6 +326,14 @@ LEFT JOIN users t3 ON t3.id=t0.owner_id
                 $validated['datasources'] = strip_tags($validated['datasources']);
                 $validated['texts'] = strip_tags($validated['texts']);
                 $validated['info'] = strip_tags($validated['info']);
+                if ($request->file('file') != null) {
+                    $relativeName = $this->storeFile($request);
+                    if ($relativeName == null) {
+                        $rc = back()->withErrors($validator)->withInput();
+                    } else {
+                        $validated['image'] = $relativeName;
+                    }
+                }
                 $process->update($validated);
             }
         }
index 307ca871cd7b0364e23dde80876bf1e63e53c10a..797f688f25485e39cc0f434b5e81d18eb11a80c4 100644 (file)
@@ -23,7 +23,9 @@ class Process extends Model
         'datasources',
         'texts',
         'info',
-        'owner_id'
+        'owner_id',
+        'xmlfile',
+        'image',
     ];
     public static function nextSerialNo(): int
     {
index 697ec82e1c7f3f43206083e32e518c51dc2dba06..70b44cd39a3de538612a48653fc95d983e6a77a2 100644 (file)
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "7.9.2",
+            "version": "7.9.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "d281ed313b989f213357e3be1a179f02196ac99b"
+                "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
-                "reference": "d281ed313b989f213357e3be1a179f02196ac99b",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
+                "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
                 "shasum": ""
             },
             "require": {
             ],
             "support": {
                 "issues": "https://github.com/guzzle/guzzle/issues",
-                "source": "https://github.com/guzzle/guzzle/tree/7.9.2"
+                "source": "https://github.com/guzzle/guzzle/tree/7.9.3"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-07-24T11:22:20+00:00"
+            "time": "2025-03-27T13:37:11+00:00"
         },
         {
             "name": "guzzlehttp/promises",
-            "version": "2.0.4",
+            "version": "2.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/promises.git",
-                "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
+                "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
-                "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c",
+                "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c",
                 "shasum": ""
             },
             "require": {
             ],
             "support": {
                 "issues": "https://github.com/guzzle/promises/issues",
-                "source": "https://github.com/guzzle/promises/tree/2.0.4"
+                "source": "https://github.com/guzzle/promises/tree/2.2.0"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-10-17T10:06:22+00:00"
+            "time": "2025-03-27T13:27:01+00:00"
         },
         {
             "name": "guzzlehttp/psr7",
-            "version": "2.7.0",
+            "version": "2.7.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/psr7.git",
-                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
+                "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
-                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16",
+                "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16",
                 "shasum": ""
             },
             "require": {
             ],
             "support": {
                 "issues": "https://github.com/guzzle/psr7/issues",
-                "source": "https://github.com/guzzle/psr7/tree/2.7.0"
+                "source": "https://github.com/guzzle/psr7/tree/2.7.1"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-07-18T11:15:46+00:00"
+            "time": "2025-03-27T12:30:47+00:00"
         },
         {
             "name": "guzzlehttp/uri-template",
             "dist": {
                 "type": "path",
                 "url": "../laraknife",
-                "reference": "919c89cab04807f66b7f4a4881139e8df5b687b9"
+                "reference": "31ee280aefb8164691f9d80d4f6e60e0338430e1"
             },
             "require-dev": {
                 "phpunit/phpunit": "11.0.x-dev"
         },
         {
             "name": "laravel/serializable-closure",
-            "version": "v2.0.3",
+            "version": "v2.0.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laravel/serializable-closure.git",
-                "reference": "f379c13663245f7aa4512a7869f62eb14095f23f"
+                "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f379c13663245f7aa4512a7869f62eb14095f23f",
-                "reference": "f379c13663245f7aa4512a7869f62eb14095f23f",
+                "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b352cf0534aa1ae6b4d825d1e762e35d43f8a841",
+                "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841",
                 "shasum": ""
             },
             "require": {
                 "issues": "https://github.com/laravel/serializable-closure/issues",
                 "source": "https://github.com/laravel/serializable-closure"
             },
-            "time": "2025-02-11T15:03:05+00:00"
+            "time": "2025-03-19T13:51:03+00:00"
         },
         {
             "name": "laravel/tinker",
         },
         {
             "name": "symfony/console",
-            "version": "v7.2.1",
+            "version": "v7.2.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/console.git",
-                "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3"
+                "reference": "e51498ea18570c062e7df29d05a7003585b19b88"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/console/zipball/fefcc18c0f5d0efe3ab3152f15857298868dc2c3",
-                "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3",
+                "url": "https://api.github.com/repos/symfony/console/zipball/e51498ea18570c062e7df29d05a7003585b19b88",
+                "reference": "e51498ea18570c062e7df29d05a7003585b19b88",
                 "shasum": ""
             },
             "require": {
                 "terminal"
             ],
             "support": {
-                "source": "https://github.com/symfony/console/tree/v7.2.1"
+                "source": "https://github.com/symfony/console/tree/v7.2.5"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-12-11T03:49:26+00:00"
+            "time": "2025-03-12T08:11:12+00:00"
         },
         {
             "name": "symfony/css-selector",
         },
         {
             "name": "symfony/error-handler",
-            "version": "v7.2.4",
+            "version": "v7.2.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/error-handler.git",
-                "reference": "aabf79938aa795350c07ce6464dd1985607d95d5"
+                "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/error-handler/zipball/aabf79938aa795350c07ce6464dd1985607d95d5",
-                "reference": "aabf79938aa795350c07ce6464dd1985607d95d5",
+                "url": "https://api.github.com/repos/symfony/error-handler/zipball/102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b",
+                "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b",
                 "shasum": ""
             },
             "require": {
             "description": "Provides tools to manage errors and ease debugging PHP code",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/error-handler/tree/v7.2.4"
+                "source": "https://github.com/symfony/error-handler/tree/v7.2.5"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2025-02-02T20:27:07+00:00"
+            "time": "2025-03-03T07:12:39+00:00"
         },
         {
             "name": "symfony/event-dispatcher",
         },
         {
             "name": "symfony/http-foundation",
-            "version": "v7.2.3",
+            "version": "v7.2.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-foundation.git",
-                "reference": "ee1b504b8926198be89d05e5b6fc4c3810c090f0"
+                "reference": "371272aeb6286f8135e028ca535f8e4d6f114126"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ee1b504b8926198be89d05e5b6fc4c3810c090f0",
-                "reference": "ee1b504b8926198be89d05e5b6fc4c3810c090f0",
+                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/371272aeb6286f8135e028ca535f8e4d6f114126",
+                "reference": "371272aeb6286f8135e028ca535f8e4d6f114126",
                 "shasum": ""
             },
             "require": {
             "description": "Defines an object-oriented layer for the HTTP specification",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/http-foundation/tree/v7.2.3"
+                "source": "https://github.com/symfony/http-foundation/tree/v7.2.5"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2025-01-17T10:56:55+00:00"
+            "time": "2025-03-25T15:54:33+00:00"
         },
         {
             "name": "symfony/http-kernel",
-            "version": "v7.2.4",
+            "version": "v7.2.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-kernel.git",
-                "reference": "9f1103734c5789798fefb90e91de4586039003ed"
+                "reference": "b1fe91bc1fa454a806d3f98db4ba826eb9941a54"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f1103734c5789798fefb90e91de4586039003ed",
-                "reference": "9f1103734c5789798fefb90e91de4586039003ed",
+                "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b1fe91bc1fa454a806d3f98db4ba826eb9941a54",
+                "reference": "b1fe91bc1fa454a806d3f98db4ba826eb9941a54",
                 "shasum": ""
             },
             "require": {
             "description": "Provides a structured process for converting a Request into a Response",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/http-kernel/tree/v7.2.4"
+                "source": "https://github.com/symfony/http-kernel/tree/v7.2.5"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2025-02-26T11:01:22+00:00"
+            "time": "2025-03-28T13:32:50+00:00"
         },
         {
             "name": "symfony/mailer",
         },
         {
             "name": "symfony/process",
-            "version": "v7.2.4",
+            "version": "v7.2.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/process.git",
-                "reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf"
+                "reference": "87b7c93e57df9d8e39a093d32587702380ff045d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/process/zipball/d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf",
-                "reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf",
+                "url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d",
+                "reference": "87b7c93e57df9d8e39a093d32587702380ff045d",
                 "shasum": ""
             },
             "require": {
             "description": "Executes commands in sub-processes",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/process/tree/v7.2.4"
+                "source": "https://github.com/symfony/process/tree/v7.2.5"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2025-02-05T08:33:46+00:00"
+            "time": "2025-03-13T12:21:46+00:00"
         },
         {
             "name": "symfony/routing",
         },
         {
             "name": "symfony/yaml",
-            "version": "v7.2.3",
+            "version": "v7.2.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/yaml.git",
-                "reference": "ac238f173df0c9c1120f862d0f599e17535a87ec"
+                "reference": "4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/yaml/zipball/ac238f173df0c9c1120f862d0f599e17535a87ec",
-                "reference": "ac238f173df0c9c1120f862d0f599e17535a87ec",
+                "url": "https://api.github.com/repos/symfony/yaml/zipball/4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912",
+                "reference": "4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912",
                 "shasum": ""
             },
             "require": {
             "description": "Loads and dumps YAML files",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/yaml/tree/v7.2.3"
+                "source": "https://github.com/symfony/yaml/tree/v7.2.5"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2025-01-07T12:55:42+00:00"
+            "time": "2025-03-03T07:12:39+00:00"
         },
         {
             "name": "theseer/tokenizer",
index 471de7569b579e97dff59421072684b4d78231e4..06a68d3467282d85281e90119923735d82512298 100644 (file)
@@ -25,6 +25,8 @@ return new class extends Migration
             $table->text('texts')->nullable();
             $table->text('info')->nullable();
             $table->foreignId('owner_id')->nullable()->references('id')->on('users');
+            $table->string('xmlfile')->nullable();
+            $table->string('image')->nullable();
         });
     }
 
index 523577433ddd95346d0004d3ad208df731108be1..aedbd04fb5bb6345052a8b8e2709700e7724eb55 100644 (file)
@@ -9,9 +9,9 @@
             <x-laraknife.forms.const-text position="alone" name="message" text="{{ $context->valueOf('message') }}"
                 width1="0" width2="12" />
             <input type="hidden" name="owner_id" value="{{ $context->valueOf('owner_id') }}">
-            <x-laraknife.forms.combobox position="first" name="division_scope" label="Division" :options="$optionsDivision"
+            <x-laraknife.forms.combobox position="first" name="division_scope" label="Abteilung" :options="$optionsDivision"
                 width2="4" />
-            <x-laraknife.forms.combobox position="last" name="activity_scope" label="Activity" :options="$optionsActivity"
+            <x-laraknife.forms.combobox position="last" name="activity_scope" label="Tätigkeitsfeld" :options="$optionsActivity"
                 width2="4" />
         </x-laraknife.panels.create>
     </form>
index e861983bd852904fde82616f6fce262a0fb7f293..127c1acca0601c0606e17f0b9beee5ba0e0af01c 100644 (file)
@@ -1,7 +1,7 @@
 @extends('layouts.backend')
 
 @section('content')
-    <form id="process-edit" action="/process-update/{{ $context->model->id }}" method="POST">
+    <form enctype="multipart/form-data" id="process-edit" action="/process-update/{{ $context->model->id }}" method="POST">
         @csrf
         <x-laraknife.panels.edit title="Änderung einer Prozessbeschreibung">
             <x-laraknife.forms.string position="alone" name="title" label="Title" value="{{ $context->valueOf('title') }}"
                 width2="4" rows="4" attribute="readonly" />
             <x-laraknife.forms.text position="last" name="subprocesses" label="Sub-Prozesse"
                 value="{{ $context->valueOf('subprocesses') }}" width2="4" rows="4" attribute="readonly" />
-                <x-laraknife.forms.text position="first" name="texts" label="Texte" value="{{ $context->valueOf('texts') }}"
-                    width2="4" rows="4" attribute="readonly" />
+            <x-laraknife.forms.text position="first" name="texts" label="Texte" value="{{ $context->valueOf('texts') }}"
+                width2="4" rows="4" attribute="readonly" />
             <x-laraknife.forms.text position="last" name="datasources" label="Datenquellen"
                 value="{{ $context->valueOf('datasources') }}" width2="4" rows="4" attribute="readonly" />
             <x-laraknife.forms.text position="alone" name="info" label="Info" value="{{ $context->valueOf('info') }}"
                 width2="10" rows="2" />
+            <x-laraknife.forms.string position="alone" name="xmlfile" label="XML-Datei"
+                value="{{ basename($context->valueOf('xmlfile')) }}" width2="4" attribute="readonly" />
+            <x-laraknife.forms.string position="first" name="image" label="Bild-Datei"
+                value="{{ basename($context->valueOf('image')) }}" width2="4" attribute="readonly" />
+            <x-laraknife.forms.file position="last" name="file" label="Neue Bilddatei" width2="4" />
         </x-laraknife.panels.edit>
     </form>
 @endsection
index 33fc8c6d76d90a30c7e15408a5ef37ea2e2ef4fa..3256cdf3488dd7dca8569a3826125c9be20494d0 100644 (file)
@@ -25,6 +25,7 @@
             <th sortId="division">Abteilung</th>
             <th sortId="activity">Tätigkeitsfeld</th>
             <th sortId="path">Pfad</th>
+            <th sortId="image">Bild</th>
             <th sortId="owner">Besitzer</th>
             <th></th>
           </tr>
               <td>{{ __($process->division) }}</td>
               <td>{{ __($process->activity) }}</td>
               <td>{{$process->path}}</td>
+              <td>
+              @if ($process->image != null && $process)
+              <a href="{{$context->urlStorage()}}/{{$process->image}}">{{basename($process->image)}}
+              @endif
+              </td>
               <td>{{$process->owner}}</td>
             <td><x-laraknife.icons.delete-record module="process" no="{{ $process->id }}" /></td>
         </tr>
index 5bb71990bdcf574f62c260180532e14dfae72a3b..64f957a3678360e1c692dcc20b85c6a05e301289 100644 (file)
                 value="{{ $context->valueOf('datasources') }}" width2="4" attribute="readonly" rows="4" />
             <x-laraknife.forms.text position="alone" name="info" label="Info" value="{{ $context->valueOf('info') }}"
                 width2="10" attribute="readonly" rows="2" />
+                <x-laraknife.forms.string position="first" name="xmlfile" label="XML-Datei"
+                value="{{ $context->valueOf('xmlfile') }}" width2="4" attribute="readonly" />
+            <x-laraknife.forms.string position="last" name="image" label="Bild-Datei"
+                value="{{ $context->valueOf('image') }}" width2="4" attribute="readonly" />
         </x-laraknife.panels.show>
     </form>
 @endsection