/** * Add the page title and toolbar. * */ protected function addToolbar() { $canDo = JeaHelper::getActions(); $user = JFactory::getUser(); JToolBarHelper::title(JText::_('COM_JEA_PROPERTIES_MANAGEMENT'), 'jea.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('property.add'); JToolBarHelper::custom('properties.copy', 'copy.png', 'copy_f2.png', 'COM_JEA_COPY'); } if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolBarHelper::editList('property.edit'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::publish('properties.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('properties.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::custom('properties.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true); } if ($canDo->get('core.delete')) { JToolBarHelper::divider(); JToolBarHelper::deleteList(JText::_('COM_JEA_MESSAGE_CONFIRM_DELETE'), 'properties.delete'); } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_jea'); } }
/** * Add the page title and toolbar. * */ protected function addToolbar() { $canDo = JeaHelper::getActions(); JToolBarHelper::title(JText::_('COM_JEA_FEATURES_MANAGEMENT'), 'jea.png'); if ($canDo->get('core.manage')) { JToolBarHelper::custom('features.import', 'database', '', 'Import', false); } JToolBarHelper::custom('features.export', 'download', '', 'Export', false); if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_jea'); } }
public function display($tpl = null) { JeaHelper::addSubmenu('tools'); JToolBarHelper::title(JText::_('COM_JEA_TOOLS'), 'jea.png'); $canDo = JeaHelper::getActions(); if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_jea'); } if ((double) JVERSION > 3) { $this->sidebar = JHtmlSidebar::render(); } parent::display($tpl); }
public function display($tpl = null) { JeaHelper::addSubmenu('default'); JToolBarHelper::title('Joomla Estate Agency', 'jea.png'); $canDo = JeaHelper::getActions(); if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_jea'); } if ((double) JVERSION > 3) { $this->sidebar = JHtmlSidebar::render(); } parent::display($tpl); }
function display($tpl = null) { $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->canDo = JeaHelper::getActions($this->item->id); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); }
/** * Add the page title and toolbar. * */ function addToolbar() { JRequest::setVar('hidemainmenu', true); $isNew = $this->item->id == 0; $canDo = JeaHelper::getActions(); $title = $this->item->id ? JText::_('JACTION_EDIT') . ' ' . $this->escape($this->item->value) : JText::_('JACTION_CREATE'); JToolBarHelper::title($title, 'jea.png'); // For new records, check the create permission. if ($canDo->get('core.create')) { JToolBarHelper::apply('feature.apply'); JToolBarHelper::save('feature.save'); JToolBarHelper::save2new('feature.save2new'); } JToolBarHelper::cancel('feature.cancel'); }
/** * Add the page title and toolbar. * */ protected function addToolbar() { $canDo = JeaHelper::getActions(); $feature = $this->state->get('feature.name'); JToolBarHelper::title(JText::_(JString::strtoupper("com_jea_list_of_{$feature}_title")), 'jea.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('feature.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('feature.edit'); } if ($canDo->get('core.delete')) { JToolBarHelper::divider(); JToolBarHelper::deleteList(JText::_('COM_JEA_MESSAGE_CONFIRM_DELETE'), 'featurelist.delete'); } }