public function index() { if (isset($this->state->filter->plan) && $this->state->filter->plan > 0) { $mis = microIntegrationHandler::getMIsbyPlan($this->state->filter->plan); if (!empty($mis)) { $this->addConstraint("id IN (" . implode(',', $mis) . ")"); } else { $this->state->filter->plan = ""; } } $rows = $this->getRows(); foreach ($rows as $rid => $row) { if (!empty($row->desc)) { $rows[$rid]->desc = stripslashes(strip_tags($row->desc)); if (strlen($rows[$rid]->desc) > 50) { $rows[$rid]->desc = substr($rows[$rid]->desc, 0, 50) . ' ...'; } } } $sel = array(); $sel[] = JHTML::_('select.option', 'ordering ASC', JText::_('ORDERING_ASC')); $sel[] = JHTML::_('select.option', 'ordering DESC', JText::_('ORDERING_DESC')); $sel[] = JHTML::_('select.option', 'id ASC', JText::_('ID_ASC')); $sel[] = JHTML::_('select.option', 'id DESC', JText::_('ID_DESC')); $sel[] = JHTML::_('select.option', 'name ASC', JText::_('NAME_ASC')); $sel[] = JHTML::_('select.option', 'name DESC', JText::_('NAME_DESC')); $sel[] = JHTML::_('select.option', 'class_name ASC', JText::_('CLASSNAME_ASC')); $sel[] = JHTML::_('select.option', 'class_name DESC', JText::_('CLASSNAME_DESC')); $lists['orderNav'] = JHTML::_('select.genericlist', $sel, 'orderby_mi', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'value', 'text', $this->state->sort); // Get list of plans for filter $query = 'SELECT `id`, `name`' . ' FROM #__acctexp_plans' . ' ORDER BY `ordering`'; $this->db->setQuery($query); $db_plans = $this->db->loadObjectList(); $plans[] = JHTML::_('select.option', '0', JText::_('FILTER_PLAN'), 'id', 'name'); if (is_array($db_plans)) { $plans = array_merge($plans, $db_plans); } $lists['filter_planid'] = JHTML::_('select.genericlist', $plans, 'planid', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'id', 'name', $this->state->filter->plan); HTML_AcctExp::listMicroIntegrations($rows, $this->state, $this->getPagination(), $lists); }