add legend

This commit is contained in:
Vasil Kolev 2015-10-20 01:14:42 +03:00 committed by Openfest
parent efa9099804
commit d06f44761f
2 changed files with 20 additions and 1 deletions

View File

@ -57,6 +57,15 @@ $content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARA
</tbody>
</table>
<div class="separator"></div>
<table cellpadding="0" cellspacing="0" class="schedule schedule-legend">
<tbody>
<?php
foreach ($content['legend'] as $line) {
echo $line, PHP_EOL;
}
?>
</tbody>
</table>
<?php
foreach ($content['fulltalks'] as $line) {
echo $line, PHP_EOL;

View File

@ -110,6 +110,16 @@ foreach ($data['slots'] as $slot_id => $slot) {
}
$lines[] = '</tr>';
/* create the legend */
$legend = [];
foreach($data['tracks'] as $track) {
$legend[] = '<tr><td class="' . $track['css_class'] . '">' . $track['name'][$lang] . '</td></tr>';
}
foreach (array('en' => 'English', 'bg' => 'Български') as $l => $n) {
$legend[] = '<tr><td class="schedule-' . $l . '">' . $n . '</td></tr>';
}
$gspk = [];
$fspk = [];
@ -147,4 +157,4 @@ foreach ($data['speakers'] as $speaker) {
$gspk[] = '</div>';
return array_merge($data, compact('lines', 'fulltalks', 'gspk', 'fspk'));
return array_merge($data, compact('lines', 'fulltalks', 'gspk', 'fspk', 'legend'));