/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = MessagesHelper::getActions(); JToolBarHelper::title(JText::_('COM_MESSAGES_MANAGER_MESSAGES'), 'inbox.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('message.add'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::publish('messages.publish', 'COM_MESSAGES_TOOLBAR_MARK_AS_READ'); JToolBarHelper::unpublish('messages.unpublish', 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::divider(); JToolBarHelper::deleteList('', 'messages.delete', 'JTOOLBAR_EMPTY_TRASH'); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::trash('messages.trash'); } } //JToolBarHelper::addNew('module.add'); JToolBarHelper::divider(); $bar = JToolBar::getInstance('toolbar'); $bar->appendButton('Popup', 'options', 'COM_MESSAGES_TOOLBAR_MY_SETTINGS', 'index.php?option=com_messages&view=config&tmpl=component', 850, 400); if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_messages'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX'); }
/** * Setup the Toolbar. */ protected function _setToolbar() { $state = $this->get('State'); $canDo = TemplatesHelper::getActions(); $isSite = $state->get('filter.client_id') == 0; if ($canDo->get('core.edit')) { JToolBarHelper::editList('style.edit'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::custom('styles.sethome', 'default.png', 'default_f2.png', 'Templates_Toolbar_Set_Home', true); } JToolBarHelper::title(JText::_('Templates_Manager_Styles'), 'thememanager'); if ($canDo->get('core.create') && $isSite) { JToolBarHelper::addNew('styles.duplicate', 'Templates_Toolbar_Save_Copy'); } if ($canDo->get('core.delete') && $isSite) { JToolBarHelper::deleteList('', 'styles.delete'); } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_templates'); } JToolBarHelper::divider(); JToolBarHelper::help('screen.templates'); }
/** * Add the page title and toolbar. */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; if (isset($this->item->checked_out)) { $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); } else { $checkedOut = false; } $canDo = SomosmaestrosHelper::getActions(); JToolBarHelper::title(JText::_('COM_SOMOSMAESTROS_TITLE_FORMACION'), 'formacion.png'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) { JToolBarHelper::apply('formacion.apply', 'JTOOLBAR_APPLY'); JToolBarHelper::save('formacion.save', 'JTOOLBAR_SAVE'); } if (!$checkedOut && $canDo->get('core.create')) { JToolBarHelper::custom('formacion.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::custom('formacion.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); } if (empty($this->item->id)) { JToolBarHelper::cancel('formacion.cancel', 'JTOOLBAR_CANCEL'); } else { JToolBarHelper::cancel('formacion.cancel', 'JTOOLBAR_CLOSE'); } }
function display($tpl = null) { JToolBarHelper::title(JText::_('COM_REDSOCIALSTREAM_CONFIGURE'), 'configure.png'); JToolBarHelper::apply(); JToolBarHelper::cancel('cancel', 'COM_REDSOCIALSTREAM_CLOSE'); //DEVNOTE: set document title $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_REDSOCIALSTREAM_REDSOCIALSTREAMS')); $mainframe = JFactory::getApplication(); $context = "config"; $model = $this->getModel('configure'); $db = JFactory::getDbo(); $q = "SELECT * FROM #__redsocialstream_settings"; $db->setQuery($q); $this->settingsrows = $db->loadObjectList(); $typelist = $this->get('type_list_sorted'); $pagination = $this->get('Pagination'); //DEVNOTE:give me ordering from request $filter_order = $mainframe->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'ordering'); $filter_order_Dir = $mainframe->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', ''); $this->assignRef('lists', $lists); $this->assignRef("typelist", $typelist); $this->assignRef('pagination', $pagination); parent::display($tpl); }
/** * Add the page title and toolbar. */ 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 = SibdietHelper::getActions(); JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_ERRAND'), 'database errands'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) { JToolBarHelper::apply('errand.apply'); JToolBarHelper::save('errand.save'); } if (!$checkedOut && $canDo->get('core.create')) { JToolbarHelper::save2new('errand.save2new'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolbarHelper::save2copy('errand.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('errand.cancel'); } else { JToolBarHelper::cancel('errand.cancel', 'JTOOLBAR_CLOSE'); } }
/** * Add the page title and toolbar. * * */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php'; JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); $canDo = JDownloadsHelper::getActions(); $document = JFactory::getDocument(); $document->addStyleSheet('components/com_jdownloads/assets/css/style.css'); $title = $isNew ? JText::_('COM_JDOWNLOADS_LICEDIT_ADD') : JText::_('COM_JDOWNLOADS_LICEDIT_EDIT'); JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . $title, 'jdlicenses'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) { JToolBarHelper::apply('license.apply'); JToolBarHelper::save('license.save'); } if (!$checkedOut && $canDo->get('core.create')) { JToolBarHelper::save2new('license.save2new'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::save2copy('license.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('license.cancel'); } else { JToolBarHelper::cancel('license.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); JToolBarHelper::help('help.license', true); }
/** * Setting the toolbar */ protected function addToolBar() { JToolBarHelper::title(JText::_('COM_BOOKINGFORCONNECTOR_ADMINISTRATION_TITLE'), 'BookingFor Connector'); // JToolBarHelper::title('BookingFor Connector'); //JToolBarHelper::addNew('helloworld.add'); JToolBarHelper::preferences('com_bookingforconnector'); }
/** * Validates the data submitted based on the suffix provided * A controller for this plugin, you could say * * @param $task * @return html */ function viewList() { $app = JFactory::getApplication(); $option = 'com_j2store'; $ns = $option . '.report'; $html = ""; JToolBarHelper::title(JText::_('J2STORE_REPORT') . '-' . JText::_('PLG_J2STORE_' . strtoupper($this->_element)), 'j2store-logo'); $vars = new JObject(); $this->includeCustomModel('Reportitemised'); $this->includeCustomTables(); $model = F0FModel::getTmpInstance('ReportItemised', 'J2StoreModel'); $model->setState('limit', $app->input->getInt('limit', 0)); $model->setState('limitstart', $app->input->getInt('limitstart', 0)); $model->setState('filter_search', $app->input->getString('filter_search')); $model->setState('filter_orderstatus', $app->input->getString('filter_orderstatus')); $model->setState('filter_order', $app->input->getString('filter_order')); $model->setState('filter_order_Dir', $app->input->getString('filter_order_Dir')); $list = $model->getData(); //$list = $model->getList(); $vars->state = $model->getState(); $vars->list = $list; $vars->total = $model->getTotal(); $vars->pagination = $model->getPagination(); $vars->orderStatus = F0FModel::getTmpInstance('OrderStatuses', 'J2StoreModel')->enabled(1)->getList(); $id = $app->input->getInt('id', '0'); $vars->id = $id; $form = array(); $form['action'] = "index.php?option=com_j2store&view=report&task=view&id={$id}"; $vars->form = $form; $html = $this->_getLayout('default', $vars); return $html; }
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); }
public function display($tpl = null) { JHTML::stylesheet('joomfish.css', 'administrator/components/com_joomfish/assets/css/'); $document = JFactory::getDocument(); $document->setTitle(JText::_('JOOMFISH_TITLE') . ' :: ' . JText::_('TITLE_Statistics')); // Set toolbar items for the page JToolBarHelper::title(JText::_('TITLE_Statistics'), 'statistics'); JToolBarHelper::custom('cpanel.show', 'joomfish', 'joomfish', 'CONTROL PANEL', false); JToolBarHelper::help('screen.statistics', true); JSubMenuHelper::addEntry(JText::_('Control Panel'), 'index2.php?option=com_joomfish'); JSubMenuHelper::addEntry(JText::_('Translation'), 'index2.php?option=com_joomfish&task=translate.overview'); JSubMenuHelper::addEntry(JText::_('Orphans'), 'index2.php?option=com_joomfish&task=translate.orphans'); JSubMenuHelper::addEntry(JText::_('Manage Translations'), 'index2.php?option=com_joomfish&task=manage.overview', false); JSubMenuHelper::addEntry(JText::_('Statistics'), 'index2.php?option=com_joomfish&task=statistics.overview', true); JSubMenuHelper::addEntry(JText::_('Language Configuration'), 'index2.php?option=com_joomfish&task=languages.show', false); JSubMenuHelper::addEntry(JText::_('Content elements'), 'index2.php?option=com_joomfish&task=elements.show', false); JSubMenuHelper::addEntry(JText::_('HELP AND HOWTO'), 'index2.php?option=com_joomfish&task=help.show', false); $this->panelStates = $this->get('PanelStates'); $this->contentInfo = $this->get('ContentInfo'); $this->publishedTabs = $this->get('PublishedTabs'); $this->assignRef('panelStates', $this->panelStates); $this->assignRef('contentInfo', $this->contentInfo); $this->assignRef('publishedTabs', $this->publishedTabs); JHTML::_('behavior.tooltip'); parent::display($tpl); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', 1); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $canDo = UsersHelper::getActions(); JToolBarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_GROUP_TITLE' : 'COM_USERS_VIEW_EDIT_GROUP_TITLE'), 'groups-add'); if ($canDo->get('core.edit') || $canDo->get('core.create')) { JToolBarHelper::apply('group.apply'); JToolBarHelper::save('group.save'); } if ($canDo->get('core.create')) { JToolBarHelper::save2new('group.save2new'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::save2copy('group.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('group.cancel'); } else { JToolBarHelper::cancel('group.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_USERS_GROUPS_EDIT'); }
/** * 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')); // Built the actions for new and existing records. $canDo = JHelperContent::getActions('com_testyourself'); JToolBarHelper::title(JText::_('COM_TESTYOURSELF_MANAGER_QUESTION'), 'question questions'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) { JToolBarHelper::apply('question.apply'); JToolBarHelper::save('question.save'); } if (!$checkedOut && $canDo->get('core.create')) { JToolbarHelper::save2new('question.save2new'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolbarHelper::save2copy('question.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('question.cancel'); } else { JToolBarHelper::cancel('question.cancel', 'JTOOLBAR_CLOSE'); } }
/** * Add the page title and toolbar. */ protected function addToolbar() { $canDo = JfoobarsHelper::getActions($this->state->get('filter.category_id')); $user = JFactory::getUser(); JToolBarHelper::title(JText::_('COM_JFOOBARS_JFOOBARS_TITLE'), 'jfoobar.png'); if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_jfoobars', 'core.create')) > 0) { JToolBarHelper::addNew('jfoobar.add'); } if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolBarHelper::editList('jfoobar.edit'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::publish('jfoobars.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('jfoobars.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::checkin('jfoobars.checkin'); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'jfoobars.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('jfoobars.trash'); JToolBarHelper::divider(); } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_jfoobars'); JToolBarHelper::divider(); } }
function display($tpl = null) { $mainframe = JFactory::getApplication(); $user = JFactory::getUser(); $option = JRequest::getCmd('option'); $view = JRequest::getCmd('view'); $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $limitstart = $mainframe->getUserStateFromRequest($option . $view . '.limitstart', 'limitstart', 0, 'int'); $filter_order = $mainframe->getUserStateFromRequest($option . $view . 'filter_order', 'filter_order', '', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . $view . 'filter_order_Dir', 'filter_order_Dir', '', 'word'); $model = $this->getModel(); $total = $model->getTotalGroups(); if ($limitstart > $total - $limit) { $limitstart = max(0, (int) (ceil($total / $limit) - 1) * $limit); JRequest::setVar('limitstart', $limitstart); } $extraFieldGroups = $model->getGroups(); $this->assignRef('rows', $extraFieldGroups); jimport('joomla.html.pagination'); $pageNav = new JPagination($total, $limitstart, $limit); $this->assignRef('page', $pageNav); JToolBarHelper::title(JText::_('K2_EXTRA_FIELD_GROUPS'), 'k2.png'); JToolBarHelper::deleteList('', 'remove', 'K2_DELETE'); JToolBarHelper::editList(); JToolBarHelper::addNew(); if (K2_JVERSION != '15') { JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS'); } else { $toolbar = JToolBar::getInstance('toolbar'); $toolbar->appendButton('Popup', 'config', 'Parameters', 'index.php?option=com_k2&view=settings'); } $this->loadHelper('html'); K2HelperHTML::subMenu(); parent::display($tpl); }
/** * The default method that will display the output of this view which is called by * Joomla * * @param string template Template file name **/ public function display($tpl = null) { $mainframe = JFactory::getApplication(); $jinput = $mainframe->input; //$search = $mainframe->getUserStateFromRequest( "com_community.videos.search", 'search', '', 'string' ); $search = JRequest::getVar('search', ''); // Set the titlebar text JToolBarHelper::title(JText::_('COM_COMMUNITY_VIDEOS'), 'videos'); // Add the necessary buttons JToolbarHelper::custom('fetchThumbnail', 'pictures', '', JText::_('COM_COMMUNITY_FETCH_THUMBNAIL')); JToolBarHelper::trash('delete', JText::_('COM_COMMUNITY_DELETE')); JToolBarHelper::publishList('publish', JText::_('COM_COMMUNITY_PUBLISH')); JToolBarHelper::unpublishList('unpublish', JText::_('COM_COMMUNITY_UNPUBLISH')); $videos = $this->get('Videos'); $pagination = $this->get('Pagination'); $categories = $this->get('Categories'); foreach ($videos as $key => $vid) { foreach ($categories as $cat) { $videos[$key]->categoryName = ''; if ($cat->id == $vid->category_id) { $videos[$key]->categoryName = $cat->name; break; } } } $catHTML = $this->_getCategoriesHTML($categories); $this->assignRef('videos', $videos); $this->assignRef('pagination', $pagination); $this->assignRef('search', $search); $this->assignRef('categories', $catHTML); parent::display($tpl); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('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'); }
function display($tpl = null) { if (JRequest::getString('task') != 'edit' && JRequest::getString('task') != 'add') { JToolBarHelper::title('J-HotelReservation : ' . JText::_('LNG_MANAGE_TAXES', true), 'generic.png'); JRequest::setVar('hidemainmenu', 1); $hotel_id = $this->get('HotelId'); if ($hotel_id > 0) { JToolBarHelper::addNew('managetaxes.edit'); JToolBarHelper::editList('managetaxes.edit'); JToolBarHelper::deleteList('', 'managetaxes.delete', JText::_('LNG_DELETE', true)); JToolBarHelper::custom('managetaxes.back', JHotelUtil::getDashBoardIcon(), 'home', JText::_('LNG_HOTEL_DASHBOARD', true), false, false); } $this->hotel_id = $hotel_id; $items = $this->get('Datas'); $this->items = $items; $hotels = $this->get('Hotels'); $hotels = checkHotels(JFactory::getUser()->id, $hotels); $this->hotels = $hotels; } else { $item = $this->get('Data'); $this->item = $item; $hotel_id = $this->get('HotelId'); $this->hotel_id = $hotel_id; $hotel = $this->get('Hotel'); $this->hotel = $hotel; JToolBarHelper::title('J-Hotel Reservation : ' . ($item->tax_id > 0 ? JText::_("LNG_EDIT", true) : JText::_("LNG_ADD_NEW", true)) . ' ' . JText::_('LNG_TAX', true), 'generic.png'); JRequest::setVar('hidemainmenu', 1); JToolBarHelper::cancel('managetaxes.back'); JToolBarHelper::save('managetaxes.save'); } parent::display($tpl); }
protected function addToolbar() { $user = JFactory::getUser(); $par = JComponentHelper::getParams('com_djclassifieds'); JToolBarHelper::title(JText::_('COM_DJCLASSIFIEDS_ITEMS'), 'generic.png'); if ($user->authorise('core.create', 'com_djclassifieds')) { JToolBarHelper::addNew('item.add', 'JTOOLBAR_NEW'); } if ($user->authorise('core.edit', 'com_djclassifieds')) { JToolBarHelper::editList('item.edit', 'JTOOLBAR_EDIT'); } JToolBarHelper::divider(); if ($user->authorise('core.admin', 'com_djclassifieds')) { if ($par->get('store_org_img', '1') == 1) { JToolBarHelper::custom('items.recreateThumbnails', 'move', 'move', JText::_('COM_DJCLASSIFIEDS_RECREATE_THUMBNAILS'), true, true); } JToolBarHelper::custom('items.resmushitThumbnails', 'loop', 'loop', JText::_('COM_DJCLASSIFIEDS_OPTIMIZE_THUMBNAILS'), true, true); JToolBarHelper::custom('items.generateCoordinates', 'refresh', 'refresh', JText::_('COM_DJCLASSIFIEDS_GENERATE_COORDINATES'), false, true); JToolBarHelper::divider(); } if ($user->authorise('core.edit.state', 'com_djclassifieds')) { JToolBarHelper::custom('items.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('items.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::custom('items.archive', 'archive.png', 'archive_f2.png', 'JTOOLBAR_ARCHIVE', true); } if ($user->authorise('core.delete', 'com_djclassifieds')) { JToolBarHelper::deleteList('', 'items.delete', 'JTOOLBAR_DELETE'); } JToolBarHelper::divider(); if ($user->authorise('core.admin', 'com_djclassifieds')) { JToolBarHelper::preferences('com_djclassifieds', 450, 800); JToolBarHelper::divider(); } }
protected function addToolBar() { JToolBarHelper::title(JText::_('COM_TEST_MANAGER_NEW')); JToolBarHelper::addNew('test.add'); JToolBarHelper::editList('test.edit'); JToolBarHelper::deleteList('', 'new.delete'); }
/** * Установки тулбара */ protected function _setToolBar() { require_once JPATH_COMPONENT . '/helpers/smfaq.php'; JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); SmFaqHelper::addSubmenu($this->_name); $canDo = SmFaqHelper::getActions($this->state->get('filter.category_id')); // Выводим нужные кнопки и заголовок JToolBarHelper::title(JText::_('COM_SMFAQ_MANAGER_QUESTIONS'), 'smfaq'); if ($canDo->get('core.create')) { JToolBarHelper::addNewX('smfaq.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit')) { JToolBarHelper::editListX('smfaq.edit', 'JTOOLBAR_EDIT'); } JToolBarHelper::divider(); JToolBarHelper::custom('smfaqlist.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('smfaqlist.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::checkin('smfaqlist.checkin'); // Замена тулбара карзины на удаление if ($this->state->get('filter.published') == -2) { JToolBarHelper::deleteList('COM_SMFAQ_YOU_WANT_DELETE_THIS', 'smfaqlist.delete', 'JTOOLBAR_EMPTY_TRASH'); } else { JToolBarHelper::trash('smfaqlist.trash', 'JTOOLBAR_TRASH'); } JToolBarHelper::divider(); if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_smfaq'); } }
function display($tpl = null) { $prod =& $this->get('Data'); $isNew = $prod->id < 1; $text = $isNew ? JText::_("NEW") : JText::_("EDIT"); JToolBarHelper::title(JText::_("PRODUCT") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fst_prods'); if (FST_Helper::Is16()) { JToolBarHelper::custom('translate', 'translate', 'translate', 'Translate', false); JToolBarHelper::spacer(); } JToolBarHelper::save(); if ($isNew) { JToolBarHelper::cancel(); } else { // for existing items the button is renamed `close` JToolBarHelper::cancel('cancel', 'Close'); } FSTAdminHelper::DoSubToolbar(); $this->assignRef('prod', $prod); $path = JPATH_SITE . DS . 'images' . DS . 'fst' . DS . 'products'; if (!file_exists($path)) { mkdir($path, 0777, true); } $files = JFolder::files($path, '(.png$|.jpg$|.jpeg$|.gif$)'); $sections[] = JHTML::_('select.option', '', JText::_("NO_IMAGE"), 'id', 'title'); foreach ($files as $file) { $sections[] = JHTML::_('select.option', $file, $file, 'id', 'title'); } $lists['images'] = JHTML::_('select.genericlist', $sections, 'image', 'class="inputbox" size="1" ', 'id', 'title', $prod->image); $this->assignRef('lists', $lists); parent::display($tpl); }
function display($tpl = null) { //Load pane behavior jimport('joomla.html.pane'); //initialise variables $document =& JFactory::getDocument(); $pane =& JPane::getInstance('sliders'); $user =& JFactory::getUser(); //build toolbar JToolBarHelper::title(JText::_('IMPORT'), 'home'); JToolBarHelper::help('el.import', true); // Get data from the model $eventfields =& $this->get('EventFields'); $catfields =& $this->get('CategoryFields'); //add css and submenu to document $document->addStyleSheet('components/com_eventlist/assets/css/eventlistbackend.css'); //Create Submenu JSubMenuHelper::addEntry(JText::_('EVENTLIST'), 'index.php?option=com_eventlist', true); JSubMenuHelper::addEntry(JText::_('EVENTS'), 'index.php?option=com_eventlist&view=events'); JSubMenuHelper::addEntry(JText::_('VENUES'), 'index.php?option=com_eventlist&view=venues'); JSubMenuHelper::addEntry(JText::_('CATEGORIES'), 'index.php?option=com_eventlist&view=categories'); JSubMenuHelper::addEntry(JText::_('ARCHIVESCREEN'), 'index.php?option=com_eventlist&view=archive'); JSubMenuHelper::addEntry(JText::_('GROUPS'), 'index.php?option=com_eventlist&view=groups'); JSubMenuHelper::addEntry(JText::_('HELP'), 'index.php?option=com_eventlist&view=help'); if ($user->get('gid') > 24) { JSubMenuHelper::addEntry(JText::_('SETTINGS'), 'index.php?option=com_eventlist&controller=settings&task=edit'); } //assign vars to the template $this->assignRef('eventfields', $eventfields); $this->assignRef('catfields', $catfields); parent::display($tpl); }
public function display($tpl = null) { JToolBarHelper::title(JText::_('COM_REDSHOP_GIFTCARD_MANAGEMENT'), 'redshop_giftcard_48'); $uri = JFactory::getURI(); jimport('joomla.html.pane'); $pane = JPane::getInstance('sliders'); $this->pane = $pane; $this->setLayout('default'); $lists = array(); $detail = $this->get('data'); $isNew = $detail->giftcard_id < 1; $text = $isNew ? JText::_('COM_REDSHOP_NEW') : JText::_('COM_REDSHOP_EDIT'); JToolBarHelper::title(JText::_('COM_REDSHOP_GIFTCARDS') . ': <small><small>[ ' . $text . ' ]</small></small>', 'redshop_giftcard_48'); JToolBarHelper::apply(); JToolBarHelper::save(); if ($isNew) { JToolBarHelper::cancel(); } else { JToolBarHelper::cancel('cancel', JText::_('JTOOLBAR_CLOSE')); } $lists['customer_amount'] = JHTML::_('select.booleanlist', 'customer_amount', 'class="inputbox" ', $detail->customer_amount); $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $detail->published); if (ECONOMIC_INTEGRATION == 1) { $redhelper = new redhelper(); $accountgroup = $redhelper->getEconomicAccountGroup(); $op = array(); $op[] = JHTML::_('select.option', '0', JText::_('COM_REDSHOP_SELECT')); $accountgroup = array_merge($op, $accountgroup); $lists["accountgroup_id"] = JHTML::_('select.genericlist', $accountgroup, 'accountgroup_id', 'class="inputbox" size="1" ', 'value', 'text', $detail->accountgroup_id); } $this->lists = $lists; $this->detail = $detail; $this->request_url = $uri->toString(); parent::display($tpl); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'jms.php'; $state = $this->get('State'); $canDo = JmsHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_JMS_TITLE_COUPONS'), 'coupon.png'); //Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . DS . 'views' . DS . 'coupon'; if (file_exists($formPath)) { if ($canDo->get('core.create')) { JToolBarHelper::addNew('coupon.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('coupon.edit', 'JTOOLBAR_EDIT'); } } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::custom('coupons.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('coupons.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } if ($canDo->get('core.admin')) { JToolBarHelper::archiveList('coupons.archive', 'JTOOLBAR_ARCHIVE'); } if ($canDo->get('core.delete')) { JToolBarHelper::divider(); JToolBarHelper::deleteList('', 'coupons.delete', 'JTOOLBAR_DELETE'); } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_jms'); } }
function _setToolBar() { JToolBarHelper::title(JText::_('USER_RESOURCES_MANAGER'), 'addedit'); JToolBarHelper::save('save_resources'); JToolBarHelper::apply('apply_resources'); JToolBarHelper::cancel(); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $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'), 'menu.png'); // 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. * * @return void */ protected function addToolbar() { $canDo = TagnyilvantartasHelper::getActions(); $user = JFactory::getUser(); JToolBarHelper::title( JText::_( 'Cimkek' ), 'generic.png' ); if ($canDo->get('core.create')) { JToolBarHelper::addNew('cimkek.add'); } if (($canDo->get('core.edit'))) { JToolBarHelper::editList('cimkek.edit'); } if ($canDo->get('core.delete')) { JToolbarHelper::deleteList('COM_TAGNYILVANTARTAS_SURE_DELETE', 'cimkeks.delete', 'JACTION_DELETE'); } JToolBarHelper::preferences('com_tagnyilvantartas', '550'); if(!version_compare(JVERSION,'3','<')){ JHtmlSidebar::setAction('index.php?option=com_tagnyilvantartas&view=cimkeks'); } }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); $canDo = NewsfeedsHelper::getActions($this->state->get('filter.category_id'), $this->item->id); JToolBarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEED'), 'newsfeeds.png'); // 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', 'JTOOLBAR_APPLY'); JToolBarHelper::save('newsfeed.save', 'JTOOLBAR_SAVE'); } if (!$checkedOut && count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) { JToolBarHelper::custom('newsfeed.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::custom('newsfeed.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); } if (empty($this->item->id)) { JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CANCEL'); } else { JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('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); $canDo = TZ_PinboardHelper::getActions($this->state->get('filter.category_id'), $this->item->id); JToolBarHelper::title(JText::_('COM_CONTENT_PAGE_' . ($checkedOut ? 'VIEW_ARTICLE' : ($isNew ? 'ADD_ARTICLE' : 'EDIT_ARTICLE'))), 'article-add.png'); // Built the actions for new and existing records. // For new records, check the create permission. if ($isNew && count($user->getAuthorisedCategories('com_content', 'core.create')) > 0) { JToolBarHelper::save('article.save'); JToolBarHelper::cancel('article.cancel'); } else { // Can't save the record if it's checked out. if (!$checkedOut) { // Since it's an existing record, check the edit permission, or fall back to edit own if the owner. if ($canDo->get('core.edit') || $canDo->get('core.edit.own') && $this->item->created_by == $userId) { // 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')) { } } } // If checked out, we can still save if ($canDo->get('core.create')) { } JToolBarHelper::cancel('article.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $canDo = ContentHelper::getActions($this->state->get('filter.category_id')); $user = JFactory::getUser(); JToolBarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'), 'article.png'); if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_content', 'core.create')) > 0) { JToolBarHelper::addNew('article.add'); } if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolBarHelper::editList('article.edit'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::custom('articles.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('articles.archive'); JToolBarHelper::checkin('articles.checkin'); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('articles.trash'); JToolBarHelper::divider(); } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_content'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER'); }