#218 : Soucis de routage des styles sur la page d'accueil.
This commit is contained in:
@@ -436,6 +436,7 @@ public class DbTitreRepository : ITitreRepository
|
|||||||
return this.context.Titres
|
return this.context.Titres
|
||||||
.AsNoTracking()
|
.AsNoTracking()
|
||||||
.OrderByDescending(t => t.DateCreation)
|
.OrderByDescending(t => t.DateCreation)
|
||||||
|
.ThenByDescending(t => t.IdTitre)
|
||||||
.Paginate(offset, limit)
|
.Paginate(offset, limit)
|
||||||
.Include(t => t.Artiste)
|
.Include(t => t.Artiste)
|
||||||
.Include(a => a.Styles);
|
.Include(a => a.Styles);
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace Webzine.WebApplication.Controllers
|
|||||||
/// <param name="style">Nom du style musical.</param>
|
/// <param name="style">Nom du style musical.</param>
|
||||||
/// <param name="page">Numéro de la page.</param>
|
/// <param name="page">Numéro de la page.</param>
|
||||||
/// <returns>Vue contenant la liste filtree.</returns>
|
/// <returns>Vue contenant la liste filtree.</returns>
|
||||||
[Route("/titres/styles/{style}", Name = "TitresParStyle")]
|
[Route("/titres/style/{style}", Name = "TitresParStyle")]
|
||||||
public IActionResult Style(string style, int page = 0)
|
public IActionResult Style(string style, int page = 0)
|
||||||
{
|
{
|
||||||
var offset = page * 10;
|
var offset = page * 10;
|
||||||
|
|||||||
@@ -73,21 +73,34 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<!-- Bouton -->
|
<!-- Bouton -->
|
||||||
<div class="row justify-content-between">
|
<div class="d-flex align-items-center justify-content-between mt-3">
|
||||||
@if (Model.Page > 0)
|
@if (Model.Page > 0)
|
||||||
{
|
{
|
||||||
<a asp-action="Index" asp-route-page="@(Model.Page - 1)"
|
<a asp-action="Index" asp-route-page="@(Model.Page - 1)"
|
||||||
class="btn btn-secondary col-auto mt-3">
|
class="btn btn-secondary">
|
||||||
<< Titre plus récent
|
<< Titre plus récent
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div></div>
|
||||||
|
}
|
||||||
|
|
||||||
|
<p class="mb-0">
|
||||||
|
Page : @(Model.Page + 1) sur @Model.TotalPages
|
||||||
|
</p>
|
||||||
|
|
||||||
@if (Model.Page < Model.TotalPages - 1)
|
@if (Model.Page < Model.TotalPages - 1)
|
||||||
{
|
{
|
||||||
<a asp-action="Index" asp-route-page="@(Model.Page + 1)"
|
<a asp-action="Index" asp-route-page="@(Model.Page + 1)"
|
||||||
class="btn btn-secondary col-auto mt-3 ms-auto">
|
class="btn btn-secondary">
|
||||||
Titre plus anciens >>
|
Titre plus anciens >>
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div></div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user