public function display($tpl = null) { $context = 'mail_id'; $uri = JFactory::getURI(); $app = JFactory::getApplication(); $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_REDSHOP_MAIL')); jimport('joomla.html.pagination'); JToolBarHelper::title(JText::_('COM_REDSHOP_MAIL_MANAGEMENT'), 'redshop_mailcenter48'); JToolBarHelper::addNewX(); JToolBarHelper::editListX(); JToolBarHelper::deleteList(); JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); $filter_order = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'm.mail_id'); $filter_order_Dir = $app->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', ''); $filter_section = $app->getUserStateFromRequest($context . 'filter_section', 'filter_section', 0); $lists['order'] = $filter_order; $lists['order_Dir'] = $filter_order_Dir; $redtemplate = new Redtemplate(); $optionsection = $redtemplate->getMailSections(); $lists['mailsection'] = JHTML::_('select.genericlist', $optionsection, 'filter_section', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'value', 'text', $filter_section); $total = $this->get('Total'); $media = $this->get('Data'); $pagination = $this->get('Pagination'); $this->user = JFactory::getUser(); $this->lists = $lists; $this->media = $media; $this->pagination = $pagination; $this->request_url = $uri->toString(); parent::display($tpl); }
public function display($tpl = null) { JToolBarHelper::title(JText::_('COM_REDSHOP_MAIL_MANAGEMENT_DETAIL'), 'redshop_mailcenter48'); $option = JRequest::getVar('option', '', 'request', 'string'); $document = JFactory::getDocument(); $document->addScript('components/' . $option . '/assets/js/json.js'); $document->addScript('components/' . $option . '/assets/js/validation.js'); $uri = JFactory::getURI(); $this->setLayout('default'); $lists = array(); $detail = $this->get('data'); $isNew = $detail->mail_id < 1; $text = $isNew ? JText::_('COM_REDSHOP_NEW') : JText::_('COM_REDSHOP_EDIT'); JToolBarHelper::title(JText::_('COM_REDSHOP_MAIL') . ': <small><small>[ ' . $text . ' ]</small></small>', 'redshop_mailcenter48'); JToolBarHelper::apply(); JToolBarHelper::save(); if ($isNew) { JToolBarHelper::cancel(); } else { JToolBarHelper::cancel('cancel', JText::_('JTOOLBAR_CLOSE')); } $model = $this->getModel('mail_detail'); if ($detail->mail_section == 'order_status' && $detail->mail_section != '0') { $order_status = $model->mail_section(); $select = array(); $select[] = JHTML::_('select.option', '0', JText::_('COM_REDSHOP_Select')); $merge = array_merge($select, $order_status); $lists['order_status'] = JHTML::_('select.genericlist', $merge, 'mail_order_status', 'class="inputbox" size="1" title="" ', 'value', 'text', $detail->mail_order_status); } $redtemplate = new Redtemplate(); $optiontype = $redtemplate->getMailSections(); $lists['type'] = JHTML::_('select.genericlist', $optiontype, 'mail_section', 'class="inputbox" size="1" onchange="mail_select(this)" ', 'value', 'text', $detail->mail_section); $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $detail->published); $pane = JPane::getInstance('sliders'); $this->pane = $pane; $this->lists = $lists; $this->detail = $detail; $this->request_url = $uri->toString(); parent::display($tpl); }
?> " title="<?php echo JText::_('COM_REDSHOP_EDIT_MAIL'); ?> "><?php echo $row->mail_name; ?> </a> </td> <td><?php echo $row->mail_subject; ?> </td> <td align="center"><?php echo $redtemplate->getMailSections($row->mail_section); ?> </td> <td align="center"><?php echo $published; ?> </td> <td align="center"><?php echo $row->mail_id; ?> </td> </tr> <?php $k = 1 - $k; } ?>