本文整理汇总了PHP中JToolbarHelper::editList方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolbarHelper::editList方法的具体用法?PHP JToolbarHelper::editList怎么用?PHP JToolbarHelper::editList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolbarHelper
的用法示例。
在下文中一共展示了JToolbarHelper::editList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addToolbar
protected function addToolbar()
{
$canDo = DeviceHelper::getActions();
$bar = JToolBar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_DEVICE_MANAGER_DEVICES'), 'folder categories');
JToolbarHelper::addNew('device.add');
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('device.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('devices.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('devices.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('devices.archive');
JToolbarHelper::checkin('devices.checkin');
}
/*将信息直接删除
if($canDo->get('core.delete')){
JToolbarHelper::deleteList('', 'labs.delete', 'JTOOLBAR_DELETE');
}*/
$state = $this->get('State');
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'devices.delete', 'JTOOLBAR_EMPTY_TRASH');
} else {
if ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('devices.trash');
}
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_device');
}
JHtmlSidebar::setAction('index.php?option=com_device&view=devices');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
}
示例2: 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));
}
示例3: addToolbar
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_localise', 'component');
JToolBarHelper::title(JText::sprintf('COM_LOCALISE_HEADER_MANAGER', JText::_('COM_LOCALISE_HEADER_PACKAGES')), 'install');
if ($canDo->get('localise.create')) {
JToolbarHelper::addNew('package.add');
}
if ($canDo->get('localise.edit')) {
JToolbarHelper::editList('package.edit');
}
if ($canDo->get('localise.create') || $canDo->get('localise.edit')) {
JToolbarHelper::divider();
}
if ($canDo->get('localise.delete')) {
JToolbarHelper::deleteList('COM_LOCALISE_MSG_PACKAGES_VALID_DELETE', 'packages.delete');
JToolBarHelper::divider();
}
JToolBarHelper::custom('package.download', 'out.png', 'out.png', 'JTOOLBAR_EXPORT', true);
JToolBarHelper::divider();
JToolBarHelper::custom('package.language', 'archive.png', 'archive.png', 'COM_LOCALISE_TOOLBAR_PACKAGES_LANGUAGE', true);
JToolbarHelper::divider();
if ($canDo->get('package.batch')) {
JToolBarHelper::custom('package.batch', 'refresh.png', 'refresh.png', 'COM_LOCALISE_TOOLBAR_PACKAGES_BATCH', true);
JToolbarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_localise');
JToolbarHelper::divider();
}
JToolBarHelper::help('screen.packages', true);
}
示例4: addToolbar
protected function addToolbar()
{
$canDo = JHelperContent::getActions($this->option, $this->edit_view, $this->state->get('filter.category_id'));
$user = JFactory::getUser();
JToolbarHelper::title(ucfirst($this->view), 'address contact');
if ($canDo->get('core.create') || count($user->getAuthorisedCategories($this->option, 'core.create')) > 0) {
JToolbarHelper::addNew($this->edit_view . '.add');
}
if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
JToolbarHelper::editList($this->edit_view . '.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish($this->view . '.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish($this->view . '.unpublish', 'JTOOLBAR_UNPUBLISH', true);
}
if ($user->authorise('core.create', $this->option) && $user->authorise('core.edit', $this->option) && $user->authorise('core.edit.state', $this->option)) {
$title = JText::_('JTOOLBAR_BATCH');
$layout = new JLayoutFile('joomla.toolbar.batch');
$dhtml = $layout->render(array('title' => $title));
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', $this->view . '.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::deleteList($this->option, $this->view . '.delete', 'Delete');
}
if ($user->authorise('core.admin', $this->option) || $user->authorise('core.options', $this->option)) {
JToolbarHelper::preferences($this->option);
}
JHtmlSidebar::setAction('index.php?option=' . $this->option);
}
示例5: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_templates');
JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_STYLES'), 'eye thememanager');
if ($canDo->get('core.edit.state')) {
JToolbarHelper::makeDefault('styles.setDefault', 'COM_TEMPLATES_TOOLBAR_SET_HOME');
JToolbarHelper::divider();
}
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('style.edit');
}
if ($canDo->get('core.create')) {
JToolbarHelper::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
JToolbarHelper::divider();
}
if ($canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'styles.delete');
JToolbarHelper::divider();
}
if ($canDo->get('core.admin') || $canDo->get('core.options')) {
JToolbarHelper::preferences('com_templates');
JToolbarHelper::divider();
}
JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_STYLES');
JHtmlSidebar::setAction('index.php?option=com_templates&view=styles');
}
示例6: 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'))
);
*/
}
示例7: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.7.0
*
* @return void
*/
protected function addToolbar()
{
$canDo = ChurchDirectoryHelper::getActions('com_churchdirectory', 'familyunit');
$user = JFactory::getUser();
JToolbarHelper::title(JText::_('COM_CHURCHDIRECTORY_MANAGER_FAMILYUNITS'), 'churchdirectory');
if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_churchdirectory', 'core.create')) > 0) {
JToolbarHelper::addNew('familyunit.add');
}
if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
JToolbarHelper::editList('familyunit.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::divider();
JToolbarHelper::publish('familyunits.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('familyunits.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::divider();
JToolbarHelper::checkin('familyunits.checkin');
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'familyunits.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolbarHelper::divider();
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('familyunits.trash');
JToolbarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_churchdirectory');
JToolbarHelper::divider();
}
JToolbarHelper::help('churchdirectory_familyunit', true);
JHtmlSidebar::setAction('index.php?option=com_churchdirectory&view=familyunits');
}
示例8: addToolbar
/**
* Adds the page title and toolbar.
*
* @return void
*
* @since 2.5
*/
protected function addToolbar()
{
// Get the results for each action
$canDo = JHelperContent::getActions('com_languages');
JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_OVERRIDES_TITLE'), 'comments-2 langmanager');
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('override.add');
}
if ($canDo->get('core.edit') && $this->pagination->total) {
JToolbarHelper::editList('override.edit');
}
if ($canDo->get('core.delete') && $this->pagination->total) {
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'overrides.delete', 'JTOOLBAR_DELETE');
}
if (JFactory::getUser()->authorise('core.admin')) {
JToolbarHelper::custom('overrides.purge', 'refresh.png', 'refresh_f2.png', 'COM_LANGUAGES_VIEW_OVERRIDES_PURGE', false);
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_languages');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES');
JHtmlSidebar::setAction('index.php?option=com_languages&view=overrides');
JHtmlSidebar::addFilter('', 'filter_language_client', JHtml::_('select.options', $this->languages, null, 'text', $this->state->get('filter.language_client')), true);
$this->sidebar = JHtmlSidebar::render();
}
示例9: 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));
}
示例10: addToolbar
/**
* Add the toolbar and toolbar title.
*
* @access protected
* @return void
*
* @since 2.0
*/
protected function addToolbar()
{
// Get the results for each action
$canDo = JoomHelper::getActions();
JToolBarHelper::title(JText::_('COM_JOOMGALLERY_CATMAN_CATEGORY_MANAGER'), 'folder');
if ($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('core.create') || count(JoomHelper::getAuthorisedCategories('core.create'))) {
JToolbarHelper::addNew('new');
}
if (($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('core.edit') || count(JoomHelper::getAuthorisedCategories('core.edit'))) && $this->pagination->total) {
JToolbarHelper::editList('edit');
JHtml::_('bootstrap.modal', 'collapseModal');
$title = JText::_('JTOOLBAR_BATCH');
$dhtml = "<button data-toggle=\"modal\" data-target=\"#collapseModal\" class=\"btn btn-small\">\n <i class=\"icon-checkbox-partial\" title=\"{$title}\"></i>\n {$title}</button>";
JToolBar::getInstance('toolbar')->appendButton('Custom', $dhtml, 'batch');
JToolbarHelper::divider();
}
if (($this->_config->get('jg_disableunrequiredchecks') || count(JoomHelper::getAuthorisedCategories('core.edit.state'))) && $this->pagination->total) {
JToolbarHelper::publishList('publish', JText::_('COM_JOOMGALLERY_COMMON_PUBLISH'));
JToolbarHelper::unpublishList('unpublish', JText::_('COM_JOOMGALLERY_COMMON_UNPUBLISH'));
JToolbarHelper::divider();
}
if (($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('core.delete') || count(JoomHelper::getAuthorisedCategories('core.delete'))) && $this->pagination->total) {
JToolbarHelper::deleteList('', 'remove');
JToolbarHelper::divider();
}
$options = array(JHtml::_('select.option', 1, JText::_('COM_JOOMGALLERY_COMMON_OPTION_PUBLISHED_ONLY')), JHtml::_('select.option', 0, JText::_('COM_JOOMGALLERY_COMMON_OPTION_NOT_PUBLISHED_ONLY')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', $options, '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')));
$options = array(JHtml::_('select.option', 1, JText::_('COM_JOOMGALLERY_CATMAN_OPTION_USERCATEGORIES_ONLY')), JHtml::_('select.option', 2, JText::_('COM_JOOMGALLERY_CATMAN_OPTION_BACKENDCATEGORIES_ONLY')));
JHtmlSidebar::addFilter(JText::_('COM_JOOMGALLERY_COMMON_OPTION_SELECT_TYPE'), 'filter_type', JHtml::_('select.options', $options, 'value', 'text', $this->state->get('filter.type'), true));
}
示例11: 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');
}
}
示例12: 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')));
}
示例13: 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')));
}
示例14: 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')));
}
示例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');
}