news edit

This commit is contained in:
HolgerHatGarKeineNode
2023-02-11 13:41:22 +01:00
parent d753af1123
commit 89bbf6ff1d
3 changed files with 17 additions and 5 deletions

View File

@@ -64,6 +64,14 @@
<span>{{ $libraryItem->read_time }} {{ __('min read') }}</span>
@endif
</div>
<div class="flex space-x-1 text-sm text-gray-500 justify-end">
@if($libraryItem->created_by == auth()->id())
<x-button :href="route('news.form', ['libraryItem' => $libraryItem])">
<i class="fa fa-thin fa-edit"></i>
{{ __('Edit') }}
</x-button>
@endif
</div>
</div>
</div>
</div>

View File

@@ -52,6 +52,10 @@
<div class="text-gray-200">{{ __('Preview') }}:</div>
<img class="h-48 object-contain" src="{{ $image->temporaryUrl() }}">
@endif
@if ($libraryItem->getFirstMediaUrl('main'))
<div class="text-gray-200">{{ __('Current picture') }}:</div>
<img class="h-48 object-contain" src="{{ $libraryItem->getFirstMediaUrl('main') }}">
@endif
</div>
<input class="text-gray-200" type="file" wire:model="image">
@error('image') <span class="text-red-500">{{ $message }}</span> @enderror