public function renderVypis() { $this->addCss('input-specific.css'); $this->addJs('input-specific.js'); $week = $this->getParam("tyden"); if (!is_numeric($week)) { $week = 0; } $timePars = DatetimeManager::getWeeksBounds($week); $dbTimePars = DatetimeManager::format($timePars, DatetimeManager::DB_FULL); $game_types = $this->prepareGames(); $game_type_id = $this->getParam("game_id"); if ($this->gameTypes->fetchById($game_type_id)) { $this->template['defaultGame'] = $game_type_id; } $this->template['reservation'] = ['formAction' => ['controller' => 'rezervace', 'action' => 'rezervovat'], 'types' => Tables\Reservation::getTypes(), 'games' => $game_types, 'desks' => Tables\Desk::fetchAll($this->pdo)]; $this->template['event'] = ['formAction' => ['controller' => 'udalost', 'action' => 'pridat'], 'gameList' => Tables\Event::addNoGame($game_types)]; $this->template['games'] = $this->prepareGames($dbTimePars); $rw = $this->reservationManager->prepareReservationWeek($week); $this->template['reservationWeek'] = $rw; $this->template['pageTitle'] = $rw['pageTitle']; $this->template['weekShift'] = $this->makeWeekLinks($week); $this->template['resListColSize'] = $this->colSizeFromGet(); $this->template['fetchUpcommingLink'] = ['controller' => 'ajax', 'action' => 'upcommingReservations', 'game' => null]; $refill = $this->pickRefill(); $this->template['refill'] = $refill; if ($this->user->isAdministrator()) { $this->template['switchButtons'] = ['res' => ['label' => 'rezervaci'], 'evt' => ['label' => 'událost']]; $this->template['switchButtons'][$refill ? $refill['type'] : 'res']['active'] = true; } }
public function renderUpravit() { $this->addCss("input-specific.css"); $this->addJs("input-specific.js"); $this->renderZobrazit(); $event = $this->template['event']; $this->template['games'] = Tables\Event::addNoGame(Views\GameTypeExtended::fetchAll($this->pdo)); $this->template['links'] = ['back' => ['controller' => 'udalost', 'action' => 'zobrazit', 'id' => $this->getParam('id')], 'submit' => ['controller' => 'udalost', 'action' => 'ulozit']]; }