/** * 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')); Toolbar::title(Lang::txt('COM_CONTENT_FEATURED_TITLE'), 'featured.png'); if ($canDo->get('core.create')) { Toolbar::addNew('article.add'); } if ($canDo->get('core.edit')) { Toolbar::editList('article.edit'); } if ($canDo->get('core.edit.state')) { Toolbar::divider(); Toolbar::publish('articles.publish', 'JTOOLBAR_PUBLISH', true); Toolbar::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true); Toolbar::divider(); Toolbar::archiveList('articles.archive'); Toolbar::checkin('articles.checkin'); Toolbar::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true); } if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) { Toolbar::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH'); Toolbar::divider(); } elseif ($canDo->get('core.edit.state')) { Toolbar::divider(); Toolbar::trash('articles.trash'); } if ($canDo->get('core.admin')) { Toolbar::preferences('com_content'); Toolbar::divider(); } Toolbar::help('featured'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = NewsfeedsHelper::getActions($state->get('filter.category_id')); Toolbar::title(Lang::txt('COM_NEWSFEEDS_MANAGER_NEWSFEEDS'), 'newsfeeds.png'); if (count(User::getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) { Toolbar::addNew('newsfeed.add'); } if ($canDo->get('core.edit')) { Toolbar::editList('newsfeed.edit'); } if ($canDo->get('core.edit.state')) { Toolbar::divider(); Toolbar::publish('newsfeeds.publish', 'JTOOLBAR_PUBLISH', true); Toolbar::unpublish('newsfeeds.unpublish', 'JTOOLBAR_UNPUBLISH', true); Toolbar::divider(); Toolbar::archiveList('newsfeeds.archive'); } if ($canDo->get('core.admin')) { Toolbar::checkin('newsfeeds.checkin'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { Toolbar::deleteList('', 'newsfeeds.delete', 'JTOOLBAR_EMPTY_TRASH'); Toolbar::divider(); } elseif ($canDo->get('core.edit.state')) { Toolbar::trash('newsfeeds.trash'); Toolbar::divider(); } if ($canDo->get('core.admin')) { Toolbar::preferences('com_newsfeeds'); Toolbar::divider(); } Toolbar::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = ModulesHelper::getActions(); Toolbar::title(Lang::txt('COM_MODULES_MANAGER_MODULES'), 'module.png'); if ($canDo->get('core.create')) { //Toolbar::addNew('module.add'); Toolbar::appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_modules&view=select&tmpl=component', 850, 400); } if ($canDo->get('core.edit')) { Toolbar::editList('module.edit'); } if ($canDo->get('core.create')) { Toolbar::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true); } if ($canDo->get('core.edit.state')) { Toolbar::divider(); Toolbar::publish('modules.publish', 'JTOOLBAR_PUBLISH', true); Toolbar::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true); Toolbar::divider(); Toolbar::checkin('modules.checkin'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { Toolbar::deleteList('', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH'); Toolbar::divider(); } elseif ($canDo->get('core.edit.state')) { Toolbar::trash('modules.trash'); Toolbar::divider(); } if ($canDo->get('core.admin')) { Toolbar::preferences('com_modules'); Toolbar::divider(); } Toolbar::help('modules'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $canDo = ContentHelper::getActions($this->state->get('filter.category_id')); Toolbar::title(Lang::txt('COM_CONTENT_ARTICLES_TITLE'), 'article.png'); if ($canDo->get('core.create') || count(User::getAuthorisedCategories('com_content', 'core.create')) > 0) { Toolbar::addNew('article.add'); } if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { Toolbar::editList('article.edit'); } if ($canDo->get('core.edit.state')) { Toolbar::divider(); Toolbar::publish('articles.publish', 'JTOOLBAR_PUBLISH', true); Toolbar::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true); //Toolbar::custom('articles.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true); Toolbar::divider(); Toolbar::archiveList('articles.archive'); Toolbar::checkin('articles.checkin'); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { Toolbar::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH'); Toolbar::divider(); } elseif ($canDo->get('core.edit.state')) { Toolbar::trash('articles.trash'); Toolbar::divider(); } if ($canDo->get('core.admin')) { Toolbar::preferences('com_content'); Toolbar::divider(); } Toolbar::help('articles'); }
$canDo = Components\Members\Helpers\Admin::getActions('component'); // Menu Toolbar::title(Lang::txt('COM_MEMBERS') . ': ' . Lang::txt('COM_MEMBERS_NOTES'), 'user'); if ($canDo->get('core.create')) { Toolbar::addNew('note.add'); } if ($canDo->get('core.edit')) { Toolbar::editList('note.edit'); } if ($canDo->get('core.edit.state')) { Toolbar::divider(); Toolbar::publish('notes.publish', 'JTOOLBAR_PUBLISH', true); Toolbar::unpublish('notes.unpublish', 'JTOOLBAR_UNPUBLISH', true); Toolbar::divider(); Toolbar::archiveList('notes.archive'); Toolbar::checkin('notes.checkin'); } if ($this->filters['state'] == -2 && $canDo->get('core.delete')) { Toolbar::deleteList('', 'notes.delete', 'JTOOLBAR_EMPTY_TRASH'); Toolbar::divider(); } elseif ($canDo->get('core.edit.state')) { Toolbar::trash('notes.trash'); Toolbar::divider(); } if ($canDo->get('core.admin')) { Toolbar::preferences('com_members'); Toolbar::divider(); } Toolbar::help('notes'); ?> <nav role="navigation" class="sub sub-navigation">
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/menus.php'; $canDo = MenusHelper::getActions($this->state->get('filter.parent_id')); Toolbar::title(Lang::txt('COM_MENUS_VIEW_ITEMS_TITLE'), 'menumgr.png'); if ($canDo->get('core.create')) { Toolbar::addNew('item.add'); } if ($canDo->get('core.edit')) { Toolbar::editList('item.edit'); } if ($canDo->get('core.edit.state')) { Toolbar::divider(); Toolbar::publish('items.publish', 'JTOOLBAR_PUBLISH', true); Toolbar::unpublish('items.unpublish', 'JTOOLBAR_UNPUBLISH', true); } if (User::authorise('core.admin')) { Toolbar::divider(); Toolbar::checkin('items.checkin', 'JTOOLBAR_CHECKIN', true); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { Toolbar::deleteList('', 'items.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { Toolbar::trash('items.trash'); } if ($canDo->get('core.edit.state')) { Toolbar::makeDefault('items.setDefault', 'COM_MENUS_TOOLBAR_SET_HOME'); Toolbar::divider(); } if (User::authorise('core.admin')) { Toolbar::custom('items.rebuild', 'refresh.png', 'refresh_f2.png', 'JToolbar_Rebuild', false); Toolbar::divider(); } Toolbar::help('items'); }
// Include the component HTML helpers. Html::addIncludePath(JPATH_COMPONENT . '/helpers/html'); Html::behavior('tooltip'); Html::behavior('multiselect'); $state = $this->get('State'); $canDo = \Components\Plugins\Admin\Helpers\Plugins::getActions(); Toolbar::title(Lang::txt('COM_PLUGINS_MANAGER_PLUGINS'), 'plugin'); if ($canDo->get('core.edit')) { Toolbar::editList('edit'); } if ($canDo->get('core.edit.state')) { Toolbar::divider(); Toolbar::publish('publish', 'JTOOLBAR_ENABLE', true); Toolbar::unpublish('unpublish', 'JTOOLBAR_DISABLE', true); Toolbar::divider(); Toolbar::checkin('checkin'); } if ($canDo->get('core.admin')) { Toolbar::divider(); Toolbar::preferences('com_plugins'); } Toolbar::divider(); Toolbar::help('plugins'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $canOrder = User::authorise('core.edit.state', 'com_plugins'); $saveOrder = $listOrder == 'ordering'; ?> <form action="<?php echo Route::url('index.php?option=com_plugins'); ?>
/** * Display the toolbar. * * @return void * * @since 2.5 */ protected function addToolbar() { $canDo = UsersHelper::getActions(); Toolbar::title(Lang::txt('COM_USERS_VIEW_NOTES_TITLE'), 'user'); if ($canDo->get('core.create')) { Toolbar::addNew('note.add'); } if ($canDo->get('core.edit')) { Toolbar::editList('note.edit'); } if ($canDo->get('core.edit.state')) { Toolbar::divider(); Toolbar::publish('notes.publish', 'JTOOLBAR_PUBLISH', true); Toolbar::unpublish('notes.unpublish', 'JTOOLBAR_UNPUBLISH', true); Toolbar::divider(); Toolbar::archiveList('notes.archive'); Toolbar::checkin('notes.checkin'); } if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) { Toolbar::deleteList('', 'notes.delete', 'JTOOLBAR_EMPTY_TRASH'); Toolbar::divider(); } elseif ($canDo->get('core.edit.state')) { Toolbar::trash('notes.trash'); Toolbar::divider(); } if ($canDo->get('core.admin')) { Toolbar::preferences('com_users'); Toolbar::divider(); } Toolbar::help('notes'); }