/** * Add the page title and toolbar. * */ protected function addToolbar() { $isNew = $this->item->id == 0; $canDo = SnippetsHelper::getActions(); JHtml::stylesheet('nnframework/style.min.css', false, true); JHtml::stylesheet('snippets/style.min.css', false, true); JFactory::getApplication()->input->set('hidemainmenu', true); // Set document title JFactory::getDocument()->setTitle(JText::_('SNIPPETS') . ': ' . JText::_('NN_ITEM')); // Set ToolBar title JToolbarHelper::title(JText::_('SNIPPETS') . ': ' . JText::_('NN_ITEM'), 'snippets icon-nonumber'); // If not checked out, can save the item. if ($canDo->get('core.edit')) { JToolbarHelper::apply('item.apply'); JToolbarHelper::save('item.save'); } if ($canDo->get('core.edit') && $canDo->get('core.create')) { JToolbarHelper::save2new('item.save2new'); } if (!$isNew && $canDo->get('core.create')) { JToolbarHelper::save2copy('item.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('item.cancel'); } else { JToolbarHelper::cancel('item.cancel', 'JTOOLBAR_CLOSE'); } }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $isNew = $this->item->id == 0; $canDo = $this->canDo; JToolbarHelper::title($isNew ? JText::_('COM_TEMPLATES_MANAGER_ADD_STYLE') : JText::_('COM_TEMPLATES_MANAGER_EDIT_STYLE'), 'eye thememanager'); // If not checked out, can save the item. if ($canDo->get('core.edit')) { JToolbarHelper::apply('style.apply'); JToolbarHelper::save('style.save'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolbarHelper::save2copy('style.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('style.cancel'); } else { JToolbarHelper::cancel('style.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); // Get the help information for the template item. $lang = JFactory::getLanguage(); $help = $this->get('Help'); if ($lang->hasKey($help->url)) { $debug = $lang->setDebug(false); $url = JText::_($help->url); $lang->setDebug($debug); } else { $url = null; } JToolbarHelper::help($help->key, false, $url); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $checkedOut = !true; // Since we don't track these assets at the item level, use the category id. JToolbarHelper::title(JText::_('COM_HTRAININGLOGS_MANAGER_H_TR_SESSION'), 'link h_tr_sessions'); // If not checked out, can save the item. if (!$checkedOut || count($user->getAuthorisedCategories('com_htraininglogs', 'core.create'))) { JToolbarHelper::apply('h_tr_session.apply'); JToolbarHelper::save('h_tr_session.save'); } if (!$checkedOut && count($user->getAuthorisedCategories('com_htraininglogs', 'core.create'))) { JToolbarHelper::save2new('h_tr_session.save2new'); } // If an existing item, can save to a copy. if (!$isNew && count($user->getAuthorisedCategories('com_htraininglogs', 'core.create')) > 0) { JToolbarHelper::save2copy('h_tr_session.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('h_tr_session.cancel'); } else { if ($this->state->params->get('save_history', 0) && $user->authorise('core.edit')) { JToolbarHelper::versions('com_htraininglogs.h_tr_session', $this->item->id); } JToolbarHelper::cancel('h_tr_session.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_COMPONENTS_H_tr_sessionS_LINKS_EDIT'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $userId = $user->get('id'); $isNew = $this->item->id == 0; //$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); // Since we don't track these assets at the item level, use the category id. //$canDo = WcatalogHelper::getActions($this->item->catid, 0); JToolbarHelper::title(JText::_('COM_WCATALOG_MANAGER_CATEGORY'), 'categories.png'); // If not checked out, can save the item. //if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_wcatalog', 'core.create')) > 0)) //{ JToolbarHelper::apply('category.apply'); JToolbarHelper::save('category.save'); //} //if (!$checkedOut && count($user->getAuthorisedCategories('com_wcatalog', 'core.create')) > 0){ JToolbarHelper::save2new('category.save2new'); //} // If an existing item, can save to a copy. //if (!$isNew && $canDo->get('core.create')) //{ JToolbarHelper::save2copy('category.save2copy'); //} if (empty($this->item->id)) { JToolbarHelper::cancel('category.cancel'); } else { JToolbarHelper::cancel('category.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_COMPONENTS_WCATALOG_CATEGORIES_EDIT'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $canDo = PluginsHelper::getActions(); JToolbarHelper::title(JText::sprintf('COM_PLUGINS_MANAGER_PLUGIN', JText::_($this->item->name)), 'plugin'); // If not checked out, can save the item. if ($canDo->get('core.edit')) { JToolbarHelper::apply('plugin.apply'); JToolbarHelper::save('plugin.save'); } JToolbarHelper::cancel('plugin.cancel', 'JTOOLBAR_CLOSE'); JToolbarHelper::divider(); // Get the help information for the plugin item. $lang = JFactory::getLanguage(); $help = $this->get('Help'); if ($lang->hasKey($help->url)) { $debug = $lang->setDebug(false); $url = JText::_($help->url); $lang->setDebug($debug); } else { $url = null; } JToolbarHelper::help($help->key, false, $url); }
/** * Displays the settings form for the respective page. * * @since 1.0 * @access public * @param null * @return null * @author Mark Lee <*****@*****.**> */ public function form() { // Get the current page. $page = $this->input->get('page', '', 'word'); // Ensure that the page is valid if (!$page) { return $this->redirect('index.php?option=com_easysocial'); } // Add Joomla toolbar buttons JToolbarHelper::apply(); JToolbarHelper::custom('export', 'export', '', JText::_('COM_EASYSOCIAL_SETTINGS_EXPORT_SETTINGS'), false); JToolbarHelper::custom('import', 'import', '', JText::_('COM_EASYSOCIAL_SETTINGS_IMPORT_SETTINGS'), false); JToolbarHelper::custom('reset', 'default', '', JText::_('COM_EASYSOCIAL_RESET_TO_FACTORY'), false); // Set the heading $languageString = strtoupper($page); $this->setHeading(JText::_('COM_EASYSOCIAL_' . $languageString . '_SETTINGS_HEADER')); $this->setDescription(JText::_('COM_EASYSOCIAL_' . $languageString . '_SETTINGS_HEADER_DESC')); // Ensure that page is in proper string format. $page = strtolower($page); // Set the page to the class for other method to access $this->section = $page; // Set the page variable. $this->set('page', $page); $this->set('settings', $this); echo parent::display('admin/settings/form.container'); }
protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $userId = $user->get('id'); $isNew = $this->item->id == 0; $canDo = ReservaHelper::getActions($this->item->catid, 0); JToolbarHelper::title(JText::_('COM_RESEVA_MANAGER_EVENTO'), ''); if ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_reserva', 'core.create'))) { JToolbarHelper::apply('evento.apply'); JToolbarHelper::save('evento.save'); } if (count($user->getAuthorisedCategories('com_reserva', 'core.create'))) { JToolbarHelper::save2new('evento.save2new'); } // If an existing item, can save to a copy. if (!$isNew && count($user->getAuthorisedCategories('com_reserva', 'core.create')) > 0) { JToolbarHelper::save2copy('evento.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('evento.cancel'); } else { JToolbarHelper::cancel('evento.cancel', 'JTOOLBAR_CLOSE'); } }
/** * Add the page title and toolbar. * * @return void * * @since 1.0.0 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); $canDo = CMDonationHelper::getActions(); JToolbarHelper::title(JText::_('COM_CMDONATION_MANAGER_DONATIONS'), 'donation icon-heart-2'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) { JToolbarHelper::apply('donation.apply'); JToolbarHelper::save('donation.save'); } if (!$checkedOut && $canDo->get('core.create')) { JToolbarHelper::save2new('donation.save2new'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolbarHelper::save2copy('donation.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('donation.cancel'); } else { JToolbarHelper::cancel('donation.cancel', 'JTOOLBAR_CLOSE'); } }
function display($tpl = null) { $entry = $this->get('Data'); // Get Categories for selection list $categories = $this->get('Categories', 'categories'); if (empty($entry->id)) { JToolBarHelper::title(JText::_('COM_JOOMLABACKLINKCHECKER') . ' - ' . JText::_('COM_JOOMLABACKLINKCHECKER_NEWENTRY'), 'joomlabacklinkchecker-add'); JToolBarHelper::save('save'); JToolBarHelper::cancel('cancel'); } else { JToolBarHelper::title(JText::_('COM_JOOMLABACKLINKCHECKER') . ' - ' . JText::_('COM_JOOMLABACKLINKCHECKER_EDITENTRY'), 'joomlabacklinkchecker-edit'); JToolbarHelper::apply('apply'); JToolBarHelper::save('save'); JToolBarHelper::custom('checkselection', 'extension', 'extension', JText::_('COM_JOOMLABACKLINKCHECKER_SAVECHECK_BUTTON'), false); JToolBarHelper::cancel('cancel', 'Close'); } $document = JFactory::getDocument(); $document->addStyleSheet('components/com_joomlabacklinkchecker/css/joomlabacklinkchecker.css'); $this->assignRef('entry', $entry); $this->assignRef('categories', $categories); require_once JPATH_COMPONENT . '/helpers/joomlabacklinkchecker.php'; $donation_code_message = JoomlaBacklinkCheckerHelper::getDonationCodeMessage(); $this->assignRef('donation_code_message', $donation_code_message); parent::display($tpl); }
function _edit_coupon($tpl = null) { $document = JFactory::getDocument(); JFactory::getApplication()->input->set('hidemainmenu', 1); $logo = '<img src="' . JURI::root() . 'administrator/components/com_alphauserpoints/assets/images/icon-48-alphauserpoints.png" /> '; JToolBarHelper::title($logo . 'AlphaUserPoints :: ' . JText::_('AUP_COUPON_CODES'), 'thememanager'); getCpanelToolbar(); if ($this->row->printable) { $bar = JToolBar::getInstance('toolbar'); $bar->appendButton('Popup', 'print', JText::_('AUP_PRINT'), 'index.php?option=com_alphauserpoints&task=printcoupon&id=' . $this->row->id . '&layout=modal&tmpl=component', 740, 480, 0, 0); JToolBarHelper::divider(); } if (JFactory::getUser()->authorise('core.edit.state', 'com_alphauserpoints')) { JToolbarHelper::apply('applycoupon'); JToolBarHelper::save('savecoupon'); } JToolBarHelper::cancel('cancelcoupon'); getPrefHelpToolbar(); //JHTML::_('behavior.mootools'); JHTML::_('behavior.calendar'); //$document->addScriptDeclaration("window.addEvent('domready', function(){ var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50, fixed: false}); });"); $this->assignRef('row', $this->row); $this->assignRef('lists', $this->lists); parent::display("form"); }
function _edit_user($tpl = null) { $document = JFactory::getDocument(); JFactory::getApplication()->input->set('hidemainmenu', 1); $logo = '<img src="' . JURI::root() . 'administrator/components/com_alphauserpoints/assets/images/icon-48-alphauserpoints.png" /> '; JToolBarHelper::title($logo . 'AlphaUserPoints :: ' . JText::_('AUP_USERS_POINTS') . ': ' . $this->row->name, 'user'); getCpanelToolbar(); if (JFactory::getUser()->authorise('core.edit.state', 'com_alphauserpoints')) { JToolbarHelper::apply('applyuser'); JToolBarHelper::save('saveuser'); } JToolBarHelper::cancel('canceluser'); getPrefHelpToolbar(); JHTML::_('behavior.calendar'); //$document->addScriptDeclaration("window.addEvent('domready', function(){ var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50, fixed: false}); });"); $this->assignRef('row', $this->row); $this->assignRef('listrank', $this->listrank); $this->assignRef('medalsexist', $this->medalsexist); $pagination = new JPagination($this->total, $this->limitstart, $this->limit); $this->assignRef('pagination', $pagination); $this->assignRef('userDetails', $this->userDetails); $this->assignRef('total', $this->total); $this->assignRef('limit', $this->limit); $this->assignRef('limitstart', $this->limitstart); $this->assignRef('lists', $this->lists); $this->assignRef('name', $this->name); $this->assignRef('cid', $this->cid); parent::display("form"); }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolBar() { $input = JFactory::getApplication()->input; // Hide Joomla Administrator Main menu $input->set('hidemainmenu', true); $isNew = $this->item->id == 0; if ($isNew) { $title = JText::_('COM_ISSNREGISTRY_PUBLISHER_NEW'); } else { $title = JText::_('COM_ISSNREGISTRY_PUBLISHER_EDIT'); $title .= ' : ' . $this->item->official_name; } JToolBarHelper::title($title, 'publisher'); JToolbarHelper::apply('publisher.apply'); if (!$isNew) { // Add custom button for sending a message $toolbar = JToolBar::getInstance('toolbar'); $layout = new JLayoutFile('joomla.toolbar.popup'); // Render the popup button $dhtml = $layout->render(array('name' => 'generate-message', 'doTask' => '', 'text' => JText::_('COM_ISSNREGISTRY_PUBLISHER_BUTTON_SEND_MESSAGE'), 'class' => 'icon-envelope')); $toolbar->appendButton('Custom', $dhtml); // Render the popup button $dhtml = $layout->render(array('name' => 'print', 'doTask' => '', 'text' => JText::_('COM_ISSNREGISTRY_PUBLISHER_BUTTON_PRINT'), 'class' => 'icon-print')); $toolbar->appendButton('Custom', $dhtml); } JToolBarHelper::cancel('publisher.cancel', $isNew ? 'JTOOLBAR_CANCEL' : 'JTOOLBAR_CLOSE'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); // Since we don't track these assets at the item level, use the category id. $canDo = JHelperContent::getActions('com_newsfeeds', 'category', $this->item->catid); JToolbarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEED'), 'feed newsfeeds'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0)) { JToolbarHelper::apply('newsfeed.apply'); JToolbarHelper::save('newsfeed.save'); } if (!$checkedOut && count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) { JToolbarHelper::save2new('newsfeed.save2new'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolbarHelper::save2copy('newsfeed.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('newsfeed.cancel'); } else { if ($this->state->params->get('save_history', 0) && $user->authorise('core.edit')) { JToolbarHelper::versions('com_newsfeeds.newsfeed', $this->item->id); } JToolbarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT'); }
/** * Displays the settings form for the respective page. * * @since 1.0 * @access public * @param null * @return null * @author Mark Lee <*****@*****.**> */ public function form() { // Get the current page. $page = JRequest::getVar('page', ''); // Get info object. $info = FD::info(); if (empty($page)) { // @TODO: Log errors here. $info->set(JText::_('No page provided'), SOCIAL_MSG_ERROR); $this->redirect('index.php?option=com_easysocial'); } // Add Joomla toolbar buttons JToolbarHelper::apply(); JToolbarHelper::custom('export', 'export', '', JText::_('COM_EASYSOCIAL_SETTINGS_EXPORT_SETTINGS'), false); JToolbarHelper::custom('import', 'import', '', JText::_('COM_EASYSOCIAL_SETTINGS_IMPORT_SETTINGS'), false); JToolbarHelper::custom('reset', 'default', '', JText::_('COM_EASYSOCIAL_RESET_TO_FACTORY'), false); // We need to include the theme file's header info. $theme = FD::get('Themes'); $paths = $theme->getTemplate('admin/settings/headers/' . $page); if (JFile::exists($paths->file)) { include $paths->file; } // Ensure that page is in proper string format. $page = strtolower($page); // Set the page to the class for other method to access $this->section = $page; // Set the page variable. $this->set('page', $page); // Set settings view variable $this->set('settings', $this); echo parent::display('admin/settings/form.container'); }
function display($tpl = null) { $entry = $this->get('Data'); $characters_length = $this->get('CharactersLength'); $robots_array = array('', 'index, follow', 'noindex, follow', 'index, nofollow', 'noindex, nofollow'); if (empty($entry->id)) { JToolBarHelper::title(JText::_('COM_EASYFRONTENDSEO') . ' - ' . JText::_('COM_EASYFRONTENDSEO_NEWENTRY'), 'easyfrontendseo-add'); JToolBarHelper::save('save'); JToolBarHelper::cancel('cancel'); } else { JToolBarHelper::title(JText::_('COM_EASYFRONTENDSEO') . ' - ' . JText::_('COM_EASYFRONTENDSEO_EDITENTRY'), 'easyfrontendseo-edit'); JToolbarHelper::apply('apply'); JToolBarHelper::save('save'); JToolBarHelper::cancel('cancel', 'Close'); } JHTML::_('behavior.framework'); $document = JFactory::getDocument(); $document->addStyleSheet('components/com_easyfrontendseo/css/easyfrontendseo.css'); $document->addScript('components/com_easyfrontendseo/js/wordcount.js', 'text/javascript'); $output = "window.addEvent('domready', function(){"; $output .= "new WordCount('counter_title', {inputName:'title', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_title', {inputName:'title', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n"; $output .= "new WordCount('counter_description', {inputName:'description', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_description', {inputName:'description', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n"; $output .= "new WordCount('counter_keywords', {inputName:'keywords', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_keywords', {inputName:'keywords', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n"; $output .= "new WordCount('counter_generator', {inputName:'generator', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_generator', {inputName:'generator', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n"; $output .= " });"; $document->addScriptDeclaration($output, 'text/javascript'); $this->entry = $entry; $this->characters_length = $characters_length; $this->robots_array = $robots_array; // Get donation code message require_once JPATH_COMPONENT . '/helpers/easyfrontendseo.php'; $donation_code_message = EasyFrontendSeoHelper::getDonationCodeMessage(); $this->donation_code_message = $donation_code_message; parent::display($tpl); }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); $canDo = $this->canDo; JToolbarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_CLIENT_NEW') : JText::_('COM_BANNERS_MANAGER_CLIENT_EDIT'), 'bookmark banners-clients'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) { JToolbarHelper::apply('client.apply'); JToolbarHelper::save('client.save'); } if (!$checkedOut && $canDo->get('core.create')) { JToolbarHelper::save2new('client.save2new'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolbarHelper::save2copy('client.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('client.cancel'); } else { if ($this->state->params->get('save_history', 0) && $user->authorise('core.edit')) { JToolbarHelper::versions('com_banners.client', $this->item->id); } JToolbarHelper::cancel('client.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS_EDIT'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/languages.php'; JFactory::getApplication()->input->set('hidemainmenu', 1); $isNew = empty($this->item->lang_id); $canDo = $this->canDo; JToolbarHelper::title(JText::_($isNew ? 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE' : 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_EDIT_TITLE'), 'comments-2 langmanager'); // If a new item, can save. if ($isNew && $canDo->get('core.create')) { JToolbarHelper::save('language.save'); } //If an existing item, allow to Apply and Save. if (!$isNew && $canDo->get('core.edit')) { JToolbarHelper::apply('language.apply'); JToolbarHelper::save('language.save'); } // If an existing item, can save to a copy only if we have create rights. if ($canDo->get('core.create')) { JToolbarHelper::save2new('language.save2new'); } if ($isNew) { JToolbarHelper::cancel('language.cancel'); } else { JToolbarHelper::cancel('language.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_EDIT'); $this->sidebar = JHtmlSidebar::render(); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $input = JFactory::getApplication()->input; $input->set('hidemainmenu', true); $isNew = $this->item->id == 0; $canDo = MenusHelper::getActions($this->state->get('filter.parent_id')); JToolbarHelper::title(JText::_($isNew ? 'COM_MENUS_VIEW_NEW_MENU_TITLE' : 'COM_MENUS_VIEW_EDIT_MENU_TITLE'), 'list menu'); // If a new item, can save the item. Allow users with edit permissions to apply changes to prevent returning to grid. if ($isNew && $canDo->get('core.create')) { if ($canDo->get('core.edit')) { JToolbarHelper::apply('menu.apply'); } JToolbarHelper::save('menu.save'); } // If user can edit, can save the item. if (!$isNew && $canDo->get('core.edit')) { JToolbarHelper::apply('menu.apply'); JToolbarHelper::save('menu.save'); } // If the user can create new items, allow them to see Save & New if ($canDo->get('core.create')) { JToolbarHelper::save2new('menu.save2new'); } if ($isNew) { JToolbarHelper::cancel('menu.cancel'); } else { JToolbarHelper::cancel('menu.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_MENUS_MENU_MANAGER_EDIT'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JToolbarHelper::apply('tour.apply'); JToolbarHelper::save('tour.save'); JToolbarHelper::cancel('tour.cancel'); JToolbarHelper::divider(); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $isNew = $this->item->id == 0; $canDo = JHelperContent::getActions('com_users'); JToolbarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_LEVEL_TITLE' : 'COM_USERS_VIEW_EDIT_LEVEL_TITLE'), 'users levels-add'); if ($canDo->get('core.edit') || $canDo->get('core.create')) { JToolbarHelper::apply('level.apply'); JToolbarHelper::save('level.save'); } if ($canDo->get('core.create')) { JToolbarHelper::save2new('level.save2new'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolbarHelper::save2copy('level.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('level.cancel'); } else { JToolbarHelper::cancel('level.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_USERS_ACCESS_LEVELS_EDIT'); }
/** * Add the page title and toolbar. * * @return void. * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $isNew = $this->item->id == 0; $canDo = JHelperContent::getActions('com_redirect'); JToolbarHelper::title($isNew ? JText::_('COM_REDIRECT_MANAGER_LINK_NEW') : JText::_('COM_REDIRECT_MANAGER_LINK_EDIT'), 'refresh redirect'); // If not checked out, can save the item. if ($canDo->get('core.edit')) { JToolbarHelper::apply('link.apply'); JToolbarHelper::save('link.save'); } /** * This component does not support Save as Copy due to uniqueness checks. * While it can be done, it causes too much confusion if the user does * not change the Old URL. */ if ($canDo->get('core.edit') && $canDo->get('core.create')) { JToolbarHelper::save2new('link.save2new'); } if (empty($this->item->id)) { JToolbarHelper::cancel('link.cancel'); } else { JToolbarHelper::cancel('link.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER_EDIT'); }
/** * Display the toolbar. * * @return void * * @since 2.5 */ protected function addToolbar() { $input = JFactory::getApplication()->input; $input->set('hidemainmenu', 1); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); $canDo = UsersHelper::getActions($this->state->get('filter.category_id'), $this->item->id); JToolbarHelper::title(JText::_('COM_USERS_NOTES'), 'users user'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_users', 'core.create')))) { JToolbarHelper::apply('note.apply'); JToolbarHelper::save('note.save'); } if (!$checkedOut && count($user->getAuthorisedCategories('com_users', 'core.create'))) { JToolbarHelper::save2new('note.save2new'); } // If an existing item, can save to a copy. if (!$isNew && count($user->getAuthorisedCategories('com_users', 'core.create')) > 0) { JToolbarHelper::save2copy('note.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('note.cancel'); } else { if ($this->state->params->get('save_history', 0) && $user->authorise('core.edit')) { JToolbarHelper::versions('com_users.note', $this->item->id); } JToolbarHelper::cancel('note.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_USERS_USER_NOTES_EDIT'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $userId = $user->get('id'); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId); // Since we don't track these assets at the item level, use the category id. $canDo = BannersHelper::getActions($this->item->catid, 0); JToolbarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_BANNER_NEW') : JText::_('COM_BANNERS_MANAGER_BANNER_EDIT'), 'banners.png'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0)) { JToolbarHelper::apply('banner.apply'); JToolbarHelper::save('banner.save'); if ($canDo->get('core.create')) { JToolbarHelper::save2new('banner.save2new'); } } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolbarHelper::save2copy('banner.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('banner.cancel'); } else { JToolbarHelper::cancel('banner.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS_EDIT'); }
/** * Add the page title and toolbar. * */ protected function addToolbar() { if (version_compare(JVERSION, '3.0', 'lt')) { JRequest::setVar('hidemainmenu', true); } else { JFactory::getApplication()->input->set('hidemainmenu', true); } $user = JFactory::getUser(); $user_id = $user->get('id'); $is_new = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 or $this->item->checked_out == $user_id); JToolbarHelper::title($is_new ? JText::_('COM_COMPONENTARCHITECT_COMPONENTOBJECTS_NEW_HEADER') : JText::_('COM_COMPONENTARCHITECT_COMPONENTOBJECTS_EDIT_HEADER'), 'componentobjects.png'); JToolbarHelper::apply('componentobject.apply', 'JTOOLBAR_APPLY'); JToolbarHelper::save('componentobject.save', 'JTOOLBAR_SAVE'); JToolbarHelper::custom('componentobject.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); // If an existing item, can save to a copy. if (!$is_new) { JToolbarHelper::custom('componentobject.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); } if ($is_new) { JToolbarHelper::cancel('componentobject.cancel', 'JTOOLBAR_CANCEL'); } else { JToolbarHelper::cancel('componentobject.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); $params = $this->state->get('params'); JToolbarHelper::help('JHELP_COMPONENTS_COMPONENTARCHITECT_COMPONENTOBJECT_EDIT', true, null, 'com_componentarchitect'); }
public function registerToolbar() { JToolBarHelper::title(JText::_('COM_EASYDISCUSS_EDITING_POST'), 'discussions'); JToolbarHelper::apply(); JToolbarHelper::save(); JToolBarHelper::divider(); JToolBarHelper::cancel(); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); JToolbarHelper::title(JText::_('Gestion des bénévoles : Editer un calendrier')); JToolbarHelper::apply('calendar.apply'); JToolbarHelper::save('calendar.save'); JToolbarHelper::cancel('calendar.cancel'); }
protected function addToolbar() { JToolbarHelper::title(JText::_('COM_JOOMDLE_VIEW_MAILINGLIST_TITLE_CONFIGURATION'), 'config.png'); JToolbarHelper::apply('config.apply'); JToolbarHelper::save('config.save'); JToolbarHelper::cancel('config.cancel'); JHtmlSidebar::setAction('index.php?option=com_joomdle&view=courseapplications'); }
/** * Add the page title and toolbar. * * @access public * @return void * * @since 2.0 */ function addToolbar() { JToolBarHelper::title(JText::_('COM_JOOMGALLERY_IMGMAN_IMAGE_MANAGER') . ' :: ' . JText::_('COM_JOOMGALLERY_FIELDSET_EDITIMAGES'), 'images'); JToolbarHelper::apply('apply'); JToolbarHelper::save('save'); JToolbarHelper::cancel('cancel'); JToolbarHelper::spacer(); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $this->documentTitle = JText::_('COM_CROWDFUNDING_EDIT_TRANSACTION'); JToolbarHelper::title($this->documentTitle); JToolbarHelper::apply('transaction.apply'); JToolbarHelper::save('transaction.save'); JToolbarHelper::cancel('transaction.cancel', 'JTOOLBAR_CANCEL'); }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $userId = $user->get('id'); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId); // Since we don't track these assets at the item level, use the category id. /** @noinspection PhpUndefinedClassInspection */ $canDo = CatalogueHelper::getActions($this->item->id, 0); JToolbarHelper::title($isNew ? JText::_('COM_CATALOGUE_MANAGER_ITEM_NEW') : JText::_('COM_CATALOGUE_MANAGER_ITEM_EDIT'), 'banners.png'); // If not checked out, can save the item. if (!$checkedOut && $canDo->get('core.edit')) { JToolbarHelper::apply('item.apply'); JToolbarHelper::save('item.save'); if ($canDo->get('core.create')) { JToolbarHelper::save2new('item.save2new'); } } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolbarHelper::save2copy('item.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('item.cancel'); } else { JToolbarHelper::cancel('item.cancel', 'JTOOLBAR_CLOSE'); } }