2017-11-12 23:36:48 +01:00
|
|
|
|
@extends('layouts.app')
|
|
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-8 col-md-offset-2">
|
|
|
|
|
<div class="panel panel-default">
|
2017-11-21 07:20:06 +01:00
|
|
|
|
<div class="panel-heading">Dashboard @if($type !== 'all') − <a href="<?php echo route('home'); ?>">Revenir à la liste</a>@endif</div>
|
2017-11-12 23:36:48 +01:00
|
|
|
|
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
@if (session('status'))
|
|
|
|
|
<div class="alert alert-success">
|
|
|
|
|
{{ session('status') }}
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
<table class="table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Image</th>
|
|
|
|
|
<th>Titre</th>
|
|
|
|
|
<th>Date</th>
|
|
|
|
|
<th>Options</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>@foreach($deals as $deal)
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
2017-11-13 11:28:32 +01:00
|
|
|
|
<img src="{{ $deal->getImages()[0] ?? null }}" width="60" />
|
2017-11-12 23:36:48 +01:00
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
{{$deal->getSubject()}}
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
{{$deal->getDateCreation()->format('d/m/Y')}}
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<a href="<?php echo route('deals.view', ['type' => $type, 'id' => $deal->getId()]); ?>">Voir</a>
|
2017-11-21 07:20:06 +01:00
|
|
|
|
@if( $type === 'backup')
|
|
|
|
|
<form method="POST" action="<?php echo route('deals.delete', ['type' => $type, 'id' => $deal->getId()]); ?>">
|
|
|
|
|
{{ csrf_field() }}
|
|
|
|
|
<button type="submit">Supprimer</button>
|
|
|
|
|
</form>
|
|
|
|
|
@endif
|
2017-11-12 23:36:48 +01:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
@endforeach</tbody>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@endsection
|