# Conflicts: # Webzine.WebApplication/Controllers/RechercheController.cs # Webzine.WebApplication/Views/Recherche/Index.cshtml
76 lines
2.5 KiB
Plaintext
76 lines
2.5 KiB
Plaintext
@model Webzine.WebApplication.ViewModels.Recherche.RechercheIndexViewModel
|
|
|
|
@{
|
|
ViewData["Title"] = "Recherche";
|
|
}
|
|
|
|
<div class="container mt-4">
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<h1 class="mb-4">Resultats pour "@Model.Mot"</h1>
|
|
|
|
<hr />
|
|
<h2 class="h4 mt-4">Artistes</h2>
|
|
|
|
@if (!Model.Artistes.Any())
|
|
{
|
|
<div class="alert alert-info">
|
|
<p>Aucun artiste n'a été trouvé.</p>
|
|
</div>
|
|
}
|
|
|
|
@foreach (var artiste in Model.Artistes)
|
|
{
|
|
<div class="my-3">
|
|
<a asp-controller="Artiste"
|
|
asp-action="Index"
|
|
asp-route-nom="@artiste.Nom">
|
|
@artiste.Nom
|
|
</a>
|
|
<span class="text-muted">(@artiste.Titres.Count titre(s))</span>
|
|
</div>
|
|
}
|
|
<h2 class="h4 mt-4">Titres</h2>
|
|
|
|
@if (!Model.Titres.Any())
|
|
{
|
|
<div class="alert alert-info">
|
|
<p>Aucun titre n'a été trouvé.</p>
|
|
</div>
|
|
}
|
|
|
|
@foreach (var titre in Model.Titres)
|
|
{
|
|
<div class="d-flex align-items-start my-3">
|
|
<a asp-controller="Titre"
|
|
asp-action="Index"
|
|
asp-route-id="@titre.IdTitre"
|
|
class="me-3 text-black">
|
|
<img src="@titre.UrlJaquette" alt="@titre.Libelle" width="70" height="70" class="object-fit-cover" loading="lazy" />
|
|
</a>
|
|
|
|
<div class="justify-content-center d-flex flex-column">
|
|
<div>
|
|
<a asp-controller="Artiste"
|
|
asp-action="Index"
|
|
asp-route-nom="@titre.Artiste.Nom">
|
|
@titre.Artiste.Nom
|
|
</a>
|
|
-
|
|
<a asp-controller="Titre"
|
|
asp-action="Index"
|
|
asp-route-id="@titre.IdTitre">
|
|
@titre.Libelle
|
|
</a>
|
|
</div>
|
|
|
|
<div>
|
|
Duree : @TimeSpan.FromSeconds(titre.Duree).ToString(@"mm\:ss")
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|