ldc-jeusselin/resources/views/bo/articles/index.blade.php
Jérémy Munsch de4dcfb283
Closes #2 and #4
- Add status checker + admin secure packages + upgrade enum + add sentry + upgrade to sitemap generator + bump to CRMV2
- Set customer role enum and user role enum
- Update customer migration to set roles
- phpcbf
- faker local to fr
- update lang
- composer update
- bump laravel ui
- Redo all user crud
- npm bump
- Create admin command
- rearrange views
- redo all auth system
- redo customer pro bo
2023-08-21 15:43:33 +02:00

46 lines
1.9 KiB
PHP

@extends('layouts.bo')
@section('content')
<div class="card">
<div class="card-header">
Liste des articles
<a href="{{route('bo.articles.create')}}" class="btn btn-sm btn-primary float-right">Ajouter</a>
</div>
<div class="card-body">
<table class="table table-striped table-sm no-wrap-header text-center">
<thead class="thead-light">
<tr>
<th scope="col">Titre</th>
<th scope="col">Catégorie&nbsp;
@include('bo.modules.sorter', ['colname' => 'category_id', 'list' => 'articles'])</th>
<th scope="col">Publié ?&nbsp;
@include('bo.modules.sorter', ['colname' => 'status', 'list' => 'articles'])</th>
<th><a href="{{ route(Route::currentRouteName(), ['rst' => 1]) }}" class="float-right btn btn-sm btn-dark">Réinitialiser le tri</a></th>
</tr>
</thead>
<tbody>
@foreach($a as $article)
<tr>
<th>{{$article->title}}</th>
<td>{{$article->category->name}}</td>
<td>
@if ($article->status === 0)
<i class="fas fa-times cross-red"></i>
@else
<i class="fas fa-check check-green"></i>
@endif
</td>
<td><a href="{{route('bo.articles.edit', $article->id)}}" class="btn btn-sm btn-primary">Éditer</a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="row justify-content-center">
<div class="col-12 col-md-6 p-0 p-md-3">
{{ $a->withQueryString()->onEachSide(1)->links() }}
</div>
</div>
</div>
</div>
@endsection