fanatic/resources/views/livewire/admin/list-fanlistings.blade.php

51 lines
1.8 KiB
PHP
Raw Normal View History

2022-04-25 19:50:01 -07:00
<div>
2022-04-26 20:35:32 -07:00
<input type="text" name="search" placeholder="Search fanlistings..." class="form__input--search"
2022-04-28 12:01:17 -07:00
wire:model="searchTerm" />
2022-04-25 19:50:01 -07:00
<table class="table">
2022-04-28 12:01:17 -07:00
<thead class="table__thead">
<tr>
<th>{{-- approved --}}</th>
<th>Subject</th> {{-- link --}}
<th>Categories</th>
<th>Image</th>
<th colspan="3">Actions</th>
</tr>
</thead>
2022-04-25 19:50:01 -07:00
2022-04-28 12:01:17 -07:00
<tbody class="table__tbody">
@foreach ($fanlistings as $fl)
<tr>
<td>
@if (!$fl->approved)
<span class="text--error">&times;</span>
@endif
</td>
<td><a href="{{ $fl->url }}" target="_blank">{{ $fl->subject }}</a></td>
<td>{{ $fl->listCategories() }}</td>
<td><img src="/storage/{{ $fl->image }}"></td>
2022-04-25 19:50:01 -07:00
2022-04-28 12:01:17 -07:00
<td>
@if ($class == 'joined' && $fl->approved == false)
<button wire:click="approve({{ $fl }})" class="btn--table">
Approve
</button>
@elseif ($class == 'owned')
2022-04-30 13:36:32 -07:00
<a href="{{ route('admin.owned.manage', $fl) }}" class="btn--table">Manage</a>
2022-04-28 12:01:17 -07:00
@endif
</td>
2022-04-25 19:50:01 -07:00
2022-04-28 12:01:17 -07:00
<td>
<a href="{{ route("admin.$class.edit", $fl) }}" class="btn--table">Edit</a>
</td>
2022-04-25 19:50:01 -07:00
2022-04-28 12:01:17 -07:00
<td>
2022-04-30 13:36:32 -07:00
<x-admin.form.destroy :object="$fl" :route="'admin.'.$class.'.destroy'"
:btnClass="'btn--table'" />
2022-04-28 12:01:17 -07:00
</td>
</tr>
@endforeach
</tbody>
</table>
2022-04-25 19:50:01 -07:00
2022-04-28 12:01:17 -07:00
{{ $fanlistings->links() }}
</div>