diff --git a/Webzine.WebApplication/Areas/Administration/Views/Commentaire/Index.cshtml b/Webzine.WebApplication/Areas/Administration/Views/Commentaire/Index.cshtml index c8608b7..1c8a9db 100644 --- a/Webzine.WebApplication/Areas/Administration/Views/Commentaire/Index.cshtml +++ b/Webzine.WebApplication/Areas/Administration/Views/Commentaire/Index.cshtml @@ -25,7 +25,7 @@ { - + @commentaire.Titre.Libelle diff --git a/Webzine.WebApplication/Areas/Administration/Views/Dashboard/Index.cshtml b/Webzine.WebApplication/Areas/Administration/Views/Dashboard/Index.cshtml index ac676f2..3f69891 100644 --- a/Webzine.WebApplication/Areas/Administration/Views/Dashboard/Index.cshtml +++ b/Webzine.WebApplication/Areas/Administration/Views/Dashboard/Index.cshtml @@ -94,7 +94,7 @@
diff --git a/Webzine.WebApplication/Controllers/TitreController.cs b/Webzine.WebApplication/Controllers/TitreController.cs index ff13042..63960cf 100644 --- a/Webzine.WebApplication/Controllers/TitreController.cs +++ b/Webzine.WebApplication/Controllers/TitreController.cs @@ -39,7 +39,8 @@ namespace Webzine.WebApplication.Controllers /// /// Identifiant du titre. /// Vue des details ou 404 si introuvable. - public IActionResult Details(int id) + + public IActionResult Index(int id) { this.logger.LogInformation("Demande d'affichage du detail pour le titre ID {Id}.", id); diff --git a/Webzine.WebApplication/Extensions/RouteConfiguration.cs b/Webzine.WebApplication/Extensions/RouteConfiguration.cs index 8cf015d..fd5f16c 100644 --- a/Webzine.WebApplication/Extensions/RouteConfiguration.cs +++ b/Webzine.WebApplication/Extensions/RouteConfiguration.cs @@ -7,54 +7,18 @@ public static class RouteConfiguration /// public static void MapCustomRoutes(this IEndpointRouteBuilder endpoints) { - - // ----------- RECHERCHE ----------- - endpoints.MapControllerRoute( - name: "rechercheIndex", - pattern: "recherche", - defaults: new { controller = "Recherche", action = "Index" }); - - // ----------- ARTISTE ----------- - // exemple : /artiste/boblechanteurtarpingénial - endpoints.MapControllerRoute( - name: "ArtisteIndex", - pattern: "artiste/{nom}", - defaults: new { controller = "Artiste", action = "Index" }); - // ----------- TITRE ----------- - // exemple : /titre/5 endpoints.MapControllerRoute( - name: "TitreDetails", - pattern: "titre/{id}", - defaults: new { controller = "Titre", action = "Details" }); - - // exemple : /titre/style/Rock - endpoints.MapControllerRoute( - name: "TitresParStyle", + name: "TitreStyle", pattern: "titres/style/{style}", defaults: new { controller = "Titre", action = "Style" }); - // --- ACTIONS POST (LIKE / COMMENT) --- - endpoints.MapControllerRoute( - name: "TitreLike", - pattern: "titre/like", - defaults: new { controller = "Titre", action = "Like" }); - - endpoints.MapControllerRoute( - name: "TitreComment", - pattern: "titre/comment", - defaults: new { controller = "Titre", action = "Comment" }); - - // ----------- ADMIN ----------- var adminRoutes = new Dictionary { - { "artistes", "Artiste" }, - { "commentaires", "Commentaire" }, - { "styles", "Style" }, - { "titres", "Titre" } + { "artistes", "Artiste" }, { "commentaires", "Commentaire" }, { "styles", "Style" }, { "titres", "Titre" }, }; foreach (var route in adminRoutes) @@ -66,7 +30,6 @@ public static class RouteConfiguration } - // --- AUTRE PROUTES --- endpoints.MapControllerRoute( @@ -77,4 +40,4 @@ public static class RouteConfiguration name: "default", pattern: "{controller=Accueil}/{action=Index}/{id?}"); } -} +} \ No newline at end of file diff --git a/Webzine.WebApplication/Views/Accueil/Index.cshtml b/Webzine.WebApplication/Views/Accueil/Index.cshtml index 6b11176..defe1e8 100644 --- a/Webzine.WebApplication/Views/Accueil/Index.cshtml +++ b/Webzine.WebApplication/Views/Accueil/Index.cshtml @@ -29,7 +29,7 @@ @titre.Artiste.Nom - - @titre.Libelle @@ -43,7 +43,7 @@
- @@ -90,7 +90,7 @@ @titre.Album
- + @titre.Libelle
diff --git a/Webzine.WebApplication/Views/Artiste/Index.cshtml b/Webzine.WebApplication/Views/Artiste/Index.cshtml index 59716b8..fe66f72 100644 --- a/Webzine.WebApplication/Views/Artiste/Index.cshtml +++ b/Webzine.WebApplication/Views/Artiste/Index.cshtml @@ -56,7 +56,7 @@ else @dureeFormatee @titre.Libelle diff --git a/Webzine.WebApplication/Views/Recherche/Index.cshtml b/Webzine.WebApplication/Views/Recherche/Index.cshtml index cb5fca6..5eec91c 100644 --- a/Webzine.WebApplication/Views/Recherche/Index.cshtml +++ b/Webzine.WebApplication/Views/Recherche/Index.cshtml @@ -50,7 +50,7 @@ {
@titre.Libelle @@ -65,7 +65,7 @@ - @titre.Libelle diff --git a/Webzine.WebApplication/Views/Titre/Details.cshtml b/Webzine.WebApplication/Views/Titre/Index.cshtml similarity index 100% rename from Webzine.WebApplication/Views/Titre/Details.cshtml rename to Webzine.WebApplication/Views/Titre/Index.cshtml