Merge branch 'j2/ajout_repo' of https://10.4.0.131/gitea/DI1-P4-E1/Webzine into j2/feat/repository-commentaire
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Webzine.WebApplication.Areas.Administration.Controllers;
|
||||
public class ArtisteController : Controller
|
||||
{
|
||||
// Injection du logger via le constructeur
|
||||
private readonly ILogger<ArtisteController> _logger;
|
||||
private readonly ILogger<ArtisteController> logger;
|
||||
private readonly IArtisteRepository _artisteRepository;
|
||||
private readonly List<Artiste> _artistes = new List<Artiste>();
|
||||
|
||||
@@ -18,8 +18,8 @@ public class ArtisteController : Controller
|
||||
public ArtisteController(ILogger<ArtisteController> logger,
|
||||
IArtisteRepository artisteRepository)
|
||||
{
|
||||
this._logger = logger;
|
||||
this._logger.LogDebug(1, "initialisation du ArtisteController d'administration");
|
||||
this.logger = logger;
|
||||
this.logger.LogDebug(1, "initialisation du ArtisteController d'administration");
|
||||
this._artisteRepository = artisteRepository;
|
||||
this._artistes.AddRange(this._artisteRepository.FindAll());
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Webzine.WebApplication.Areas.Administration.Controllers
|
||||
|
||||
if (commentaire == null)
|
||||
{
|
||||
this._logger.LogWarning("Commentaire avec ID {Id} introuvable pour suppression.", id);
|
||||
this.logger.LogWarning("Commentaire avec ID {Id} introuvable pour suppression.", id);
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<thead class="table-active">
|
||||
<tr>
|
||||
<th scope="col" class="p-2">Nom</th>
|
||||
<th scope="col" class="text-center p-2" style="width: 100px;">Actions</th>
|
||||
<th scope="col" class="text-center p-2">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<div class="container">
|
||||
<!-- ARTISTE -->
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-3 col-form-label">Nom de l'artiste<span class="text-danger">*</span></label>
|
||||
<div class="col-md-9">
|
||||
<input asp-for="Nom" class="form-control" />
|
||||
@@ -10,14 +10,15 @@
|
||||
</div>
|
||||
|
||||
<!-- BIOGRAPHIE -->
|
||||
<div class="row mb-3 align-items-center">
|
||||
<label class="col-md-3 col-form-label">Biographie<span class="text-danger">*</span></label>
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-3 col-form-label">Biographie</label>
|
||||
<div class="col-md-9">
|
||||
<input asp-for="Biographie" class="form-control"/>
|
||||
<textarea asp-for="Biographie" class="form-control" rows="5"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- BOUTONS -->
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-9 offset-md-3">
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
<thead class="table-active">
|
||||
<tr>
|
||||
<th scope="col">Titre</th>
|
||||
<th scope="col">Auteur</th>
|
||||
<th scope="col">Nom</th>
|
||||
<th scope="col">Commentaire</th>
|
||||
<th scope="col">Date de création</th>
|
||||
<th scope="col" class="text-center p-2" style="width: 100px" ;>Actions</th>
|
||||
<th scope="col" class="text-center p-2">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -25,7 +25,9 @@
|
||||
{
|
||||
<tr class="align-middle">
|
||||
<td>
|
||||
@commentaire.Titre.Libelle
|
||||
<a asp-action="Details" asp-controller="Titre" asp-route-id="@commentaire.Titre.IdTitre">
|
||||
@commentaire.Titre.Libelle
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
@commentaire.Auteur
|
||||
|
||||
@@ -12,19 +12,19 @@
|
||||
<div class="col-md-4">
|
||||
<a asp-area="Administration"
|
||||
asp-controller="Artiste">
|
||||
<div class="ratio ratio-4x3">
|
||||
|
||||
<div class="card shadow-sm p-4 bg-light h-100 dashboard-card">
|
||||
<i class="fa fa-users fa-3x text-primary mb-3"></i>
|
||||
<div class="py-5 bg-light rounded-3 d-flex flex-column justify-content-center align-items-center text-primary">
|
||||
<i class="fa fa-users fa-5x text-primary mb-3"></i>
|
||||
|
||||
<h3>
|
||||
@Model.NombreArtistes
|
||||
</h3>
|
||||
|
||||
<p>
|
||||
artistes
|
||||
</p>
|
||||
<h2>
|
||||
@Model.NombreArtistes
|
||||
</h2>
|
||||
<p>
|
||||
artistes
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -33,17 +33,17 @@
|
||||
<a asp-area=""
|
||||
asp-controller="Artiste"
|
||||
asp-route-nom="@Model.ArtisteLePlusChronique">
|
||||
<div class="ratio ratio-4x3">
|
||||
<div class="py-5 bg-light rounded-3 d-flex flex-column justify-content-center align-items-center text-primary">
|
||||
<i class="fa fa-user fa-5x text-primary mb-3"></i>
|
||||
|
||||
<div class="card shadow-sm p-4 bg-light h-100 dashboard-card">
|
||||
<i class="fa fa-user fa-3x text-primary mb-3"></i>
|
||||
<h2>
|
||||
@Model.ArtisteLePlusChronique
|
||||
</h2>
|
||||
|
||||
<h3>
|
||||
@Model.ArtisteLePlusChronique
|
||||
</h3>
|
||||
|
||||
<p>artiste le plus chroniqué</p>
|
||||
<p>artiste le plus chroniqué</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -52,19 +52,20 @@
|
||||
<a asp-area=""
|
||||
asp-controller="Artiste"
|
||||
asp-route-nom="@Model.AlbumLePlusChronique">
|
||||
<div class="ratio ratio-4x3">
|
||||
|
||||
<div class="card shadow-sm p-4 bg-light h-100 dashboard-card">
|
||||
<i class="fa fa-trophy fa-3x text-primary mb-3"></i>
|
||||
<div class="py-5 bg-light rounded-3 d-flex flex-column justify-content-center align-items-center text-primary">
|
||||
<i class="fa fa-trophy fa-5x text-primary mb-3"></i>
|
||||
|
||||
<h3>
|
||||
<h2>
|
||||
@Model.AlbumLePlusChronique
|
||||
</h3>
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
artiste avec le plus d'albums distincts
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -72,19 +73,20 @@
|
||||
<div class="col-md-4">
|
||||
<a asp-area="Administration"
|
||||
asp-controller="Titre">
|
||||
<div class="ratio ratio-4x3">
|
||||
|
||||
<div class="card shadow-sm p-4 bg-light h-100 dashboard-card">
|
||||
<i class="fa fa-book fa-3x text-primary mb-3"></i>
|
||||
<div class="py-5 bg-light rounded-3 d-flex flex-column justify-content-center align-items-center text-primary">
|
||||
<i class="fa fa-book fa-5x text-primary mb-3"></i>
|
||||
|
||||
<h3>
|
||||
<h2>
|
||||
@Model.NombreBiographies
|
||||
</h3>
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
biographies d'artistes
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -94,19 +96,20 @@
|
||||
asp-controller="Titre"
|
||||
asp-action="Details"
|
||||
asp-route-id="@Model.IdMusiqueLaPlusJouee">
|
||||
<div class="ratio ratio-4x3">
|
||||
|
||||
<div class="card shadow-sm p-4 bg-light h-100 dashboard-card">
|
||||
<i class="fa fa-compact-disc fa-3x text-primary mb-3"></i>
|
||||
<div class="py-5 bg-light rounded-3 d-flex flex-column justify-content-center align-items-center text-primary">
|
||||
<i class="fa fa-compact-disc fa-5x text-primary mb-3"></i>
|
||||
|
||||
<h4>
|
||||
<h2>
|
||||
@Model.MusiqueLaPlusJouee
|
||||
</h4>
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
titre le plus lu
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -114,19 +117,20 @@
|
||||
<div class="col-md-4">
|
||||
<a asp-area="Administration"
|
||||
asp-controller="Titre">
|
||||
<div class="ratio ratio-4x3">
|
||||
|
||||
<div class="card shadow-sm p-4 bg-light h-100 dashboard-card">
|
||||
<i class="fa fa-music fa-3x text-primary mb-3"></i>
|
||||
<div class="py-5 bg-light rounded-3 d-flex flex-column justify-content-center align-items-center text-primary">
|
||||
<i class="fa fa-music fa-5x text-primary mb-3"></i>
|
||||
|
||||
<h3>
|
||||
<h2>
|
||||
@Model.NombreTitres
|
||||
</h3>
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
titres
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -134,50 +138,57 @@
|
||||
<div class="col-md-4">
|
||||
<a asp-area="Administration"
|
||||
asp-controller="Styles">
|
||||
<div class="ratio ratio-4x3">
|
||||
|
||||
<div class="card shadow-sm p-4 bg-light h-100 dashboard-card">
|
||||
<i class="fa fa-tags fa-3x text-primary mb-3"></i>
|
||||
<div class="py-5 bg-light rounded-3 d-flex flex-column justify-content-center align-items-center text-primary">
|
||||
<i class="fa fa-tags fa-5x text-primary mb-3"></i>
|
||||
|
||||
<h3>
|
||||
<h2>
|
||||
@Model.NombreGenres
|
||||
</h3>
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
styles de musique
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- NOMBRE DE LECTURES -->
|
||||
<div class="col-md-4">
|
||||
<div class="card shadow-sm p-4 bg-light h-100">
|
||||
<i class="fa fa-eye fa-3x text-dark mb-3"></i>
|
||||
<div class="ratio ratio-4x3">
|
||||
|
||||
<h3>
|
||||
@Model.NombreLectures
|
||||
</h3>
|
||||
<div class="py-5 bg-light rounded-3 d-flex flex-column justify-content-center align-items-center">
|
||||
<i class="fa fa-eye fa-5x text-dark mb-3"></i>
|
||||
|
||||
<p>
|
||||
lectures
|
||||
</p>
|
||||
<h2>
|
||||
@Model.NombreLectures
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
lectures
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TOTAL LIKES -->
|
||||
<div class="col-md-4">
|
||||
<div class="card shadow-sm p-4 bg-light h-100">
|
||||
<i class="fa fa-thumbs-up fa-3x text-dark mb-3"></i>
|
||||
<div class="ratio ratio-4x3">
|
||||
|
||||
<h3>
|
||||
<div class="py-5 bg-light rounded-3 d-flex flex-column justify-content-center align-items-center">
|
||||
<i class="fa fa-thumbs-up fa-5x text-dark mb-3"></i>
|
||||
|
||||
<h2>
|
||||
@Model.NombreLikes
|
||||
</h3>
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
likes
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
@* Input *@
|
||||
<div class="me-3">
|
||||
<input asp-for="Libelle" class="form-control" style="width: 250px;" />
|
||||
<input asp-for="Libelle" class="form-control" />
|
||||
</div>
|
||||
|
||||
@* Bouton *@
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
@* Input *@
|
||||
<div class="me-3">
|
||||
<input asp-for="Libelle" class="form-control" style="width: 250px;" />
|
||||
<input asp-for="Libelle" class="form-control" />
|
||||
</div>
|
||||
|
||||
@* Bouton *@
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<thead class="table-active">
|
||||
<tr>
|
||||
<th scope="col" class="p-2">Libellé</th>
|
||||
<th scope="col" class="text-center p-2" style="width: 100px;">Actions</th>
|
||||
<th scope="col" class="text-center p-2">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -28,11 +28,11 @@
|
||||
{
|
||||
@foreach (Webzine.Entity.Style style in Model)
|
||||
{
|
||||
<tr class="align-middle">
|
||||
<td class="p-2">
|
||||
<tr >
|
||||
<td class="p-2 w-75">
|
||||
@style.Libelle
|
||||
</td>
|
||||
<td class="text-center p-2">
|
||||
<td class="text-center w-auto p-2">
|
||||
<a asp-action="Edit" asp-route-id="@style.IdStyle" class="text-primary me-2" title="Éditer">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
<!-- JAQUETTE -->
|
||||
<div class="row mb-3 align-items-center">
|
||||
<label class="col-md-3 col-form-label">Jaquette<span class="text-danger">*</span></label>
|
||||
<label class="col-md-3 col-form-label">Jaquette de l'album<span class="text-danger">*</span></label>
|
||||
<div class="col-md-9">
|
||||
<input asp-for="UrlJaquette"
|
||||
class="form-control"/>
|
||||
@@ -102,13 +102,13 @@
|
||||
</div>
|
||||
|
||||
<!-- LECTURES / LIKES (AFFICHAGE UNIQUEMENT) -->
|
||||
<div class="row mb-4 align-items-center">
|
||||
<div class="row align-items-center">
|
||||
<label class="col-md-3 col-form-label">Nb de lectures<span class="text-danger">*</span></label>
|
||||
<div class="col-md-3">
|
||||
@Model.NbLectures
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-4 align-items-center">
|
||||
<div class="row align-items-center">
|
||||
<label class="col-md-3 col-form-label">Nb de likes<span class="text-danger">*</span></label>
|
||||
<div class="col-md-3">
|
||||
@Model.NbLikes
|
||||
|
||||
Reference in New Issue
Block a user