function renderHtml() { $this->document->setTitle('Tilmeldinger i restance'); $data = array('tilmeldinger' => VIH_Model_LangtKursus_Tilmelding::getList('forfaldne')); $tpl = $this->template->create('VIH/Intranet/view/langekurser/tilmeldinger'); return $this->render($this, $data); }
function renderHtml() { if ($this->query('search') and $this->getForm()->validate()) { $tilmeldinger = VIH_Model_LangtKursus_Tilmelding::search($this->query('search')); } else { $tilmeldinger = VIH_Model_LangtKursus_Tilmelding::getList('nyeste', NULL, 5); } $data = array('caption' => '5 nyeste tilmeldinger', 'tilmeldinger' => $tilmeldinger); $this->document->setTitle('Lange Kurser'); $this->document->addOption('Vis kurser', $this->url('../')); $this->document->addOption('Protokol', $this->url('../../protokol')); $this->document->addOption('F*g', $this->url('../../f*g')); $this->document->addOption('Exporter adresseliste som CSV', $this->url('exportcsv')); $this->document->addOption('Restance', $this->url('restance')); $this->document->addOption('Excel', $this->url(null . '.xls')); $tpl = $this->template->create('langekurser/tilmeldinger'); return $tpl->render($this, $data) . $this->getForm()->toHTML(); }