ldc-doux/resources/views/back/sliders/edit.blade.php

66 lines
3 KiB
PHP
Raw Permalink Normal View History

2021-12-06 08:51:51 +01:00
@extends('layouts.backend')
@section('content')
<form action="{{ route('bo.sliders.update', $slider->id) }}" method="POST" enctype="multipart/form-data">
@method('PUT')
@csrf
<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"><a href="{{route('bo.sliders.index')}}" class="h2 text-decoration-none">
2021-12-07 23:35:14 +01:00
< </a> {{ __('Slider') }} <small class="text-muted">{{ __('Édition') }}</small></h1>
2021-12-06 08:51:51 +01:00
@if (session('success'))
<span class="float-center text-success">{{ session('success') }}</span>
@endif
<div class="btn-toolbar mb-2 mb-md-0">
2021-12-07 23:35:14 +01:00
<button type="submit" class="btn btn-sm btn-primary">{{ __('Enregistrer') }}</a>
2021-12-06 08:51:51 +01:00
</div>
</div>
2021-12-07 23:35:14 +01:00
@include('back.sliders.form-inputs')
2021-12-06 08:51:51 +01:00
</form>
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
2021-12-07 23:35:14 +01:00
<h2><small class="text-muted">{{ __('Slides') }}</small></h2>
2021-12-06 08:51:51 +01:00
</div>
<table class="table">
<thead class="thead-dark">
<tr>
2021-12-07 23:35:14 +01:00
<th scope="col">{{ __('Image') }}</th>
<th scope="col">{{ __('Lien') }}</th>
<th scope="col">{{ __('Début') }}</th>
<th scope="col">{{ __('Fin') }}</th>
<th scope="col">{{ __('Slider de regroupement') }}</th>
<th scope="col">{{ __('Ordre') }}</th>
2021-12-06 08:51:51 +01:00
<th scope="col"></th>
</tr>
</thead>
<tbody>
@foreach($slider->slides as $slide)
<tr>
2022-01-21 14:26:44 +01:00
<td>@if (!empty($slide->picture))<img src="{{ asset($slide->picture) }}" height="50px">@endif</td>
2021-12-06 08:51:51 +01:00
<td><a href="{{$slide->link}}" target="_slide">{{ $slide->link_label }}</a></td>
2021-12-17 17:27:25 +01:00
<td>{{date_format($slide->date_start, "d/m/Y H:i")}}</td>
<td>{{date_format($slide->date_end, "d/m/Y H:i")}}</td>
2021-12-06 08:51:51 +01:00
<td>{{$slide->slider->label}}</td>
<td>
@if ($loop->first)
2021-12-07 23:35:14 +01:00
<a href="{{route('bo.slides.change-order', ['slide' => $slide->id, 'action' => 'down'])}}" class="btn-link text-decoration-none">
>
2021-12-06 08:51:51 +01:00
</a>
@elseif($loop->last)
2021-12-07 23:35:14 +01:00
<a href="{{route('bo.slides.change-order', ['slide' => $slide->id, 'action' => 'up'])}}" class="btn-link text-decoration-none">
<
2021-12-06 08:51:51 +01:00
</a>
@else
2021-12-07 23:35:14 +01:00
<a href="{{route('bo.slides.change-order', ['slide' => $slide->id, 'action' => 'up'])}}" class="btn-link text-decoration-none">
<
2021-12-06 08:51:51 +01:00
</a>
2021-12-07 23:35:14 +01:00
<a href="{{route('bo.slides.change-order', ['slide' => $slide->id, 'action' => 'down'])}}" class="btn-link text-decoration-none">
>
2021-12-06 08:51:51 +01:00
</a>
@endif
</td>
2021-12-07 23:35:14 +01:00
<td><a href="{{route('bo.slides.edit', ['slide' => $slide->id])}}" class="btn btn-sm btn-primary">{{ __('Éditer') }}</a></td>
2021-12-06 08:51:51 +01:00
</tr>
@endforeach
</tbody>
</table>
2022-01-21 14:26:44 +01:00
@endsection