Example #1
0
 /**
  * Display the view
  *
  * @return	void
  */
 public function display($tpl = null)
 {
     $doc = JFactory::getDocument();
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->template = $this->get('Template');
     $this->overrides = $this->get('TemplateOverrides');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     foreach ($this->items as &$item) {
         $item->order_up = true;
         $item->order_dn = true;
     }
     $doc->addStyleSheet(JURI::base(true) . '/components/com_rokcandy/assets/rokcandy.css');
     $published = $this->state->get('filter.published') == 1 || $this->state->get('filter.published') == "" || $this->state->get('filter.published') == "*" ? true : false;
     $inCat = $this->state->get('filter.category_id') == "" || $this->state->get('filter.category_id') == -1 ? true : false;
     $showOverrides = $published && $inCat ? true : false;
     $this->assign('showOverrides', $showOverrides);
     // We don't need toolbar in the modal window.
     if ($this->getLayout() !== 'modal') {
         $this->addToolbar();
         $version = new JVersion();
         if (version_compare($version->getShortVersion(), '3.0', '>=')) {
             $this->sidebar = JHtmlSidebar::render();
         }
     }
     parent::display($tpl);
 }
Example #2
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     $doc = JFactory::getDocument();
     // Initialiase variables.
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $doc->addStyleSheet('components/com_rokcandy/assets/rokcandy.css');
     $this->addToolbar();
     parent::display($tpl);
 }