本文整理汇总了PHP中JToolbarHelper::publish方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolbarHelper::publish方法的具体用法?PHP JToolbarHelper::publish怎么用?PHP JToolbarHelper::publish使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolbarHelper
的用法示例。
在下文中一共展示了JToolbarHelper::publish方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addToolbar
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/authorlist.php';
$canDo = JHelperContent::getActions('com_authorlist');
$user = JFactory::getUser();
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_AUTHORLIST_MANAGER_AUTHORS'), 'authorlist.png');
if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_authorlist', 'core.create')) > 0) {
JToolbarHelper::addNew('author.add');
}
if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
JToolbarHelper::editList('author.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('authors.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('authors.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('authors.archive');
}
if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'authors.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('authors.trash');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_authorlist');
}
JHtmlSidebar::setAction('index.php?option=com_authorlist');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
}
示例2: addToolbar
protected function addToolbar()
{
$state = $this->get('State');
JToolBarHelper::title(JText::_('COM_XMAP_SITEMAPS_TITLE'), 'list');
$canDo = JHelperContent::getActions('com_xmap', 'sitemap');
JToolBarHelper::addNew('sitemap.add');
JToolbarHelper::editList('sitemap.edit');
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('sitemaps.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('sitemaps.unpublish', 'JTOOLBAR_UNPUBLISH', true);
}
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'sitemaps.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('sitemaps.trash');
}
if ($canDo->get('core.manage')) {
JToolbarHelper::custom('sitemaps.ping', 'heart', 'heart', JText::_('COM_XMAP_TOOLBAR_PING'));
}
if (JFactory::getUser()->authorise('core.admin')) {
JToolbarHelper::preferences('com_xmap');
}
if (JHelperContent::getActions('com_plugins')->get('core.edit.state')) {
JToolbarHelper::custom('sitemaps.plugins', 'power-cord', 'power-cord', JText::_('COM_XMAP_TOOLBAR_PLUGINS'), false);
}
JHtmlSidebar::setAction('index.php?option=com_xmap&view=sitemaps');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', XmapHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
$this->sidebar = JHtmlSidebar::render();
}
示例3: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/sibdiet.php';
$state = $this->get('State');
$canDo = SibdietHelper::getActions();
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_ACTIVITIES'), 'database activities');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('activity.add');
}
if ($canDo->get('core.edit') && isset($this->items[0])) {
JToolBarHelper::editList('activity.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::checkin('activities.checkin');
}
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::publish('activities.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::deleteList('', 'activities.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('activities.trash');
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_sibdiet');
}
JHtmlSidebar::setAction('index.php?option=com_sibdiet&view=activities');
}
示例4: addToolbar
/**
* 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');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::divider();
JToolbarHelper::trash('messages.trash');
}
//JToolbarHelper::addNew('module.add');
JToolbarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
JHtml::_('bootstrap.modal', 'collapseModal');
$title = JText::_('COM_MESSAGES_TOOLBAR_MY_SETTINGS');
$dhtml = "<a class=\"btn modal btn-small\" href=\"index.php?option=com_messages&view=config&tmpl=component\"\n\t\t\t\t\trel=\"{handler:'iframe', size:{x:700,y:300}}\">\n\t\t\t\t\t<i class=\"icon-cog\" title=\"{$title}\"></i>{$title}</a>";
$bar->appendButton('Custom', $dhtml, 'config');
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_messages');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
}
示例5: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$user = JFactory::getUser();
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_WCATALOG_MANAGER_CATEGORIES'), 'categories.png');
JToolbarHelper::addNew('category.add');
JToolbarHelper::editList('category.edit');
JToolbarHelper::publish('categories.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('categories.unpublish', 'JTOOLBAR_UNPUBLISH', true);
//JToolbarHelper::archiveList('categories.archive');
//JToolbarHelper::checkin('categories.checkin');
JToolbarHelper::deleteList('', 'categories.delete', 'JTOOLBAR_DELETE');
//JToolbarHelper::preferences('com_wcatalog');
//JToolbarHelper::help('JHELP_COMPONENTS_WCATALOG_CATEGORIES');
JHtmlSidebar::setAction('index.php?option=com_wcatalog&view=categories');
/*
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::_('COM_WCATALOG_PARENT_CATEGORY'),
'filter_category_id',
JHtml::_('select.options', JHtml::_('category.options', 'com_wcatalog'), 'value', 'text', $this->state->get('filter.category_id'))
);
*/
}
示例6: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = JHelperContent::getActions('com_messages');
JToolbarHelper::title(JText::_('COM_MESSAGES_MANAGER_MESSAGES'), 'envelope inbox');
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', true);
JToolbarHelper::unpublish('messages.unpublish', 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD', true);
}
JToolbarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
$bar->appendButton('Popup', 'cog', 'COM_MESSAGES_TOOLBAR_MY_SETTINGS', 'index.php?option=com_messages&view=config&tmpl=component', 500, 250, 0, 0, '', '', '<button class="btn" type="button" data-dismiss="modal" aria-hidden="true">' . JText::_('JCANCEL') . '</button>' . '<button class="btn btn-success" type="button" data-dismiss="modal" aria-hidden="true"' . ' onclick="jQuery(\'#modal-cog iframe\').contents().find(\'#saveBtn\').click();">' . JText::_('JSAVE') . '</button>');
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::divider();
JToolbarHelper::deleteList('', 'messages.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::divider();
JToolbarHelper::trash('messages.trash');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_messages');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
}
示例7: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = JHelperContent::getActions('com_edashboard', 'category', $state->get('filter.category_id'));
$user = JFactory::getUser();
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_EDASHBOARD_MANAGER'), 'calendar-3');
if (count($user->getAuthorisedCategories('com_edashboard', 'core.create')) > 0) {
JToolbarHelper::addNew('post.add');
}
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('post.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('edashboard.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('edashboard.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('edashboard.archive');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::checkin('post.checkin');
}
if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'edashboard.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('edashboard.trash');
}
if ($user->authorise('core.admin', 'com_edashboard')) {
JToolbarHelper::preferences('com_edashboard');
}
JToolbarHelper::help('JHELP_COMPONENTS_ACT');
JHtmlSidebar::setAction('index.php?option=com_edashboard&view=edashboard');
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_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_edashboard'), 'value', 'text', $this->state->get('filter.category_id')));
}
示例8: addToolbar
protected function addToolbar()
{
$canDo = ReservaHelper::getActions();
$bar = JToolBar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_RESERVA_MANAGER_EVENTOS'), '');
JToolbarHelper::addNew('evento.add');
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('evento.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('eventos.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('eventos.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('eventos.archive');
JToolbarHelper::checkin('eventos.checkin');
}
//agregar filtro a la vista para busqueda
JHtmlSidebar::setAction('index.php?option=com_reserva&view=eventos');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
/*
if ($canDo->get('core.delete'))
{
JToolBarHelper::deleteList('', 'eventos.delete', 'JTOOLBAR_DELETE');
}
se replaza el boton de borrado por envio a la papelera en vez de borrado completamente
*/
$state = $this->get('State');
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'eventos.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('eventos.trash');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_reserva');
}
}
示例9: addToolBar
protected function addToolBar()
{
$state = $this->get('State');
$canDo = JHelperContent::getActions('com_sppagebuilder');
// return user permission status
$user = JFactory::getUser();
$bar = JToolBar::getInstance('toolbar');
JToolBarHelper::title(JText::_('Page Builder'));
// new page button
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('page.add');
}
// edit button
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('page.edit');
}
// publish and unpublish button
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('pages.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('pages.unpublish', 'JTOOLBAR_UNPUBLISH', true);
}
// delete and trush button
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'pages.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('pages.trash');
}
JHtmlSidebar::setAction('index.php?option=com_sppagebuilder&view=pages');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('archived' => false)), 'value', 'text', $this->state->get('filter.published'), true));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
}
示例10: addToolBar
/**
* Setting the toolbar
*/
public function addToolBar()
{
$user = JFactory::getUser();
JToolbarHelper::title(JText::_('COM_ALFCONTACT_MANAGER_ALFCONTACTS'), 'alfcontact');
if ($user->authorise('core.create')) {
JToolbarHelper::addNew('alfcontact.add');
}
if ($user->authorise('core.edit') || $user->authorise('core.edit.own')) {
JToolbarHelper::editList('alfcontact.edit');
}
if ($user->authorise('core.edit.state')) {
JToolbarHelper::publish('alfcontacts.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('alfcontacts.unpublish', 'JTOOLBAR_UNPUBLISH', true);
}
if ($this->state->get('filter.published') == -2 && $user->authorise('core.delete')) {
JToolbarHelper::deleteList('', 'alfcontacts.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($user->authorise('core.edit.state')) {
JToolbarHelper::trash('alfcontacts.trash');
}
// Options button.
if ($user->authorise('core.admin')) {
JToolBarHelper::preferences('com_alfcontact');
}
JToolbarHelper::help('JHELP_COMPONENTS_ALFCONTACT_CONTACTS');
JHtmlSidebar::setAction('index.php?option=com_alfcontact&view=alfcontacts');
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_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
}
示例11: addToolbar
/**
* 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');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::divider();
JToolbarHelper::trash('messages.trash');
}
//JToolbarHelper::addNew('module.add');
JToolbarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
$bar->appendButton('Slider', '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');
}
示例12: 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');
}
}
示例13: addToolbar
protected function addToolbar()
{
$canDo = FolioHelper::getActions();
$bar = JToolBar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_FOLIO_MANAGER_FOLIOS'), '');
JToolbarHelper::addNew('folio.add');
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('folio.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('folios.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('folios.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('folios.archive');
JToolbarHelper::checkin('folios.checkin');
}
$state = $this->get('State');
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'folios.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('folios.trash');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_folio');
}
JHtmlSidebar::setAction('index.php?option=com_folio&view=folios');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
}
示例14: 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::publish('clients.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('clients.unpublish', 'JTOOLBAR_UNPUBLISH', true);
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');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('clients.trash');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_banners');
}
JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS');
JHtmlSidebar::setAction('index.php?option=com_banners&view=clients');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
}
示例15: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_banners');
JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_CLIENTS'), 'bookmark banners-clients');
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::publish('clients.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('clients.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('clients.archive');
JToolbarHelper::checkin('clients.checkin');
}
if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'clients.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('clients.trash');
}
if ($canDo->get('core.admin') || $canDo->get('core.options')) {
JToolbarHelper::preferences('com_banners');
}
JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS');
}