]> gitweb.hamatoma.de Git - zentrum.gemeinwohl-gesellschaft.org.git/commitdiff
V0.1.5 ProcessController
authorHamatoma <author@hamatoma.de>
Sat, 29 Mar 2025 11:40:56 +0000 (12:40 +0100)
committerHamatoma <author@hamatoma.de>
Sat, 29 Mar 2025 11:40:56 +0000 (12:40 +0100)
- ProcessController:
  - Darstellung xlmfile/image als Links

CHANGELOG.md
app/Http/Controllers/ProcessController.php
composer.lock
resources/views/process/edit.blade.php
resources/views/process/index.blade.php

index a9aaebbfe798dbee2ab125f4cb0eb99b316a5b29..1aee7c8ce9e235f79c083f29361bc514d4c10496 100644 (file)
@@ -1,5 +1,10 @@
 # Ă„nderungen an zentrum
 
+# V0.1.5 ProcessController
+
+- ProcessController:
+  - Darstellung xlmfile/image als Links
+  
 # V0.1.4 Process
 
 - Process: neu: +xmlfile +image
index ca9b30eb49f1bb6bc4ecbf1a31d6056f368ecc19..d446ae9788360188f7b4dca1efa4f6d1fb077d0d 100644 (file)
@@ -74,10 +74,12 @@ class ProcessController extends Controller
                     'image' => $process->image
                 ];
             }
+            $fields['referenceXml'] = FileHelper::urlUpload() . '/' . $process->xmlfile;
+            $fields['referenceImage'] = $process->image == null ? '#' : FileHelper::urlUpload() . '/' . $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'], __('-'));
+            $optionsOwner = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['owner_id'], '-');
             $rc = view('process.edit', [
                 'context' => $context,
                 'optionsDivision' => $optionsDivision,
@@ -297,7 +299,6 @@ LEFT JOIN users t3 ON t3.id=t0.owner_id
     public function storeFile(Request $request): ?string
     {
         $rc = null;
-        $file = $request->file();
         $file = $request->file('file');
         if ($file != null) {
             $filename = substr($file->getClientOriginalName(), 0, 200);
index 70b44cd39a3de538612a48653fc95d983e6a77a2..790c4a2acc574070f85605483600d45a96eebea6 100644 (file)
             "dist": {
                 "type": "path",
                 "url": "../laraknife",
-                "reference": "31ee280aefb8164691f9d80d4f6e60e0338430e1"
+                "reference": "bcdc9636b6c2e9ecaa82cf5701434eebe91386a1"
             },
             "require-dev": {
                 "phpunit/phpunit": "11.0.x-dev"
index 127c1acca0601c0606e17f0b9beee5ba0e0af01c..99ed05229fd37034a3e67c1b27dd3de5768cb9af 100644 (file)
                 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.link position="alone" name="xmlfile" label="XML-Datei"
+                reference="{{ $context->valueOf('referenceXml') }}" text="{{ basename($context->valueOf('xmlfile')) }}"
+                width2="4" />
+            @if ($context->valueOf('image') != null)
+                <x-laraknife.forms.link position="first" name="image" label="Bild-Datei"
+                    reference="{{ $context->valueOf('referenceImage') }}"
+                    text="{{ basename($context->valueOf('image')) }}" width2="4" />
+            @else
+                <x-laraknife.forms.const-text position="first" name="image" label="Bild-Datei"
+                    text="" width2="4" />
+            @endif
             <x-laraknife.forms.file position="last" name="file" label="Neue Bilddatei" width2="4" />
         </x-laraknife.panels.edit>
     </form>
index 3256cdf3488dd7dca8569a3826125c9be20494d0..0756f3fdf0cf0fb0adc54bc8253a1759ce86e09f 100644 (file)
@@ -41,7 +41,7 @@
               <td>{{$process->path}}</td>
               <td>
               @if ($process->image != null && $process)
-              <a href="{{$context->urlStorage()}}/{{$process->image}}">{{basename($process->image)}}
+              <a href="{{$context->urlUpload($process->image)}}">{{basename($process->image)}}
               @endif
               </td>
               <td>{{$process->owner}}</td>