/** * Setup the Toolbar. */ protected function _setToolbar() { require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'banners.php'; $state = $this->get('State'); $canDo = BannersHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('Banners_Manager_Banners'), 'generic.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('banner.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('banner.edit'); } JToolBarHelper::divider(); if ($canDo->get('core.edit.state')) { JToolBarHelper::custom('banners.publish', 'publish.png', 'publish_f2.png', 'Publish', true); JToolBarHelper::custom('banners.unpublish', 'unpublish.png', 'unpublish_f2.png', 'Unpublish', true); JToolBarHelper::divider(); if ($state->get('filter.published') != -1) { JToolBarHelper::archiveList('banners.archive'); } } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'banners.delete'); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('banners.trash'); } } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_banners'); } JToolBarHelper::divider(); JToolBarHelper::help('screen.banners.banners'); }
/** * Display the toolbar */ protected function _setToolbar() { $canDo = ContentHelper::getActions($this->state->get('filter.category_id')); JToolBarHelper::title(JText::_('Content_Featured_Title'), 'featured.png'); if ($canDo->get('core.create')) { JToolBarHelper::custom('article.add', 'new.png', 'new_f2.png', 'New', false); } if ($canDo->get('core.edit')) { JToolBarHelper::custom('article.edit', 'edit.png', 'edit_f2.png', 'Edit', true); } JToolBarHelper::divider(); if ($canDo->get('core.edit.state')) { JToolBarHelper::custom('articles.publish', 'publish.png', 'publish_f2.png', 'Publish', true); JToolBarHelper::custom('articles.unpublish', 'unpublish.png', 'unpublish_f2.png', 'Unpublish', true); JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JToolbar_Remove', true); if ($this->state->get('filter.published') != -1) { JToolBarHelper::archiveList('articles.archive'); } } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_content'); } JToolBarHelper::divider(); JToolBarHelper::help('screen.content.featured'); }
/** * Display the toolbar */ protected function _setToolbar() { $state = $this->get('State'); $canDo = ContentHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('Content_Articles_Title'), 'article.png'); if ($canDo->get('core.create')) { JToolBarHelper::custom('article.add', 'new.png', 'new_f2.png', 'New', false); } if ($canDo->get('core.edit')) { JToolBarHelper::custom('article.edit', 'edit.png', 'edit_f2.png', 'Edit', true); } JToolBarHelper::divider(); if ($canDo->get('core.edit.state')) { JToolBarHelper::custom('articles.publish', 'publish.png', 'publish_f2.png', 'Publish', true); JToolBarHelper::custom('articles.unpublish', 'unpublish.png', 'unpublish_f2.png', 'Unpublish', true); if ($state->get('filter.published') != -1) { JToolBarHelper::divider(); JToolBarHelper::archiveList('articles.archive'); } } if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'articles.delete'); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('articles.trash'); } } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_content'); } JToolBarHelper::divider(); JToolBarHelper::help('screen.content.articles'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $canDo = weddingHelper::getActions($this->state->get('filter.category_id')); $user = JFactory::getUser(); JToolBarHelper::title(JText::_('Users'), 'user.png'); if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_wedding', 'core.create')) > 0) { JToolBarHelper::addNew('user.add'); } if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolBarHelper::editList('user.edit'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::publish('users.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('users.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('users.archive'); JToolBarHelper::checkin('users.checkin'); } if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'users.delete', 'JTOOLBAR_EMPTY_TRASH'); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('users.trash'); } } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_wedding'); } }
/** * 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'); } }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/localize_empresa.php'; $state = $this->get('State'); $canDo = Localize_empresaHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_LOCALIZE_EMPRESA_TITLE_CADASTRODEEMPRESAS'), 'cadastrodeempresas.png'); //Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/cadastrodeempresa'; if (file_exists($formPath)) { if ($canDo->get('core.create')) { JToolBarHelper::addNew('cadastrodeempresa.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit') && isset($this->items[0])) { JToolBarHelper::editList('cadastrodeempresa.edit', 'JTOOLBAR_EDIT'); } } if ($canDo->get('core.edit.state')) { if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::custom('cadastrodeempresas.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('cadastrodeempresas.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } else { if (isset($this->items[0])) { //If this component does not use state then show a direct delete button as we can not trash JToolBarHelper::deleteList('', 'cadastrodeempresas.delete', 'JTOOLBAR_DELETE'); } } if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::archiveList('cadastrodeempresas.archive', 'JTOOLBAR_ARCHIVE'); } if (isset($this->items[0]->checked_out)) { JToolBarHelper::custom('cadastrodeempresas.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } } //Show trash and delete for components that uses the state field if (isset($this->items[0]->state)) { if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'cadastrodeempresas.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('cadastrodeempresas.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_localize_empresa'); } //Set sidebar action - New in 3.0 JHtmlSidebar::setAction('index.php?option=com_localize_empresa&view=cadastrodeempresas'); $this->extra_sidebar = ''; JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), "value", "text", $this->state->get('filter.state'), true)); //Filter for the field corretores $this->extra_sidebar .= '<div class="other-filters">'; $this->extra_sidebar .= '<small><label for="filter_corretores">Corretores</label></small>'; $this->extra_sidebar .= JHtmlList::users('filter_corretores', $this->state->get('filter.corretores'), 1, 'onchange="this.form.submit();"'); $this->extra_sidebar .= '</div>'; }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/banners.php'; $canDo = BannersHelper::getActions(); JToolBarHelper::title(JText::_('COM_BANNERS_MANAGER_CLIENTS'), 'banners-clients.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('client.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('client.edit', 'JTOOLBAR_EDIT'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::custom('clients.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('clients.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('clients.archive', 'JTOOLBAR_ARCHIVE'); JToolBarHelper::custom('clients.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('clients.trash', 'JTOOLBAR_TRASH'); } if ($canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'clients.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_banners'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS'); }
/** * Display the toolbar */ protected function _setToolbar() { $state = $this->get('State'); $extension = $state->get('filter.extension'); // Need to load the menu language file as mod_menu hasn't been loaded yet. $lang =& JFactory::getLanguage(); $lang->load($extension . '.menu', JPATH_ADMINISTRATOR . '/components/' . $extension); $lang->load($extension . '.menu'); JToolBarHelper::title(JText::sprintf('Categories_Categories_Title', $this->escape(JText::_($extension))), 'categories.png'); JToolBarHelper::custom('category.edit', 'new.png', 'new_f2.png', 'New', false); JToolBarHelper::custom('category.edit', 'edit.png', 'edit_f2.png', 'Edit', true); JToolBarHelper::divider(); JToolBarHelper::custom('categories.publish', 'publish.png', 'publish_f2.png', 'Publish', true); JToolBarHelper::custom('categories.unpublish', 'unpublish.png', 'unpublish_f2.png', 'Unpublish', true); if ($state->get('filter.published') != -1) { JToolBarHelper::divider(); JToolBarHelper::archiveList('categories.archive'); } if ($state->get('filter.published') == -2) { JToolBarHelper::deleteList('', 'categories.delete'); } else { JToolBarHelper::trash('categories.trash'); } JToolBarHelper::divider(); JToolBarHelper::custom('categories.rebuild', 'refresh.png', 'refresh_f2.png', 'JToolbar_Rebuild', false); JToolBarHelper::divider(); JToolBarHelper::help('screen.categories'); }
/** * Adds the page title and toolbar. * */ protected function addToolbar() { $user = JFactory::getUser(); $asset = 'com_pfdesigns'; JToolBarHelper::title(JText::_('COM_PROJECTFORK_DESIGNS_ALBUMS_TITLE'), 'article.png'); if ($user->authorise('core.create', $asset)) { JToolBarHelper::addNew('album.add'); } if ($user->authorise('core.edit', $asset) || $user->authorise('core.edit.own', $asset)) { JToolBarHelper::editList('album.edit'); } if ($user->authorise('core.edit.state', $asset)) { JToolBarHelper::divider(); JToolBarHelper::publish('albums.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('albums.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('albums.archive'); JToolBarHelper::checkin('albums.checkin'); } if ($this->state->get('filter.published') == -2 && $user->authorise('core.delete', $asset)) { JToolBarHelper::deleteList('', 'albums.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($user->authorise('core.edit.state', $asset)) { JToolBarHelper::trash('albums.trash'); JToolBarHelper::divider(); } if (version_compare(JVERSION, '3', 'ge')) { JHtmlSidebar::setAction('index.php?option=com_pfdesigns&view=albums'); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_AUTHOR'), 'filter_author_id', JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id'))); } }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/contact.php'; $canDo = ContactHelper::getActions($this->state->get('filter.category_id')); $user = JFactory::getUser(); JToolBarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACTS'), 'contact.png'); if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0) { JToolBarHelper::addNew('contact.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolBarHelper::editList('contact.edit', 'JTOOLBAR_EDIT'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::custom('contacts.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('contacts.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('contacts.archive', 'JTOOLBAR_ARCHIVE'); JToolBarHelper::custom('contacts.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'contacts.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('contacts.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_contact'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS'); }
/** * Устанавливает панель инструментов. * * @return void */ protected function addToolBar() { JToolBarHelper::title(JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLDS'), 'helloworld'); if ($this->canDo->get('core.create')) { JToolBarHelper::addNew('helloworld.add'); } if ($this->canDo->get('core.edit')) { JToolBarHelper::editList('helloworld.edit'); } if ($this->canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolbarHelper::publish('helloworlds.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('helloworlds.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('helloworlds.archive'); } if ($this->state->get('filter.state') == -2 && $this->canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'helloworlds.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($this->canDo->get('core.edit.state')) { JToolBarHelper::trash('helloworlds.trash'); } if ($this->canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_helloworld'); } }
protected function addToolbar() { $title = JText::_('COM_DJCATALOG2_ITEMS'); if ($this->state->get('filter.parent') > 0) { $title .= ' - ' . JText::_('COM_DJCATALOG2_PARENT_ITEM') . ': ' . $this->state->get('filter.parent'); $title .= ' <a class="btn button" href="' . JRoute::_('index.php?option=com_djcatalog2&view=items&filter_parent=0') . '">' . JText::_('JCLEAR') . '</a>'; } JToolBarHelper::title($title, 'generic.png'); JToolBarHelper::addNew('item.add', 'JTOOLBAR_NEW'); JToolBarHelper::editList('item.edit', 'JTOOLBAR_EDIT'); //JToolBarHelper::custom('items.recreateThumbnails','move','move',JText::_('COM_DJCATALOG2_RECREATE_THUMBNAILS'),true,true); JToolBarHelper::divider(); 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::archiveList('items.archive'); if ($this->state->get('filter.published') == -2) { JToolBarHelper::deleteList('', 'items.delete', 'JTOOLBAR_DELETE'); } else { JToolbarHelper::trash('items.trash'); } JToolBarHelper::divider(); JToolBarHelper::custom('items.available', 'publish.png', 'publish_f2.png', 'COM_DJCATALOG2_MAKE_AVAILABLE', true); JToolBarHelper::custom('items.inavailable', 'unpublish.png', 'unpublish_f2.png', 'COM_DJCATALOG2_MAKE_INAVAILABLE', true); JToolBarHelper::divider(); $export_icon = version_compare(JVERSION, '3.0.0', '<') ? 'export' : 'arrow-down'; //JToolBarHelper::custom('items.geocode', $export_icon, $export_icon, 'COM_DJCATALOG2_GEOCODE', true); JToolBarHelper::custom('items.export_filtered', $export_icon, $export_icon, 'COM_DJCATALOG2_EXPORT_FILTERED', false); JToolBarHelper::custom('items.export_selected', $export_icon, $export_icon, 'COM_DJCATALOG2_EXPORT_SELECTED', true); JToolBarHelper::custom('items.batch_approval', 'publish.png', 'publish_f2.png', 'Batch Approval', false); JToolBarHelper::divider(); JToolBarHelper::preferences('com_djcatalog2', '450', '900'); JToolBarHelper::divider(); }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/wedding.php'; $canDo = WeddingHelper::getActions($this->state->get('filter.category_id')); $user = JFactory::getUser(); JToolBarHelper::title(JText::_('COM_WEDDING_MANAGER_STORIES'), 'stories.png'); if ($canDo->get('core.edit.state')) { if ($this->state->get('filter.state') != 2) { // JToolBarHelper::divider(); JToolBarHelper::publish('stories.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('stories.unpublish', 'JTOOLBAR_UNPUBLISH', true); } if ($this->state->get('filter.state') != -1) { JToolBarHelper::divider(); if ($this->state->get('filter.state') != 2) { JToolBarHelper::archiveList('stories.archive'); } elseif ($this->state->get('filter.state') == 2) { JToolBarHelper::unarchiveList('stories.publish'); } } } if ($canDo->get('core.edit.state')) { JToolBarHelper::checkin('stories.checkin'); } if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'stories.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('stories.trash'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_wedding'); } }
/** * Setting the toolbar * * @since 2.0.0 */ protected function addToolbar() { // Load specific css component JHtml::_('stylesheet', 'com_externallogin/administrator/externallogin.css', array(), true); // Set the toolbar JToolBarHelper::title(JText::_('COM_EXTERNALLOGIN_MANAGER_SERVERS'), 'database'); $bar = JToolBar::getInstance('toolbar'); $bar->appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_externallogin&view=plugins&tmpl=component', 875, 550, 0, 0, ''); JToolBarHelper::editList('server.edit'); JToolBarHelper::publishList('servers.publish'); JToolBarHelper::unpublishList('servers.unpublish'); JToolBarHelper::checkin('servers.checkin'); if ($this->state->get('filter.published') == -2) { JToolBarHelper::deleteList('COM_EXTERNALLOGIN_MSG_SERVERS_DELETE', 'servers.delete'); } else { JToolBarHelper::archiveList('servers.archive'); JToolBarHelper::trash('servers.trash'); } JToolBarHelper::preferences('com_externallogin'); JHtml::_('sidebar.addentry', JText::_('COM_EXTERNALLOGIN_SUBMENU_SERVERS'), 'index.php?option=com_externallogin', true); JHtml::_('sidebar.addentry', JText::_('COM_EXTERNALLOGIN_SUBMENU_USERS'), 'index.php?option=com_externallogin&view=users', false); JHtml::_('sidebar.addentry', JText::_('COM_EXTERNALLOGIN_SUBMENU_LOGS'), 'index.php?option=com_externallogin&view=logs', false); JHtml::_('sidebar.addentry', JText::_('COM_EXTERNALLOGIN_SUBMENU_ABOUT'), 'index.php?option=com_externallogin&view=about', false); JHtml::_('sidebar.setaction', 'index.php?option=com_externallogin&view=servers'); JHtml::_('sidebar.addFilter', JText::_('COM_EXTERNALLOGIN_OPTION_SELECT_PLUGIN'), 'filter_plugin', JHtml::_('select.options', ExternalloginHelper::getPlugins(), 'value', 'text', $this->state->get('filter.plugin'), true)); JHtml::_('sidebar.addFilter', JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/banners.php'; $canDo = BannersHelper::getActions(); JToolBarHelper::title(JText::_('COM_BANNERS_MANAGER_CLIENTS'), 'banners-clients.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('client.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('client.edit'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::publish('clients.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('clients.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('clients.archive'); JToolBarHelper::checkin('clients.checkin'); } if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'clients.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('clients.trash'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_banners'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS'); }
/** * Setup the Toolbar. */ protected function _setToolbar() { $state = $this->get('State'); $canDo = NewsfeedsHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('Newsfeeds_Manager_Newsfeeds'), 'newsfeeds.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('newsfeed.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('newsfeed.edit'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::custom('newsfeeds.publish', 'publish.png', 'publish_f2.png', 'JToolbar_Publish', true); JToolBarHelper::custom('newsfeeds.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JToolbar_Unpublish', true); JToolBarHelper::divider(); if ($state->get('filter.published') != -1) { JToolBarHelper::archiveList('newsfeeds.archive'); } } if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'newsfeeds.delete'); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('newsfeeds.trash'); } } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_newsfeeds'); } JToolBarHelper::divider(); JToolBarHelper::help('screen.newsfeed'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/faqs.php'; $state = $this->get('State'); $canDo = FaqsHelper::getActions($state->get('filter.category_id')); $user = JFactory::getUser(); JToolBarHelper::title(JText::_('COM_FAQS_MANAGER_FAQS'), 'faqs.png'); if (count($user->getAuthorisedCategories('com_faqs', 'core.create')) > 0) { JToolBarHelper::addNew('faq.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('faq.edit'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::publish('faqs.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('faqs.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('faqs.archive'); JToolBarHelper::checkin('faqs.checkin'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'faqs.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('faqs.trash'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_faqs'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_COMPONENTS_FAQS_LINKS'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = ContentHelper::getActions($this->state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_CONTENT_FEATURED_TITLE'), 'featured.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('article.add'); } if ($canDo->get('core.edit')) { 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::divider(); JToolBarHelper::archiveList('articles.archive'); JToolBarHelper::checkin('articles.checkin'); JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true); } if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::trash('articles.trash'); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_content'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/weblinks.php'; $state = $this->get('State'); $canDo = WeblinksHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_WEBLINKS_MANAGER_WEBLINKS'), 'weblinks.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('weblink.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('weblink.edit', 'JTOOLBAR_EDIT'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::custom('weblinks.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('weblinks.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('weblinks.archive', 'JTOOLBAR_ARCHIVE'); JToolBarHelper::custom('weblinks.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'weblinks.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('weblinks.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_weblinks'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_COMPONENTS_WEBLINKS_LINKS'); }
/** * Add Toolbar */ protected function addToolbar() { JToolBarHelper::title(JText::_('COM_JEM_EVENTS'), 'events'); /* retrieving the allowed actions for the user */ $canDo = JEMHelperBackend::getActions(0); /* create */ if ($canDo->get('core.create')) { JToolBarHelper::addNew('event.add'); } /* edit */ if ($canDo->get('core.edit')) { JToolBarHelper::editList('event.edit'); JToolBarHelper::divider(); } /* state */ if ($canDo->get('core.edit.state')) { JToolBarHelper::publishList('events.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublishList('events.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::custom('events.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true); JToolBarHelper::archiveList('events.archive'); JToolBarHelper::checkin('events.checkin'); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('COM_JEM_CONFIRM_DELETE', 'events.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('events.trash'); } JToolBarHelper::divider(); JToolBarHelper::help('listevents', true); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/available_assets.php'; $state = $this->get('State'); $canDo = Available_assetsHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_AVAILABLE_ASSETS_TITLE_UPDATES'), 'updates.png'); //Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/update'; if (file_exists($formPath)) { if ($canDo->get('core.create')) { JToolBarHelper::addNew('update.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit') && isset($this->items[0])) { JToolBarHelper::editList('update.edit', 'JTOOLBAR_EDIT'); } } if ($canDo->get('core.edit.state')) { if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::custom('updates.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('updates.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } else { if (isset($this->items[0])) { //If this component does not use state then show a direct delete button as we can not trash JToolBarHelper::deleteList('', 'updates.delete', 'JTOOLBAR_DELETE'); } } if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::archiveList('updates.archive', 'JTOOLBAR_ARCHIVE'); } if (isset($this->items[0]->checked_out)) { JToolBarHelper::custom('updates.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } } //Show trash and delete for components that uses the state field if (isset($this->items[0]->state)) { if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'updates.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('updates.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_available_assets'); } //Set sidebar action - New in 3.0 JHtmlSidebar::setAction('index.php?option=com_available_assets&view=updates'); $this->extra_sidebar = ''; // JToolBarHelper::custom('additions.import', 's_additions.png', 's_additions.png', 'Import Excel File', false); JToolBarHelper::cancel('additions.cancel'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/dzproduct.php'; $state = $this->get('State'); $canDo = DzproductHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_DZPRODUCT_TITLE_ITEMS'), 'items.png'); //Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/item'; if (file_exists($formPath)) { if ($canDo->get('core.create')) { JToolBarHelper::addNew('item.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit') && isset($this->items[0])) { JToolBarHelper::editList('item.edit', 'JTOOLBAR_EDIT'); } } if ($canDo->get('core.edit.state')) { if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::custom('items.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('items.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } else { if (isset($this->items[0])) { //If this component does not use state then show a direct delete button as we can not trash JToolBarHelper::deleteList('', 'items.delete', 'JTOOLBAR_DELETE'); } } if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::archiveList('items.archive', 'JTOOLBAR_ARCHIVE'); } if (isset($this->items[0]->checked_out)) { JToolBarHelper::custom('items.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } } //Show trash and delete for components that uses the state field if (isset($this->items[0]->state)) { if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'items.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('items.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_dzproduct'); } //Set sidebar action - New in 3.0 JHtmlSidebar::setAction('index.php?option=com_dzproduct&view=items'); $this->extra_sidebar = ''; JHtmlSidebar::addFilter(JText::_("JOPTION_SELECT_CATEGORY"), 'filter_catid', JHtml::_('select.options', JHtml::_('category.options', 'com_dzproduct.items.catid'), "value", "text", $this->state->get('filter.catid'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), "value", "text", $this->state->get('filter.state'), true)); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/quick2cart.php'; $state = $this->get('State'); $canDo = Quick2CartHelper::getActions(); if (JVERSION >= '3.0') { JToolBarHelper::title(JText::_('COM_QUICK2CART_TITLE_WEIGHTS'), 'list'); } else { JToolBarHelper::title(JText::_('COM_QUICK2CART_TITLE_WEIGHTS'), 'weights.png'); } //Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/weight'; if (file_exists($formPath)) { if ($canDo->get('core.create')) { JToolBarHelper::addNew('weight.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit') && isset($this->items[0])) { JToolBarHelper::editList('weight.edit', 'JTOOLBAR_EDIT'); } } if ($canDo->get('core.edit.state')) { if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::custom('weights.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('weights.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } elseif (isset($this->items[0])) { //If this component does not use state then show a direct delete button as we can not trash JToolBarHelper::deleteList('', 'weights.delete', 'JTOOLBAR_DELETE'); } if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::archiveList('weights.archive', 'JTOOLBAR_ARCHIVE'); } if (isset($this->items[0]->checked_out)) { JToolBarHelper::custom('weights.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } } // Show trash and delete for components that uses the state field if (isset($this->items[0]->state)) { if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'weights.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('weights.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_quick2cart'); } //Set sidebar action - New in 3.0 if (version_compare(JVERSION, '3.0', 'ge')) { JHtmlSidebar::setAction('index.php?option=com_quick2cart&view=weights'); $this->extra_sidebar = ''; } }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/somosmaestros.php'; $state = $this->get('State'); $canDo = SomosmaestrosHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_SOMOSMAESTROS_TITLE_LISTARFORMACION'), 'listarformacion.png'); //Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/listar_formacion'; if (file_exists($formPath)) { if ($canDo->get('core.create')) { JToolBarHelper::addNew('listar_formacion.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit') && isset($this->items[0])) { JToolBarHelper::editList('listar_formacion.edit', 'JTOOLBAR_EDIT'); } } if ($canDo->get('core.edit.state')) { if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::custom('listarformacion.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('listarformacion.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } else { if (isset($this->items[0])) { //If this component does not use state then show a direct delete button as we can not trash JToolBarHelper::deleteList('', 'listarformacion.delete', 'JTOOLBAR_DELETE'); } } if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::archiveList('listarformacion.archive', 'JTOOLBAR_ARCHIVE'); } if (isset($this->items[0]->checked_out)) { JToolBarHelper::custom('listarformacion.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } } //Show trash and delete for components that uses the state field if (isset($this->items[0]->state)) { if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'listarformacion.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('listarformacion.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_somosmaestros'); } //Set sidebar action - New in 3.0 JHtmlSidebar::setAction('index.php?option=com_somosmaestros&view=listarformacion'); $this->extra_sidebar = ''; // }
/** * Renders the Joomla toolbar for all summary pages */ function _Summary() { $code = JRequest::getVar('scope'); $text = TOOLBAR_ccevents::getTitle($code); JToolBarHelper::title($text . ' Summary', 'addedit.png'); JToolBarHelper::customX('viewArchive', 'archive.png', 'archive_f2.png', 'View Archive', false); JToolBarHelper::archiveList(); JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); JToolBarHelper::deleteList('', 'delete'); JToolBarHelper::addNew('setup'); JToolBarHelper::help('ccevents.help.html'); }
protected function addToolBar() { $state = $this->get('State'); $canDo = EasyquickiconsHelper::getActions(); $layout = JRequest::getCmd('layout', 'default'); if ($layout != 'welcome') { JToolBarHelper::title(JText::_('COM_EASYQUICKICONS_TOOLBAR'), 'easyquickicons'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('easyquickicon.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('easyquickicon.edit'); } if ($canDo->get('core.edit.state')) { if ($state->get('filter.state') != 2) { JToolBarHelper::divider(); JToolBarHelper::publish('easyquickicons.publish', 'JTOOLBAR_ENABLE', true); JToolBarHelper::unpublish('easyquickicons.unpublish', 'JTOOLBAR_DISABLE', true); } if ($state->get('filter.state') != -1) { JToolBarHelper::divider(); if ($state->get('filter.state') != 2) { JToolBarHelper::archiveList('easyquickicons.archive'); } elseif ($state->get('filter.state') == 2) { JToolBarHelper::unarchiveList('easyquickicons.publish', 'JTOOLBAR_UNARCHIVE'); } } } if ($canDo->get('core.admin')) { JToolbarHelper::checkin('easyquickicons.checkin'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'easyquickicons.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('easyquickicons.trash'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_easyquickicons'); JToolBarHelper::divider(); } $bar = JToolBar::getInstance('toolbar'); $bar->appendButton('Help', 'help', 'JTOOLBAR_HELP', 'http://awynesoft.com/documentation.html', 640, 480); JHtmlSidebar::setAction('index.php?option=com_easyquickicons&view=easyquickicons'); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', EasyquickiconsHelper::publishedOptions(), 'value', 'text', $this->state->get('filter.state'), true)); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_easyquickicons'), 'value', 'text', $this->state->get('filter.category_id'))); } else { JToolBarHelper::back('COM_EASYQUICKICONS', 'index.php?option=' . JRequest::getCmd('option')); } }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/addressbook.php'; $state = $this->get('State'); $canDo = AddressbookHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_ADDRESSBOOK_TITLE_ADDRESSES'), 'addresses.png'); //Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/address'; if (file_exists($formPath)) { if ($canDo->get('core.create')) { JToolBarHelper::addNew('address.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit') && isset($this->items[0])) { JToolBarHelper::editList('address.edit', 'JTOOLBAR_EDIT'); } } if ($canDo->get('core.edit.state')) { if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::custom('addresses.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('addresses.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } else { if (isset($this->items[0])) { //If this component does not use state then show a direct delete button as we can not trash JToolBarHelper::deleteList('', 'addresses.delete', 'JTOOLBAR_DELETE'); } } if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::archiveList('addresses.archive', 'JTOOLBAR_ARCHIVE'); } if (isset($this->items[0]->checked_out)) { JToolBarHelper::custom('addresses.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } } //Show trash and delete for components that uses the state field if (isset($this->items[0]->state)) { if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'addresses.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('addresses.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_addressbook'); } }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); $db =& JFactory::getDBO(); $uri =& JFactory::getURI(); $document =& JFactory::getDocument(); $option = JRequest::getCmd('option'); $optiontext = strtoupper(JRequest::getCmd('option') . '_'); $this->assignRef('optiontext', $optiontext); // Set toolbar items for the page JToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_ROSTERPOSITIONS_TITLE'), 'generic.png'); /* JToolBarHelper::addNewX(); JToolBarHelper::editListX(); JToolBarHelper::custom('import','upload','upload',JText::_('COM_JOOMLEAGUE_GLOBAL_CSV_IMPORT'),false); JToolBarHelper::archiveList('export',JText::_('COM_JOOMLEAGUE_GLOBAL_XML_EXPORT')); JToolBarHelper::deleteList(); JToolBarHelper::divider(); */ // JLToolBarHelper::addNew('rosterposition.add'); JToolBarHelper::custom('rosterposition.addhome', 'new', 'new', JText::_('COM_JOOMLEAGUE_ADMIN_ROSTERPOSITIONS_HOME'), false); JToolBarHelper::custom('rosterposition.addaway', 'new', 'new', JText::_('COM_JOOMLEAGUE_ADMIN_ROSTERPOSITIONS_AWAY'), false); JLToolBarHelper::editList('rosterposition.edit'); JToolBarHelper::custom('rosterposition.import', 'upload', 'upload', JText::_('COM_JOOMLEAGUE_GLOBAL_CSV_IMPORT'), false); JToolBarHelper::archiveList('rosterposition.export', JText::_('COM_JOOMLEAGUE_GLOBAL_XML_EXPORT')); //JToolBarHelper::deleteList(); JLToolBarHelper::deleteList('', 'rosterposition.remove'); JToolBarHelper::divider(); JLToolBarHelper::onlinehelp(); JToolBarHelper::preferences(JRequest::getCmd('option')); $db =& JFactory::getDBO(); $uri =& JFactory::getURI(); $filter_order = $mainframe->getUserStateFromRequest($option . 'l_filter_order', 'filter_order', 'obj.ordering', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'l_filter_order_Dir', 'filter_order_Dir', '', 'word'); $search = $mainframe->getUserStateFromRequest($option . 'l_search', 'search', '', 'string'); $search = JString::strtolower($search); $items =& $this->get('Data'); $total =& $this->get('Total'); $pagination =& $this->get('Pagination'); // table ordering $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; // search filter $lists['search'] = $search; $this->assignRef('user', JFactory::getUser()); $this->assignRef('lists', $lists); $this->assignRef('items', $items); $this->assignRef('pagination', $pagination); $this->assignRef('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 . 'jomsocialgroupsync.php'; $state = $this->get('State'); $canDo = JomSocialGroupSyncHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_JOMSOCIALGROUPSYNC_TITLE_SYNCHRONIZATIONRULES'), 'generic.png'); //Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . DS . 'views' . DS . 'synchronizationrule'; if (file_exists($formPath)) { if ($canDo->get('core.create')) { JToolBarHelper::addNew('synchronizationrule.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('synchronizationrule.edit', 'JTOOLBAR_EDIT'); } } if ($canDo->get('core.edit.state')) { if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::custom('synchronizationrules.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('synchronizationrules.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } else { //If this component does not use state then show a direct delete button as we can not trash JToolBarHelper::deleteList('', 'synchronizationrules.delete', 'JTOOLBAR_DELETE'); } if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::archiveList('synchronizationrules.archive', 'JTOOLBAR_ARCHIVE'); } if (isset($this->items[0]->checked_out)) { JToolBarHelper::custom('synchronizationrules.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } } //Show trash and delete for components that uses the state field if (isset($this->items[0]->state)) { if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'synchronizationrules.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('synchronizationrules.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_jomsocialgroupsync'); } }
/** * 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'); }