#88 Modifications simples: mauvaises balises HTML, fautes d'orthographes, DashBoard attributs à traduire en français.
This commit is contained in:
@@ -41,40 +41,40 @@ public class DashboardController : Controller
|
||||
/// <returns>La vue Index du tableau de bord.</returns>
|
||||
public IActionResult Index()
|
||||
{
|
||||
var mostChronicledArtist = _titres
|
||||
var artisteLePlusChronique = _titres
|
||||
.GroupBy(t => t.Artiste)
|
||||
.OrderByDescending(g => g.Count())
|
||||
.FirstOrDefault();
|
||||
|
||||
var topArtistAlbums = _titres
|
||||
var albumLePlusChronique = _titres
|
||||
.GroupBy(t => t.Artiste)
|
||||
.OrderByDescending(g => g.Select(t => t.Album).Distinct().Count())
|
||||
.FirstOrDefault();
|
||||
|
||||
var mostPlayedTrack = _titres
|
||||
var musiqueLaPlusJouee = _titres
|
||||
.OrderByDescending(t => t.NbLectures)
|
||||
.FirstOrDefault();
|
||||
|
||||
var model = new DashboardViewModel
|
||||
{
|
||||
ArtistCount = _artistes.Count,
|
||||
NombreArtistes = _artistes.Count,
|
||||
|
||||
MostChronicledArtistName = mostChronicledArtist?.Key.Nom,
|
||||
ArtisteLePlusChronique = artisteLePlusChronique?.Key.Nom,
|
||||
|
||||
TopArtistAlbumsName = topArtistAlbums?.Key.Nom,
|
||||
AlbumLePlusChronique = albumLePlusChronique?.Key.Nom,
|
||||
|
||||
BiographyCount = _artistes.Count(a => !string.IsNullOrEmpty(a.Biographie)),
|
||||
NombreBiographies = _artistes.Count(a => !string.IsNullOrEmpty(a.Biographie)),
|
||||
|
||||
MostPlayedTrackId = mostPlayedTrack?.IdTitre ?? 0,
|
||||
MostPlayedTrack = mostPlayedTrack?.Libelle,
|
||||
IdMusiqueLaPlusJouee = musiqueLaPlusJouee?.IdTitre ?? 0,
|
||||
MusiqueLaPlusJouee = musiqueLaPlusJouee?.Libelle,
|
||||
|
||||
TrackCount = _titres.Count,
|
||||
NombreTitres = _titres.Count,
|
||||
|
||||
GenreCount = _styles.Count,
|
||||
NombreGenres = _styles.Count,
|
||||
|
||||
TotalPlays = _titres.Sum(t => t.NbLectures),
|
||||
NombreLectures = _titres.Sum(t => t.NbLectures),
|
||||
|
||||
TotalLikes = _titres.Sum(t => t.NbLikes)
|
||||
NombreLikes = _titres.Sum(t => t.NbLikes)
|
||||
};
|
||||
|
||||
return View(model);
|
||||
|
||||
Reference in New Issue
Block a user