<?php
/* @var $event Event */
/* @var $start DateTime */
/* @var $end DateTime */

use common\models\Event;
use common\modules\event\models\timetable\TimeTableMonthDay;
use yii\helpers\Html;
use yii\helpers\Url;

if (!isset($event)) {
    ?>
    <div class="alert alert-info">Nincs esemény</div>
    <?php
} else {
    ?>
    <div class="alert alert-success">
        <?= Html::a( $start->format('H:i') .'-' . $end->format('H:i')  , Url::toRoute(['event/update', 'id' => $event->id ] ) ) ?>
        <br>
        <?= Html::a( $event->eventType->name ,
            Url::toRoute(['/event-type/view', 'id'=> $event->eventType->id]),
        [
                'class' => 'event-theme-active-' .  $event->eventType->theme,
                'style' => 'padding: 3px 6px; border-radius: 1rem;'
        ]) ?>
        <br>
        <?= Html::a( $event->room->name , Url::toRoute(['/room/view', 'id' => $event->room->id]) )?>
        <br>
        <?=  Html::a( $event->trainer->name , Url::toRoute(['/trainer/view', 'id' => $event->trainer->id]) )?>
        <br>
        <?= $event->eventRegistrationCount ?>
        /
        <?= $event->seat_count ?>
    </div>

    <?php

}
