From 8a60a389778a03d5c3eec8d653e514adc8da7a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Wed, 25 Oct 2023 11:02:44 +0200 Subject: [PATCH] wip --- resources/views/fields/file-option.blade.php | 18 ++--- resources/views/media/medium.blade.php | 4 +- src/Console/Commands/ResourceMake.php | 2 +- src/Fields/BelongsToMany.php | 77 ++++++++++---------- src/Fields/Boolean.php | 2 +- src/Fields/File.php | 19 +++-- src/Fields/Media.php | 8 +- src/Models/Attachment.php | 14 +++- src/Models/Medium.php | 8 ++ 9 files changed, 83 insertions(+), 69 deletions(-) diff --git a/resources/views/fields/file-option.blade.php b/resources/views/fields/file-option.blade.php index edabacad4..7766394ca 100644 --- a/resources/views/fields/file-option.blade.php +++ b/resources/views/fields/file-option.blade.php @@ -1,17 +1,13 @@
- @if($medium->isImage) - {{ $label }} + @if($isImage) + {{ $label }} @else @endif - {{ $label }} + {{ $label }}
@@ -20,8 +16,8 @@ class="file-list-item__thumbnail" type="button" class="btn btn--light btn--sm btn--icon" aria-label="{{ __('Edit') }}" - aria-describedby="{{ $medium->uuid }}" - x-on:click="$dispatch('open-{{ $medium->uuid }}')" + aria-describedby="{{ $uuid }}" + x-on:click="$dispatch('open-{{ $uuid }}')" > @@ -30,7 +26,7 @@ class="btn btn--light btn--sm btn--icon" type="button" class="btn btn--delete btn--sm btn--icon" aria-label="{{ __('Remove') }}" - aria-describedby="{{ $medium->uuid }}" + aria-describedby="{{ $uuid }}" x-on:click="selection.splice(index, 1)" > @@ -39,7 +35,7 @@ class="btn btn--delete btn--sm btn--icon"
@if(! empty($fields)) - + @foreach($fields as $field) @include($field['template'], $field) @endforeach diff --git a/resources/views/media/medium.blade.php b/resources/views/media/medium.blade.php index 2d0ce59e2..361ce6b6b 100644 --- a/resources/views/media/medium.blade.php +++ b/resources/views/media/medium.blade.php @@ -16,10 +16,10 @@ class="media-item" -