public function getSideBar() { require_once JPATH_COMPONENT . '/helpers/toolbar.php'; $options['states'] = array(JHtml::_('select.option', '1', JText::_('COM_RSMEMBERSHIP_MEMBERSHIPS_FILTER_PUBLISHED')), JHtml::_('select.option', '0', JText::_('COM_RSMEMBERSHIP_MEMBERSHIPS_FILTER_UNPUBLISHED'))); $options['filter_state'] = $this->getState($this->context . '.filter.filter_state'); RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_MEMBERSHIPS_FILTER_BY_STATE'), 'filter_state', JHtml::_('select.options', $options['states'], 'value', 'text', $options['filter_state'], true)); return RSMembershipToolbarHelper::render(); }
public function getSideBar() { require_once JPATH_COMPONENT . '/helpers/toolbar.php'; // Categories filter $options['filter_category'] = $this->getState($this->context . '.filter.filter_category'); $options['categories'] = array(); $categories = $this->getCategories(); foreach ($categories as $category) { $options['categories'][] = JHtml::_('select.option', $category->id, $category->name); } // Memberships States filter $options['filter_state'] = $this->getState($this->context . '.filter.filter_state'); $options['states'] = array(JHtml::_('select.option', '1', JText::_('COM_RSMEMBERSHIP_MEMBERSHIPS_FILTER_PUBLISHED')), JHtml::_('select.option', '0', JText::_('COM_RSMEMBERSHIP_MEMBERSHIPS_FILTER_UNPUBLISHED'))); RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_ALL_CATEGORIES'), 'filter_category', JHtml::_('select.options', $options['categories'], 'value', 'text', $options['filter_category'], true)); RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_MEMBERSHIPS_FILTER_BY_STATE'), 'filter_state', JHtml::_('select.options', $options['states'], 'value', 'text', $options['filter_state'], false)); return RSMembershipToolbarHelper::render(); }
public function getSideBar() { require_once JPATH_COMPONENT . '/helpers/toolbar.php'; // Status filter $options['filter_status'] = $this->getState($this->context . '.filter.filter_status'); $statuses = array(MEMBERSHIP_STATUS_ACTIVE, MEMBERSHIP_STATUS_PENDING, MEMBERSHIP_STATUS_EXPIRED, MEMBERSHIP_STATUS_CANCELLED); foreach ($statuses as $status) { $options['statuses'][] = JHtml::_('select.option', $status, JText::_('COM_RSMEMBERSHIP_STATUS_' . $status)); } RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_SELECT_STATUS'), 'filter_status', JHtml::_('select.options', $options['statuses'], 'value', 'text', $options['filter_status'], true)); return RSMembershipToolbarHelper::render(); }
public function getSideBar() { require_once JPATH_COMPONENT . '/helpers/toolbar.php'; // Transaction Types filter $options['filter_type'] = $this->getState($this->context . '.filter.filter_type'); $options['transaction_types'] = array(JHtml::_('select.option', '', JText::_('COM_RSMEMBERSHIP_TRANSACTION_ALL_TYPES')), JHtml::_('select.option', 'new', JText::_('COM_RSMEMBERSHIP_TRANSACTION_NEW')), JHtml::_('select.option', 'renew', JText::_('COM_RSMEMBERSHIP_TRANSACTION_RENEW')), JHtml::_('select.option', 'upgrade', JText::_('COM_RSMEMBERSHIP_TRANSACTION_UPGRADE')), JHtml::_('select.option', 'addextra', JText::_('COM_RSMEMBERSHIP_TRANSACTION_ADDEXTRA'))); // Gateway filter $options['filter_gateway'] = $this->getState($this->context . '.filter.filter_gateway'); $options['gateways'] = array(JHtml::_('select.option', '', JText::_('COM_RSMEMBERSHIP_TRANSACTION_ALL_GATEWAYS')), JHtml::_('select.option', 'No Gateway', JText::_('COM_RSMEMBERSHIP_NO_GATEWAY'))); $gateways = RSMembership::getPlugins(); foreach ($gateways as $plugin => $name) { if ($name == 'Credit Card') { $name = 'Authorize.Net'; } $options['gateways'][] = JHtml::_('select.option', $name, $name); } // Status filter $options['filter_status'] = $this->getState($this->context . '.filter.filter_status'); $statuses = array('pending', 'completed', 'denied'); $options['statuses'] = array(JHtml::_('select.option', '', JText::_('COM_RSMEMBERSHIP_TRANSACTION_ALL_STATUSES'))); foreach ($statuses as $status) { $options['statuses'][] = JHtml::_('select.option', $status, JText::_('COM_RSMEMBERSHIP_TRANSACTION_STATUS_' . $status)); } RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_SELECT_STATUS'), 'filter_status', JHtml::_('select.options', $options['statuses'], 'value', 'text', $options['filter_status'], true)); RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_SELECT_GATEWAY'), 'filter_gateway', JHtml::_('select.options', $options['gateways'], 'value', 'text', $options['filter_gateway'], false)); RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_SELECT_TYPE'), 'filter_type', JHtml::_('select.options', $options['transaction_types'], 'value', 'text', $options['filter_type'], false)); // Custom filters // Date from $options['date_from'] = $this->getState($this->context . '.filter.date_from'); RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_FROM'), 'date_from', $options['date_from'], 'calendar'); // Date to $options['date_to'] = $this->getState($this->context . '.filter.date_to'); RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_TO'), 'date_to', $options['date_to'], 'calendar'); // Calendar buttons $options['calendar_btn'] = array('from_btn' => 'date_from', 'to_btn' => 'date_to', 'filter_desc' => JText::_('COM_RSMEMBERSHIP_FILTER_DESC')); RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_FILTER'), JText::_('COM_RSMEMBERSHIP_FILTER_DESC'), $options['calendar_btn'], 'calendar_btn'); return RSMembershipToolbarHelper::render(); }
public function getSideBar() { require_once JPATH_COMPONENT . '/helpers/toolbar.php'; // Fields States filter $options['states'] = array(JHtml::_('select.option', '1', JText::_('COM_RSMEMBERSHIP_MEMBERSHIPS_FILTER_PUBLISHED')), JHtml::_('select.option', '0', JText::_('COM_RSMEMBERSHIP_MEMBERSHIPS_FILTER_UNPUBLISHED'))); $options['filter_state'] = $this->getState($this->context . '.filter.filter_state'); $memberships = $this->getMemberships(); $options['memberships'] = array(); foreach ($memberships as $membership) { $options['memberships'][] = JHtml::_('select.option', $membership->id, $membership->name); } RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_MEMBERSHIPS_FILTER_BY_STATE'), 'filter_state', JHtml::_('select.options', $options['states'], 'value', 'text', $options['filter_state'], true)); RSMembershipToolbarHelper::addFilter(JText::_('COM_RSMEMBERSHIP_VIEW_SELECT_MEMBERSHIP'), 'filter_membership_id', JHtml::_('select.options', $options['memberships'], 'value', 'text', $this->getMembershipID(), true)); return RSMembershipToolbarHelper::render(); }