Example #1
0
 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     $this->input = JFactory::getApplication()->input;
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         throw new Exception(implode("\n", $errors));
     }
     TjfieldsHelper::addSubmenu('regions');
     if (JVERSION >= '3.0') {
         $this->sidebar = JHtmlSidebar::render();
     }
     if (JVERSION < '3.0') {
         // Creating status filter.
         $sstatus = array();
         $sstatus[] = JHtml::_('select.option', '', JText::_('JOPTION_SELECT_PUBLISHED'));
         $sstatus[] = JHtml::_('select.option', 1, JText::_('JPUBLISHED'));
         $sstatus[] = JHtml::_('select.option', 0, JText::_('JUNPUBLISHED'));
         $this->sstatus = $sstatus;
         // Creating country filter.
         $countries = array();
         $countries[] = JHtml::_('select.option', '', JText::_('COM_TJFIELDS_FILTER_SELECT_COUNTRY'));
         require_once JPATH_COMPONENT . '/models/fields/countries.php';
         $countriesField = new JFormFieldCountries();
         $this->countries = $countriesField->getOptionsExternally();
         // Merge options
         $this->countries = array_merge($countries, $this->countries);
     }
     $this->addToolbar();
     parent::display($tpl);
 }
Example #2
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         throw new Exception(implode("\n", $errors));
     }
     TjfieldsHelper::addSubmenu('groups');
     $this->addToolbar();
     if (JVERSION >= '3.0') {
         $this->sidebar = JHtmlSidebar::render();
     }
     parent::display($tpl);
 }
Example #3
0
 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->input = JFactory::getApplication()->input;
     // Check for errors.
     $errors = $this->get('Errors');
     if (count($errors)) {
         throw new Exception(implode("\n", $errors));
     }
     TjfieldsHelper::addSubmenu('countries');
     $this->publish_states = array('' => JText::_('JOPTION_SELECT_PUBLISHED'), '1' => JText::_('JPUBLISHED'), '0' => JText::_('JUNPUBLISHED'));
     if (JVERSION >= '3.0') {
         $this->sidebar = JHtmlSidebar::render();
     }
     $this->addToolbar();
     parent::display($tpl);
 }