ldc-doux/resources/views/back/moments/index.blade.php
Olivier Legat 9c050451e3 Bo Moments
2022-01-30 13:57:46 +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">{{ __('Actualités') }} <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.moments.create')}}" class="btn btn-primary float-right">{{ __('Créer un moment') }}</a> --}}
</div>
<table class="table">
<thead>
<th scope="col">{{ __('Année') }}</th>
<th class="wdt50" scope="col">{{ __('Titre') }}</th>
<th scope="wdt50">{{ __('Image') }}</th>
<th></th>
</thead>
<tbody>
@foreach ($moments as $moment)
<tr>
<td>{{$moment->title}}</td>
<td>{{$moment->subtitle}}</td>
<td>
@if (!empty($moment->picture))
<img src="{{$moment->picture}}" alt="{{$moment->title}}" style="max-height: 50px;">
@endif
</td>
<td class="text-center">
<a href="{{route('bo.moments.edit', $moment->id)}}" class="btn btn-sm btn-primary">{{ __('Éditer') }}</a>
{{--<form action="{{route('bo.moments.destroy', $moment->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