Select Git revision
definir-auteur.php
definir-auteur.php 1.54 KiB
@extends('layouts.page-layout')
@section('title', 'Définir les auteurs d'un livre')
@section('content')
<div class="container mt-3">
<h1>Définir les auteurs d'un livre</h1>
<p>Voici la liste des auteurs. Vous pouvez choisir de les associer ou de les dissocier du livre.</p>
<table class="table">
<thead>
<tr class="table-dark">
<th scope="col">n°</th>
<th scope="col">Nom</th>
<th scope="col">Prénom</th>
<th scope="col">Année de naissance</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
@foreach($autorsList as $autor)
<tr>
<th scope="row">{{ $autor['numAuteur'] }}</th>
<td>{{ $autor['nom'] }}</td>
<td>{{ $autor['prenom'] }}</td>
<td>{{ $autor['anneeNaissance'] }}</td>
@if($autor['isBookAutor'])
<td><a href="index.php?action=supprimerAuteurDuLivre&numLivre={{ $book->numLivre }}&numAuteur={{ $autor['numAuteur'] }}"
class="btn btn-sm btn-danger">Dissocier</a> </td>
@else
<td><a href="index.php?action=ajouterAuteurDuLivre&numLivre={{ $book->numLivre }}&numAuteur={{ $autor['numAuteur'] }}"
class="btn btn-sm btn-success">Associer</a> </td>
@endif
</tr>
@endforeach
</tbody>
</table>
</div>
@endsection