From c034aaa2e43cc3af069e45f13017572528b57495 Mon Sep 17 00:00:00 2001 From: Chewbaka69 Date: Thu, 21 Feb 2019 22:08:57 +0100 Subject: [PATCH] list seasons and episodes in header --- fuel/app/classes/controller/episode.php | 5 +++++ fuel/app/classes/controller/season.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/fuel/app/classes/controller/episode.php b/fuel/app/classes/controller/episode.php index ff24e17..6367ce2 100644 --- a/fuel/app/classes/controller/episode.php +++ b/fuel/app/classes/controller/episode.php @@ -21,8 +21,13 @@ class Controller_Episode extends Controller_Home $episode->getMetaData(); + $seasons = $episode->getTvShow()->getSeasons(); + $episodes = $episode->getSeason()->getEpisodes(); + $body = View::forge('episode/index'); $body->set('episode', $episode); + $body->set('seasons', $seasons); + $body->set('episodes', $episodes); $this->template->body = $body; } diff --git a/fuel/app/classes/controller/season.php b/fuel/app/classes/controller/season.php index 434eb60..8860462 100644 --- a/fuel/app/classes/controller/season.php +++ b/fuel/app/classes/controller/season.php @@ -11,11 +11,15 @@ class Controller_Season extends Controller_Home if(!$season) Response::redirect('/home'); + + $seasons = $season->getTvShow()->getSeasons(); + $this->template->title = $season->getTvShow()->title . ' S' . $season->number; $body = View::forge('season/index'); $body->set('season', $season); + $body->set('seasons', $seasons); $this->template->body = $body; }