From 6338aa4554c4fee044603a2e7db603994f5d69e8 Mon Sep 17 00:00:00 2001 From: Ascendings Date: Thu, 21 Apr 2016 00:27:42 -0400 Subject: [PATCH] Updated music view some more - added track listing and fixed the music player --- app/routes/music.php | 2 ++ app/views/music.twig | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/routes/music.php b/app/routes/music.php index 91bc2fb..609244f 100755 --- a/app/routes/music.php +++ b/app/routes/music.php @@ -3,9 +3,11 @@ $app->get('/music', function() use($app) { $albums = $app->album->all(); + $songs = $albums[0]->songs; $app->render('music.twig', [ 'albums' => $albums, + 'songs' => $songs, ]); })->name('music'); diff --git a/app/views/music.twig b/app/views/music.twig index b47cc2b..19f4471 100755 --- a/app/views/music.twig +++ b/app/views/music.twig @@ -36,15 +36,17 @@
-
    - {% for song in album.songs %} -
  • {{ song.title }}
  • +
      + {% for song in songs %} +
    • + {{ song.track_order }}. {{ song.title }} +
    • {% endfor %}
@@ -55,7 +57,7 @@
{% for album in albums %} -
+
{{ album.title }}