예제 #1
0
 public function startUp()
 {
     parent::startUp();
     $this->template['resRend'] = \model\ReservationRenderer::getInstance();
     $this->addJs('moment-with-locales-min.js');
     $this->addJs('bootstrap-datetimepicker.js');
     $this->addCss('bootstrap-datetimepicker.min.css');
 }
예제 #2
0
 public function renderZobrazit()
 {
     $this->addCss("rezervace_detail.css");
     $id = $this->getParam('id');
     $event = Tables\Event::fetchById($this->pdo, $id);
     if (!$event) {
         $this->message->warning("Událost č. {$id} nebyla nalezena");
         $this->redirectPars('rezervace', 'vypis');
     }
     $this->template['resRend'] = \model\ReservationRenderer::getInstance();
     $this->template['event'] = $event;
     if ($event->hasGameAssigned()) {
         $this->template['game'] = $this->gameTypes->fetchById($event->getGameTypeID());
     }
     $this->template['links'] = ['edit' => ['controller' => 'udalost', 'action' => 'upravit', 'id' => $id], 'delete' => ['controller' => 'udalost', 'action' => 'smazat', 'id' => $id]];
 }