/** * Display the Message templates view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ function display($tpl = null) { // Get data from the model $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } // Add menu helper file require_once JPATH_COMPONENT . '/helpers/menu.php'; // Add sidebar MenuHelper::addSubmenu('messagetemplates'); // Load message type model $model = JModelLegacy::getInstance('messagetype', 'IssnregistryModel'); // Load message types $types = $model->getMessageTypesHash(); // Pass $types to the layout $this->assignRef('types', $types); // Set the toolbar $this->addToolBar(); // Render the sidebar $this->sidebar = JHtmlSidebar::render(); // Display the template parent::display($tpl); }
/** * Display the Message types view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ function display($tpl = null) { // Get data from the model $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } // Add menu helper file require_once JPATH_COMPONENT . '/helpers/menu.php'; // Add sidebar MenuHelper::addSubmenu('messagetypes'); // Set the toolbar $this->addToolBar(); // Render the sidebar $this->sidebar = JHtmlSidebar::render(); // Display the template parent::display($tpl); }
/** * Display the Forms view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ function display($tpl = null) { // Get data from the model $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } // Get filter status $filterStatus = $this->state->get('filter.status'); // Add menu helper file require_once JPATH_COMPONENT . '/helpers/menu.php'; // Add sidebar if ($filterStatus == 2) { MenuHelper::addSubmenu('forms_not_notified'); } else { if ($filterStatus == 3) { MenuHelper::addSubmenu('forms_completed'); } else { if ($filterStatus == 4) { MenuHelper::addSubmenu('forms_rejected'); } else { MenuHelper::addSubmenu('forms_not_handled'); } } } // Set the toolbar $this->addToolBar(); // Render the sidebar $this->sidebar = JHtmlSidebar::render(); // Display the template parent::display($tpl); }