schedule: add support for full schedule

This commit is contained in:
Vasil Kolev 2018-10-16 13:07:52 +03:00 committed by Openfest
parent 18ac2789f7
commit 76b46316f9
3 changed files with 11 additions and 4 deletions

View File

@ -7,7 +7,12 @@ require("schedule-config.php");
?>
<section class="content grid">
<div class="col-left">
<?php
// full schedule is not limited in only one column
if (!preg_match('/^full/', $pagename)) {
echo '<div class="col-left">';
}
?>
<h1><?php pll_e('Програма') ?></h1>
<?php
@ -34,9 +39,11 @@ if (!empty($content)) {
}
?>
</div>
<?php
if (!preg_match('/^full/', $pagename)) {
echo "</div>";
get_sidebar();
};
?>
</section>

View File

@ -16,7 +16,7 @@ $data = loadData($sched_config);
if ( preg_match('/^workshop/', $pagename) ) {
$sched_config['filterEventType'] = "workshop";
} else {
} else if (!preg_match('/^full/', $pagename)) {
$sched_config['filterEventType'] = "lecture";
}
$content = parseData($sched_config, $data);

View File

@ -42,7 +42,7 @@ function parseData($config, $data) {
$eid = $slot['event_id'];
$etype = $data['events'][$eid]['event_type_id'];
if ($etype !== $filtered_type_id) {
if ($etype !== $filtered_type_id && !is_null($filtered_type_id)) {
continue;
}