/** * Add a menu on the sidebar of page */ protected function addSidebar() { UserIdeasHelper::addSubmenu($this->getName()); JHtmlSidebar::setAction('index.php?option=' . $this->option . '&view=' . $this->getName()); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array("archived" => false, "trash" => false)), 'value', 'text', $this->state->get('filter.state'), true)); $this->sidebar = JHtmlSidebar::render(); }
public function display($tpl = null) { $this->version = new UserIdeasVersion(); // Load ITPrism library version jimport("itprism.version"); if (!class_exists("ITPrismVersion")) { $this->itprismVersion = JText::_("COM_USERIDEAS_ITPRISM_LIBRARY_DOWNLOAD"); } else { $itprismVersion = new ITPrismVersion(); $this->itprismVersion = $itprismVersion->getShortVersion(); } jimport("userideas.statistics.basic"); $basic = new UserIdeasStatisticsBasic(JFactory::getDbo()); $this->totalItems = $basic->getTotalItems(); $this->totalVotes = $basic->getTotalVotes(); $this->totalComments = $basic->getTotalComments(); // Get popular items. jimport("userideas.statistics.items.popular"); $this->popular = new UserIdeasStatisticsItemsPopular(JFactory::getDbo()); $this->popular->load(5); // Get most voted items. jimport("userideas.statistics.items.mostvoted"); $this->mostVoted = new UserIdeasStatisticsItemsMostVoted(JFactory::getDbo()); $this->mostVoted->load(5); // Get latest items. jimport("userideas.statistics.items.latest"); $this->latest = new UserIdeasStatisticsItemsLatest(JFactory::getDbo()); $this->latest->load(5); // Add submenu UserIdeasHelper::addSubmenu($this->getName()); $this->addToolbar(); $this->addSidebar(); $this->setDocument(); parent::display($tpl); }
/** * Add a menu on the sidebar of page */ protected function addSidebar() { UserIdeasHelper::addSubmenu($this->getName()); JHtmlSidebar::setAction('index.php?option=' . $this->option . '&view=' . $this->getName()); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array("archived" => false, "trash" => false)), 'value', 'text', $this->state->get('filter.state'), true)); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category', JHtml::_('select.options', JHtml::_('category.options', 'com_userideas'), 'value', 'text', $this->state->get('filter.category'), true)); // Item statuses $statuses = Userideas\Status\Statuses::getInstance(JFactory::getDbo()); JHtmlSidebar::addFilter(JText::_('COM_USERIDEAS_SELECT_ITEM_STATUS'), 'filter_status', JHtml::_('select.options', $statuses->getStatusesOptions(), 'value', 'text', $this->state->get('filter.status'), true)); $this->sidebar = JHtmlSidebar::render(); }
public function display($tpl = null) { $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); // Add submenu UserIdeasHelper::addSubmenu($this->getName()); // Prepare sorting data $this->prepareSorting(); // Prepare actions $this->addToolbar(); $this->addSidebar(); $this->setDocument(); parent::display($tpl); }
/** * Add a menu on the sidebar of page */ protected function addSidebar() { UserIdeasHelper::addSubmenu($this->getName()); $this->sidebar = JHtmlSidebar::render(); }