本文整理汇总了PHP中JToolBarHelper::archiveList方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolBarHelper::archiveList方法的具体用法?PHP JToolBarHelper::archiveList怎么用?PHP JToolBarHelper::archiveList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolBarHelper
的用法示例。
在下文中一共展示了JToolBarHelper::archiveList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _setToolbar
/**
* 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');
}
示例2: _setToolbar
/**
* 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');
}
示例3: addToolbar
/**
* 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');
}
}
示例4: addToolbar
/**
* 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');
}
}
示例5: addToolbar
/**
* 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>';
}
示例6: addToolbar
/**
* 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');
}
示例7: _setToolbar
/**
* 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');
}
示例8: addToolbar
/**
* 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')));
}
}
示例9: addToolbar
/**
* 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');
}
示例10: addToolBar
/**
* Устанавливает панель инструментов.
*
* @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');
}
}
示例11: addToolbar
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();
}
示例12: addToolbar
/**
* 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));
}
示例13: addToolbar
/**
* 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');
}
示例14: _setToolbar
/**
* 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');
}
示例15: addToolbar
/**
* 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');
}