🏡 index : ~doyle/zpan.git

author Jordan Doyle <jordan@doyle.wf> 2016-06-19 14:43:34.0 +01:00:00
committer Jordan Doyle <jordan@doyle.wf> 2016-06-19 14:43:34.0 +01:00:00
commit
ea8a5e62f2b382c7dfe2c46a617c5c27df0e55c6 [patch]
tree
58ffae8abe059684833de5dd6c400fd787025fe0
parent
6c36768efb6678ca6d84bf298102781d6108cd05
download
ea8a5e62f2b382c7dfe2c46a617c5c27df0e55c6.tar.gz

Pad the timetable with empty values



Diff

 app/Http/Controllers/DJ/TimetableController.php    | 6 ++++++
 app/Http/Controllers/Event/TimetableController.php | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/app/Http/Controllers/DJ/TimetableController.php b/app/Http/Controllers/DJ/TimetableController.php
index 7346f69..c07fca6 100644
--- a/app/Http/Controllers/DJ/TimetableController.php
+++ a/app/Http/Controllers/DJ/TimetableController.php
@@ -148,6 +148,12 @@
            6 => ['name' => _('Sunday')]
        ];

        for($i = 0; $i != 24; $i++) {
            foreach($timetable as &$slot) {
                $slot[$i] = null;
            }
        }

        foreach ($week as $slot) {
            $timetable[$slot->day][$slot->hour] = $raw ? $slot->user->getDisplayName()->toHtml() :
                $slot->user->getDisplayName();
diff --git a/app/Http/Controllers/Event/TimetableController.php b/app/Http/Controllers/Event/TimetableController.php
index 1b96fe1..ced4a4d 100644
--- a/app/Http/Controllers/Event/TimetableController.php
+++ a/app/Http/Controllers/Event/TimetableController.php
@@ -201,6 +201,12 @@
            6 => ['name' => _('Sunday')]
        ];

        for ($i = 0; $i != 24; $i++) {
            foreach ($timetable as &$slot) {
                $slot[$i] = null;
            }
        }

        foreach ($week as $slot) {
            $type = $slot->type->name;