libraryItem tagging added

This commit is contained in:
HolgerHatGarKeineNode
2023-02-11 20:25:39 +01:00
parent b528f509dd
commit dc1edcde08
2 changed files with 52 additions and 2 deletions

View File

@@ -71,7 +71,28 @@
/>
</x-input.group>
@if($libraryItem->lecturer_id && $libraryItem->type && $library)
<x-input.group :for="md5('selectedTags')" :label="__('Tags')">
<div class="py-2 flex flex-wrap items-center space-x-1">
@foreach($tags as $tag)
<div class="cursor-pointer" wire:key="tag{{ $loop->index }}"
wire:click="selectTag('{{ $tag->name }}')">
@if(collect($selectedTags)->contains($tag->name))
<x-badge
amber>
{{ $tag->name }}
</x-badge>
@else
<x-badge
black>
{{ $tag->name }}
</x-badge>
@endif
</div>
@endforeach
</div>
</x-input.group>
@if($libraryItem->lecturer_id && $libraryItem->type && $library && count($selectedTags) > 0)
<x-input.group :for=" md5('image')" :label="__('Main picture')">
<div class="py-4">
@if ($image)