function display($tpl = null) { $canDo = CeltawebtrafficHelper::getActions(); $model =& $this->getModel(); $countries =& $model->getCountries(); $cities =& $model->getCities(); // Is this the Professional release? jimport('joomla.filesystem.file'); $isPro = COM_CELTAWEBTRAFFIC_PRO == 1; $this->assign('isPro', $isPro); $version = COM_CELTAWEBTRAFFIC_VERSION; $this->assign('version', $version); $releaseDate = COM_CELTAWEBTRAFFIC_DATE; $this->assign('release_date', $releaseDate); $this->assignRef('countries', $countries); $this->assignRef('cities', $cities); if (!$this->geodatExist('geoip')) { echo JText::_('COM_CELTAWEBTRAFFIC_NOGEO_CPANEL_MESSAGE'); } JToolBarHelper::title(JText::_('COM_CELTAWEBTRAFFIC_TITLE_MAIN') . ' [ ' . JText::_('COM_CELTAWEBTRAFFIC_TITLE_CPANEL') . ' ]', 'cwt-cpanel'); if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_celtawebtraffic'); } $help_url = 'http://coalaweb.com/services/joomla-services-such-a-great-cms/joomla-docs/item/celtaweb-traffic-guide'; JToolBarHelper::help('COM_CELTAWEBTRAFFIC_TITLE_HELP', false, $help_url); parent::display($tpl); }
/** * Setting the toolbar */ protected function addToolBar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $userId = $user->id; $isNew = $this->item->id == 0; $canDo = CeltawebtrafficHelper::getActions($this->item->id); JToolBarHelper::title($isNew ? JText::_('COM_CELTAWEBTRAFFIC_TITLE_NEW') : JText::_('COM_CELTAWEBTRAFFIC_TITLE_EDIT'), 'cwt-knownip'); // Built the actions for new and existing records. if ($isNew) { // For new records, check the create permission. if ($canDo->get('core.create')) { JToolBarHelper::apply('knownip.apply', 'JTOOLBAR_APPLY'); JToolBarHelper::save('knownip.save', 'JTOOLBAR_SAVE'); JToolBarHelper::custom('knownip.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } JToolBarHelper::cancel('knownip.cancel', 'JTOOLBAR_CANCEL'); } else { if ($canDo->get('core.edit')) { // We can save the new record JToolBarHelper::apply('knownip.apply', 'JTOOLBAR_APPLY'); JToolBarHelper::save('knownip.save', 'JTOOLBAR_SAVE'); // We can save this record, but check the create permission to see if we can return to make a new one. if ($canDo->get('core.create')) { JToolBarHelper::custom('knownip.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } } if ($canDo->get('core.create')) { JToolBarHelper::custom('knownip.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); } JToolBarHelper::cancel('knownip.cancel', 'JTOOLBAR_CLOSE'); } }
public function setToolbar() { $canDo = CeltawebtrafficHelper::getActions(); JToolBarHelper::title(JText::_('COM_CELTAWEBTRAFFIC_TITLE_MAIN') . ' [ ' . JText::_('COM_CELTAWEBTRAFFIC_TITLE_GEO') . ' ]', 'cwt-geo'); JToolBarHelper::back('COM_CELTAWEBTRAFFIC_TITLE_CPANEL', 'index.php?option=com_celtawebtraffic'); if ($canDo->get('core.admin')) { if ($this->filesExist('archives')) { JToolBarHelper::divider(); JToolBarHelper::custom('geoupload.unzip', 'cwt-extract', 'unzip', 'Unzip', false); } } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_celtawebtraffic'); } $help_url = 'http://coalaweb.com/services/joomla-services-such-a-great-cms/joomla-docs/item/celtaweb-traffic-guide'; JToolBarHelper::help('COM_CELTAWEBTRAFFIC_TITLE_HELP', false, $help_url); }
/** * Setting the toolbar */ protected function addToolBar() { $canDo = CeltawebtrafficHelper::getActions(); $state = $this->get('State'); JToolBarHelper::title(JText::_('COM_CELTAWEBTRAFFIC_TITLE_MAIN') . ' [ ' . JText::_('COM_CELTAWEBTRAFFIC_TITLE_VISITORS') . ' ]', 'cwt-visitors'); JToolBarHelper::back('COM_CELTAWEBTRAFFIC_TITLE_CPANEL', 'index.php?option=com_celtawebtraffic'); if ($canDo->get('core.delete')) { JToolBarHelper::divider(); JToolBarHelper::deleteList('', 'visitors.delete', 'JTOOLBAR_DELETE'); } if ($canDo->get('core.admin')) { $bar = JToolBar::getInstance('toolbar'); $bar->appendButton('Link', 'export', 'COM_CELTAWEBTRAFFIC_TITLE_REPORT', 'index.php?option=com_celtawebtraffic&task=visitors.csvreport'); } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_celtawebtraffic'); } $help_url = 'http://coalaweb.com/services/joomla-services-such-a-great-cms/joomla-docs/item/celtaweb-traffic-guide'; JToolBarHelper::help('COM_CELTAWEBTRAFFIC_TITLE_HELP', false, $help_url); }
/** * Setting the toolbar */ protected function addToolBar() { $canDo = CeltawebtrafficHelper::getActions(); JToolBarHelper::title(JText::_('COM_CELTAWEBTRAFFIC_TITLE_MAIN') . ' [ ' . JText::_('COM_CELTAWEBTRAFFIC_TITLE_KNOWNIPS') . ' ]', 'cwt-knownip'); JToolBarHelper::back('COM_CELTAWEBTRAFFIC_TITLE_CPANEL', 'index.php?option=com_celtawebtraffic'); JToolBarHelper::divider(); if ($canDo->get('core.create')) { JToolBarHelper::addNew('knownip.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('knownip.edit', 'JTOOLBAR_EDIT'); } if ($canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'knownips.delete', 'JTOOLBAR_DELETE'); } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_celtawebtraffic'); } $help_url = 'http://coalaweb.com/services/joomla-services-such-a-great-cms/joomla-docs/item/celtaweb-traffic-guide'; JToolBarHelper::help('COM_CELTAWEBTRAFFIC_TITLE_HELP', false, $help_url); }