protected function addToolBar() { JRequest::setVar('hidemainmenu', true); $isNew = $this->item->id == 0; JToolBarHelper::title($isNew ? 'Add new Language Pair' : 'Edit Language Pair', 'pairslanguages'); JToolBarHelper::save('pairslanguage.save'); JToolBarHelper::cancel('pairslanguage.cancel', $isNew ? 'JTOOLBAR_CANCEL' : 'JTOOLBAR_CLOSE'); JToolBarHelper::custom('pairslanguage.previous', 'camera.png', 'camera.png', 'Previous Week', false); JToolBarHelper::custom('pairslanguage.next', 'camera.png', 'camera.png', 'Next Week', false); JHtmlSidebar::setAction('index.php?option=com_videotranslation&view=pairslanguage&layout=edit&id=' . JRequest::getInt('id')); JHtmlSidebar::addFilter('Select Interpreter', 'filter_interpreter_id', JHtml::_('select.options', VideoTranslationHelper::getInterpreters(), 'value', 'text', $this->state->get('filter.interpreter_id'), true)); }
function display($tpl = null) { // Get data from the model $items = $this->get('Items'); $pagination = $this->get('Pagination'); // Assign data to the view $this->items = $items; $this->pagination = $pagination; VideoTranslationHelper::addSubmenu('languages'); // Set the toolbar $this->addToolBar(); $this->sidebar = JHtmlSidebar::render(); // Display the template parent::display($tpl); // Set the document $this->setDocument(); }