public function display($tpl = null) { $this->operations = new HelperUniteOperationsRev(); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->arrSliders = $this->get("ArrSliders"); $this->sliderID = $this->get("SliderID"); $this->linkSliderSettings = HelperUniteRev::getViewUrl_Slider($this->sliderID); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); }
/** * the main disply function */ public function display($tpl = null) { // Initialiase variables. $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->isNew = $this->item->id == 0; $this->sliderID = $this->item->id; $this->checkExportImport(); $this->viewSliderPattern = HelperUniteRev::getViewUrl_Slider(""); if ($this->_layout == "default" || $this->_layout == "edit") { if ($this->isNew == false) { $this->linkEditSlides = HelperUniteRev::getViewUrl_Items($this->item->id); } } // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); }
?> </td> </tr> </tfoot> <tbody> <?php $n = count($this->items); foreach ($this->items as $i => $slider) { $ordering = $listOrder == 'a.ordering'; $canCreate = true; $canEdit = true; $canCheckin = true; $canEditOwn = true; $canChange = true; $sliderID = $slider->id; $urlSliderSettings = HelperUniteRev::getViewUrl_Slider($sliderID); $urlEditSlides = HelperUniteRev::getViewUrl_Items($sliderID); $title = $this->escape($slider->title); ?> <tr class="row<?php echo $i % 2; ?> "> <td class="center"> <?php echo JHtml::_('grid.id', $i, $sliderID); ?> </td> <td height="30"> <a href="<?php echo $urlSliderSettings;