ldc-doux/resources/views/back/pictos/index.blade.php
2022-01-23 12:31:21 +01:00

44 lines
1.7 KiB
PHP

@extends('layouts.backend')
@section('content')
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">{{ __('Pictogrammes') }} <small class="text-muted">{{ __('Liste') }}</small></h1>
@if ($errors->any())
@foreach($errors->all() as $error)
<span class="float-center text-danger">{{ $error }}</span>
@endforeach
@endif
<a href="{{route('bo.pictos.create')}}" class="btn btn-primary float-right">{{ __('Créer un pictogramme') }}</a>
</div>
<table class="table">
<thead>
<th scope="col">{{ __('Image') }}</th>
<th scope="col">{{ __('Chemin') }}</th>
<th scope="col">{{ __('Texte') }}</th>
<th></th>
</thead>
<tbody>
@foreach ($pictos as $picto)
<tr>
<th class="white-png">
@if (!empty($picto->picture))
<img src="{{$picto->picture}}" alt="{{$picto->text}}" style="max-height: 50px;">
@endif
</th>
<td>{{$picto->picture}}</td>
<td>{{$picto->text}}</td>
<td class="text-center">
<a href="{{route('bo.pictos.edit', $picto->id)}}" class="btn btn-sm btn-primary">{{ __('Éditer') }}</a>
<form action="{{route('bo.pictos.destroy', $picto->id)}}" method="POST" class="d-inline">
@method('DELETE')
@csrf
<input type="submit" class="btn btn-sm btn-danger" value="Supprimer" onclick="return confirm('Êtes-vous sûr(e) ?')">
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection