ldc-legaulois/resources/views/bo/ranges/index.blade.php
2021-04-28 13:57:12 +02:00

60 lines
2.8 KiB
PHP

@extends('layouts.bo')
@section('content')
<div class="card">
<div class="card-header">
Gammes
<a href="{{route('bo.ranges.create')}}" class="btn btn-sm btn-primary float-right">Ajouter</a>
</div>
<div class="card-body">
{{ $r->withQueryString()->links() }}
<table class="table text-center">
<thead class="thead-dark">
<tr>
<th scope="col">Nom</th>
<th scope="col">Publié ?</th>
<th scope="col">Ordre</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@foreach($r as $range)
<tr>
<th>{{$range->name}}</th>
<td>
<a href="{{route('bo.ranges.change-published', $range)}}" class="btn-link">
@if ($range->status)
<i class="fas fa-check check-green"></i>
@else
<i class="fas fa-times cross-red"></i>
@endif
</a>
</td>
<td>
@if ($loop->first)
<a href="{{route('bo.ranges.change-order', ['id' => $range->id, 'action' => 'down'])}}" class="btn-link text-decoration-none">
<i name="down_arrow" class="icon-size far fa-arrow-alt-circle-down"></i>
</a>
@elseif($loop->last)
<a href="{{route('bo.ranges.change-order', ['id' => $range->id, 'action' => 'up'])}}" class="btn-link text-decoration-none">
<i name="up_arrow" class="icon-size far fa-arrow-alt-circle-up"></i>
</a>
@else
<a href="{{route('bo.ranges.change-order', ['id' => $range->id, 'action' => 'down'])}}" class="btn-link text-decoration-none">
<i name="down_arrow" class="icon-size far fa-arrow-alt-circle-down"></i>
</a>
<a href="{{route('bo.ranges.change-order', ['id' => $range->id, 'action' => 'up'])}}" class="btn-link text-decoration-none">
<i name="up_arrow" class="icon-size far fa-arrow-alt-circle-up"></i>
</a>
@endif
</td>
<td><a href="{{route('bo.ranges.edit', ['range' => $range->id])}}" class="btn btn-sm btn-primary">Éditer</a></td>
</tr>
@endforeach
</tbody>
</table>
{{ $r->withQueryString()->links() }}
</div>
</div>
@endsection