/** * Display the form. */ function display() { $templateMgr =& TemplateManager::getManager(); $schedConf =& Request::getSchedConf(); $templateMgr->assign('specialEventId', $this->specialEventId); $templateMgr->assign('helpTopicId', 'conference.currentConferences.specialEvents'); import('manager.form.TimelineForm'); list($earliestDate, $latestDate) = TimelineForm::getOutsideDates($schedConf); $templateMgr->assign('firstYear', strftime('%Y', $earliestDate)); $templateMgr->assign('lastYear', strftime('%Y', $latestDate)); // Get a good default start time import('manager.form.scheduler.ScheduleForm'); $defaultStartTime = ScheduleForm::getDefaultStartTime(); $templateMgr->assign('defaultStartTime', $defaultStartTime); parent::display(); }
function updateTimeline($args, &$request) { $this->validate(); $this->setupTemplate($request, true); import('classes.manager.form.TimelineForm'); $timelineForm = new TimelineForm($request->getUserVar('overrideDates')); $timelineForm->readInputData(); if ($timelineForm->validate()) { $timelineForm->execute(); $request->redirect(null, null, null, 'index'); } else { $timelineForm->setData('errorsExist', true); $timelineForm->display(); } }
/** * Display the form */ function display() { $templateMgr =& TemplateManager::getManager(); import('mail.MailTemplate'); $mail = new MailTemplate('SUBMISSION_ACK'); if ($mail->isEnabled()) { $templateMgr->assign('submissionAckEnabled', true); } if ($this->_data['reviewDeadlineType'] == REVIEW_DEADLINE_TYPE_ABSOLUTE) { $templateMgr->assign('absoluteReviewDate', $this->_data['numWeeksPerReviewAbsolute']); } if (Config::getVar('general', 'scheduled_tasks')) { $templateMgr->assign('scheduledTasksEnabled', true); } import('manager.form.TimelineForm'); $schedConf =& Request::getSchedConf(); list($earliestDate, $latestDate) = TimelineForm::getOutsideDates($schedConf); $templateMgr->assign('firstYear', strftime('%Y', $earliestDate)); $templateMgr->assign('lastYear', strftime('%Y', $latestDate)); parent::display(); }
function updateTimeline($args) { $this->validate(); $this->setupTemplate(true); import('manager.form.TimelineForm'); if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor $timelineForm = new TimelineForm(Request::getUserVar('overrideDates')); } else { $timelineForm =& new TimelineForm(Request::getUserVar('overrideDates')); } $timelineForm->readInputData(); if ($timelineForm->validate()) { $timelineForm->execute(); Request::redirect(null, null, null, 'index'); } else { $timelineForm->setData('errorsExist', true); $timelineForm->display(); } }
/** * Display read-only timeline */ function timeline() { $this->addCheck(new HandlerValidatorSchedConf($this)); $this->validate(); $conference =& Request::getConference(); $schedConf =& Request::getSchedConf(); $templateMgr =& TemplateManager::getManager(); //$templateMgr->assign('pageHierarchy', array( // array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true), // array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true))); SchedConfHandler::setupTemplate($conference, $schedConf); AppLocale::requireComponents(array(LOCALE_COMPONENT_OCS_MANAGER)); // FIXME: For timeline constants import('manager.form.TimelineForm'); $templateMgr->assign('pageHierarchyRoot', true); $templateMgr->assign('pageHierarchy', array(array(Request::url(null, $conference->getSetting('path'), 'index'), AppLocale::Translate('navigation.home'), true), array(Request::url(null, null, 'index'), AppLocale::Translate('schedConf.timeline'), true))); if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor $timelineForm = new TimelineForm(false, true); } else { $timelineForm =& new TimelineForm(false, true); } $timelineForm->initData(); $timelineForm->display(); }
/** * Display the form. */ function display() { $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('helpTopicId', 'conference.currentConferences.buildings'); $schedConf =& Request::getSchedConf(); import('manager.form.TimelineForm'); list($earliestDate, $latestDate) = TimelineForm::getOutsideDates($schedConf); $templateMgr->assign('firstYear', strftime('%Y', $earliestDate)); $templateMgr->assign('lastYear', strftime('%Y', $latestDate)); // Sort the data. $sort = Request::getUserVar('sort'); $sortFuncMap = array('author' => array(&$this, 'authorSort'), 'title' => array(&$this, 'titleSort'), 'track' => array(&$this, 'trackSort'), 'startTime' => array(&$this, 'startTimeSort'), 'room' => array(&$this, 'roomSort')); if ($sort && isset($sortFuncMap[$sort])) { // this function may generate the E_STRICT warning "usort() [function.usort]: // Array was modified by the user comparison function In file". This is actually // a generic error for "an error was generated in the callback function", which // will be a "Non-static method cannot be called statically" error. This is a // benign warning; see http://www.php.net/manual/en/language.oop5.static.php usort($this->_data['publishedPapers'], $sortFuncMap[$sort]); } $defaultStartTime = $this->getDefaultStartTime(); $templateMgr->assign('defaultStartTime', $defaultStartTime); $buildingsAndRooms = array(); $buildingDao =& DAORegistry::getDAO('BuildingDAO'); $roomDao =& DAORegistry::getDAO('RoomDAO'); $schedConf =& Request::getSchedConf(); $buildings =& $buildingDao->getBuildingsBySchedConfId($schedConf->getId()); while ($building =& $buildings->next()) { $buildingId = $building->getId(); $rooms =& $roomDao->getRoomsByBuildingId($buildingId); $buildingsAndRooms[$buildingId] = array('building' => &$building); while ($room =& $rooms->next()) { $roomId = $room->getId(); $buildingsAndRooms[$buildingId]['rooms'][$roomId] =& $room; unset($room); } unset($rooms); unset($building); } $templateMgr->assign_by_ref('buildingsAndRooms', $buildingsAndRooms); $timeBlockDao =& DAORegistry::getDAO('TimeBlockDAO'); $timeBlocks =& $timeBlockDao->getTimeBlocksBySchedConfId($schedConf->getId()); $timeBlocks =& $timeBlocks->toArray(); $templateMgr->assign_by_ref('timeBlocks', $timeBlocks); parent::display(); }
/** * Display the form. */ function display() { $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('helpTopicId', 'conference.currentConferences.buildings'); $schedConf =& Request::getSchedConf(); import('manager.form.TimelineForm'); list($earliestDate, $latestDate) = TimelineForm::getOutsideDates($schedConf); $templateMgr->assign('firstYear', strftime('%Y', $earliestDate)); $templateMgr->assign('lastYear', strftime('%Y', $latestDate)); // Sort the data. $sort = Request::getUserVar('sort'); $sortFuncMap = array('author' => array(&$this, 'authorSort'), 'title' => array(&$this, 'titleSort'), 'track' => array(&$this, 'trackSort'), 'startTime' => array(&$this, 'startTimeSort'), 'room' => array(&$this, 'roomSort')); if ($sort && isset($sortFuncMap[$sort])) { usort($this->_data['publishedPapers'], $sortFuncMap[$sort]); } $defaultStartTime = $this->getDefaultStartTime(); $templateMgr->assign('defaultStartTime', $defaultStartTime); $buildingsAndRooms = array(); $buildingDao =& DAORegistry::getDAO('BuildingDAO'); $roomDao =& DAORegistry::getDAO('RoomDAO'); $schedConf =& Request::getSchedConf(); $buildings =& $buildingDao->getBuildingsBySchedConfId($schedConf->getId()); while ($building =& $buildings->next()) { $buildingId = $building->getId(); $rooms =& $roomDao->getRoomsByBuildingId($buildingId); $buildingsAndRooms[$buildingId] = array('building' => &$building); while ($room =& $rooms->next()) { $roomId = $room->getId(); $buildingsAndRooms[$buildingId]['rooms'][$roomId] =& $room; unset($room); } unset($rooms); unset($building); } $templateMgr->assign_by_ref('buildingsAndRooms', $buildingsAndRooms); $timeBlockDao =& DAORegistry::getDAO('TimeBlockDAO'); $timeBlocks =& $timeBlockDao->getTimeBlocksBySchedConfId($schedConf->getId()); $timeBlocks =& $timeBlocks->toArray(); $templateMgr->assign_by_ref('timeBlocks', $timeBlocks); parent::display(); }
/** * Display the form. */ function display() { $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('timeBlockId', $this->timeBlockId); $templateMgr->assign('helpTopicId', 'conference.managementPages.timeBlocks'); $schedConf =& Request::getSchedConf(); $templateMgr->assign('schedConfStartDate', $schedConf->getSetting('startDate')); $templateMgr->assign('schedConfEndDate', $schedConf->getSetting('endDate')); import('classes.manager.form.TimelineForm'); list($earliestDate, $latestDate) = TimelineForm::getOutsideDates($schedConf); $templateMgr->assign('firstYear', strftime('%Y', $earliestDate)); $templateMgr->assign('lastYear', strftime('%Y', $latestDate)); parent::display(); }
/** * Display read-only timeline */ function timeline($args, &$request) { $this->addCheck(new HandlerValidatorSchedConf($this)); $this->validate(); $conference =& $request->getConference(); $schedConf =& $request->getSchedConf(); $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('pageHierarchy', array(array($request->url(null, 'index', 'index'), $conference->getLocalizedName(), true), array($request->url(null, null, 'index'), $schedConf->getLocalizedName(), true))); $this->setupTemplate($request, $conference, $schedConf); AppLocale::requireComponents(LOCALE_COMPONENT_APP_MANAGER); // FIXME: For timeline constants import('classes.manager.form.TimelineForm'); $timelineForm = new TimelineForm(false, true); $timelineForm->initData(); $timelineForm->display(); }