本文整理汇总了PHP中JToolBar::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolBar::getInstance方法的具体用法?PHP JToolBar::getInstance怎么用?PHP JToolBar::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolBar
的用法示例。
在下文中一共展示了JToolBar::getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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');
} else {
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::trash('messages.trash');
}
}
//JToolBarHelper::addNew('module.add');
JToolBarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
$bar->appendButton('Popup', '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');
}
示例2: addToolBar
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JRequest::setVar('hidemainmenu', true);
$user = JFactory::getUser();
$userId = $user->get('id');
$canDo = MaintHelper::getActions();
$isNew = false == isset($this->order) || $this->order->id == 0;
$this->canDeliver = $canDo->get('core.deliver');
JToolBarHelper::title($isNew ? JText::_('COM_MAINT_ADD_APPLICATION') : JText::_('COM_MAINT_EDIT_APPLICATION'));
if ($isNew) {
// For new records, check the create permission.
if ($canDo->get('core.create')) {
JToolBarHelper::apply('maint.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('maint.save', 'JTOOLBAR_SAVE');
JToolBarHelper::save2new('maint.save2new');
}
} else {
if ($canDo->get('core.edit')) {
JToolBarHelper::apply('maint.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('maint.save', 'JTOOLBAR_SAVE');
// if we can return to make a new one.
if ($canDo->get('core.create')) {
JToolBarHelper::save2new('maint.save2new');
}
}
$bar = JToolBar::getInstance('toolbar');
$bar->addButtonPath(JPATH_COMPONENT . '/button/');
$bar->appendButton('Print', 'COM_MAINT_PRINT', 'index.php?option=com_maint&task=maints.pprint&id=' . $this->order->id);
}
JToolBarHelper::cancel('maint.cancel', 'JTOOLBAR_CANCEL');
}
示例3: display
function display($tpl = null)
{
$mainframe = JFactory::getApplication();
$user = JFactory::getUser();
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
$limitstart = $mainframe->getUserStateFromRequest($option . $view . '.limitstart', 'limitstart', 0, 'int');
$filter_order = $mainframe->getUserStateFromRequest($option . $view . 'filter_order', 'filter_order', '', 'cmd');
$filter_order_Dir = $mainframe->getUserStateFromRequest($option . $view . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
$model = $this->getModel();
$total = $model->getTotalGroups();
if ($limitstart > $total - $limit) {
$limitstart = max(0, (int) (ceil($total / $limit) - 1) * $limit);
JRequest::setVar('limitstart', $limitstart);
}
$extraFieldGroups = $model->getGroups();
$this->assignRef('rows', $extraFieldGroups);
jimport('joomla.html.pagination');
$pageNav = new JPagination($total, $limitstart, $limit);
$this->assignRef('page', $pageNav);
JToolBarHelper::title(JText::_('K2_EXTRA_FIELD_GROUPS'), 'k2.png');
JToolBarHelper::deleteList('', 'remove', 'K2_DELETE');
JToolBarHelper::editList();
JToolBarHelper::addNew();
if (K2_JVERSION != '15') {
JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
} else {
$toolbar = JToolBar::getInstance('toolbar');
$toolbar->appendButton('Popup', 'config', 'Parameters', 'index.php?option=com_k2&view=settings');
}
$this->loadHelper('html');
K2HelperHTML::subMenu();
parent::display($tpl);
}
示例4: 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');
}
示例5: addToolBar
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_JUDOWNLOAD_MANAGER_TAGS'), 'tags');
if ($this->groupCanDoManage) {
if ($this->canDo->get('core.create')) {
JToolBarHelper::addNew('tag.add');
}
if ($this->canDo->get('core.edit') || $this->canDo->get('core.edit.own')) {
JToolBarHelper::editList('tag.edit');
}
if ($this->canDo->get('core.edit.state')) {
JToolbarHelper::publish('tags.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('tags.unpublish', 'JTOOLBAR_UNPUBLISH', true);
}
}
if ($this->groupCanDoDelete) {
if ($this->canDo->get('core.delete')) {
JToolBarHelper::deleteList('COM_JUDOWNLOAD_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THESE_ITEMS', 'tags.delete');
}
}
JToolBarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
$bar->addButtonPath(JPATH_ADMINISTRATOR . "/components/com_judownload/helpers/button");
$bar->appendButton('JUHelp', 'help', JText::_('JTOOLBAR_HELP'));
}
示例6: dropdown
/**
*
* Add an toolbar dropdown list
*
* @param String $text is text of parent
* @param String $title is title of parent
* @param String $icon is icon class prefix
* @param String $childs is HTML
* @param String $href is url of parent
* @param String $action is action you want when click on parent
*/
public static function dropdown($text = '', $title = '', $icon = 'jsn-parent', $childs = '', $href = '', $action = 'popup')
{
JSNFactory::localimport('helpers.html.toolbar.button.jsndropdown');
$bar = JToolBar::getInstance('toolbar');
// Add a standard button.
$bar->appendButton('JSNDropdown', $text, $title, $icon, $childs, $href, $action);
}
示例7: display
function display($tpl = null)
{
$canDo = JCKHelper::getActions();
$app = JFactory::getApplication();
if (!$canDo->get('jckman.install')) {
$app->redirect(JRoute::_('index.php?option=com_jckman&view=cpanel', false), JText::_('COM_JCKMAN_PLUGIN_PERM_NO_INSTALL'), 'error');
return false;
}
//end if
/*
* Set toolbar items for the page
*/
$bar =& JToolBar::getInstance('toolbar');
// Add a Link button for Control Panel
$bar->appendButton('Link', 'cpanel', JText::_('COM_JCKMAN_SUBMENU_CPANEL_NAME'), 'index.php?option=com_jckman&controller=cpanel');
JToolBarHelper::help('screen.installer');
$paths = new stdClass();
$paths->first = '';
$lookup = array(JHTML::_('select.option', 0, JText::_('All')));
$selections =& $this->get('ToolbarList');
$lists['selections'] = JHTML::_('select.genericlist', $selections, 'selections[]', 'class="inputbox" size="15" multiple="multiple" style=width:182px;', 'value', 'text', $lookup, 'selections');
$this->assignRef('paths', $paths);
$this->assignRef('state', $this->get('state'));
$this->assignRef('lists', $lists);
parent::display($tpl);
}
示例8: setToolbar
protected function setToolbar()
{
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
// Set the titlebar text
JToolBarHelper::title(JText::_('COM_KUNENA') . ': ' . JText::_('COM_KUNENA_USER_MANAGER'), 'users');
JToolBarHelper::spacer();
JToolBarHelper::editList();
JToolBarHelper::custom('logout', 'cancel.png', 'cancel_f2.png', 'COM_KUNENA_LOGOUT');
JToolBarHelper::divider();
JToolBarHelper::custom('move', 'move.png', 'move_f2.png', 'COM_KUNENA_MOVE_USERMESSAGES');
if (version_compare(JVERSION, '3.0', '>')) {
JHtml::_('bootstrap.modal', 'moderateModal');
$title = JText::_('COM_KUNENA_VIEW_USERS_TOOLBAR_ASSIGN_MODERATORS');
$dhtml = "<button data-toggle=\"modal\" data-target=\"#moderateModal\" class=\"btn btn-small\">\n\t\t\t\t\t\t<i class=\"icon-checkbox-partial\" title=\"{$title}\"> </i>\n\t\t\t\t\t\t\t{$title}</button>";
$bar->appendButton('Custom', $dhtml, 'batch');
} else {
JHtml::_('moobootstrap.modal', 'moderateModal');
$title = JText::_('COM_KUNENA_VIEW_USERS_TOOLBAR_ASSIGN_MODERATORS');
$dhtml = "<a data-toggle=\"modal\" data-target=\"#moderateModal\" class=\"toolbar\" href=\"javascript:void(null);\">\n\t\t\t\t\t\t<span class=\"icon-32-apply\" title=\"{$title}\"></span>\n\t\t\t\t\t\t\t{$title}</a>";
$bar->appendButton('Custom', $dhtml, 'batch');
}
JToolBarHelper::divider();
JToolBarHelper::custom('trashusermessages', 'trash.png', 'icon-32-move.png', 'COM_KUNENA_TRASH_USERMESSAGES');
JToolBarHelper::deleteList();
JToolBarHelper::spacer();
}
示例9: 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'))
);
*/
}
示例10: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/languages.php';
$canDo = LanguagesHelper::getActions();
JToolBarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'langmanager.png');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('language.add');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('language.edit');
JToolBarHelper::divider();
}
if ($canDo->get('core.edit.state')) {
if ($this->state->get('filter.published') != 2) {
JToolBarHelper::publishList('languages.publish');
JToolBarHelper::unpublishList('languages.unpublish');
}
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::divider();
} elseif ($canDo->get('core.edit.state')) {
JToolBarHelper::trash('languages.trash');
JToolBarHelper::divider();
}
if ($canDo->get('core.admin')) {
// Add install languages link to the lang installer component
$bar = JToolBar::getInstance('toolbar');
$bar->appendButton('Link', 'extension', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages');
JToolBarHelper::divider();
JToolBarHelper::preferences('com_languages');
JToolBarHelper::divider();
}
JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT');
}
示例11: 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');
// Instantiate a new JLayoutFile instance and render the layout
JHtml::_('behavior.modal', 'a.messagesSettings');
$layout = new JLayoutFile('toolbar.mysettings');
$bar->appendButton('Custom', $layout->render(array()), 'upload');
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');
}
示例12: 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');
}
示例13: listing
function listing()
{
$app = JFactory::getApplication();
$config = acymailing_config();
if (!class_exists('plgSystemAcymailingClassMail')) {
$app->enqueueMessage('AcyMailing can customize some Joomla messages. If you want to do this, please first <a href="index.php?option=com_acymailing&ctrl=cpanel">enable the plugin acymailingclassmail</a>', 'notice');
}
$pageInfo = new stdClass();
$pageInfo->filter = new stdClass();
$pageInfo->filter->order = new stdClass();
$paramBase = ACYMAILING_COMPONENT . '.' . $this->getName();
$pageInfo->filter->order->value = $app->getUserStateFromRequest($paramBase . ".filter_order", 'filter_order', 'mailid', 'cmd');
$pageInfo->filter->order->dir = $app->getUserStateFromRequest($paramBase . ".filter_order_Dir", 'filter_order_Dir', 'desc', 'word');
$db = JFactory::getDBO();
$query = 'SELECT mailid, subject, alias, fromname, published, fromname, fromemail, replyname, replyemail FROM #__acymailing_mail WHERE `type` = ' . $db->Quote($this->type);
if (!empty($pageInfo->filter->order->value)) {
$query .= ' ORDER BY ' . $pageInfo->filter->order->value . ' ' . $pageInfo->filter->order->dir;
}
$db->setQuery($query);
$rows = $db->loadObjectList();
acymailing_setTitle(JText::_($this->nameListing), $this->icon, $this->ctrl);
$bar = JToolBar::getInstance('toolbar');
JToolBarHelper::custom('preview', 'acypreview', '', JText::_('ACY_PREVIEW'), true);
JToolBarHelper::editList();
JToolBarHelper::deleteList(JText::_('ACY_VALIDDELETEITEMS'));
JToolBarHelper::divider();
$bar->appendButton('Pophelp', $this->doc);
$bar->appendButton('Link', 'acymailing', JText::_('ACY_CPANEL'), acymailing_completeLink('dashboard'));
$toggleClass = acymailing_get('helper.toggle');
$this->assignRef('toggleClass', $toggleClass);
$this->assignRef('pageInfo', $pageInfo);
$this->assign('config', $config);
$this->assign('rows', $rows);
}
示例14: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_digicom', 'category', $this->state->get('filter.category_id'));
$user = JFactory::getUser();
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_DIGICOM_PRODUCTS_TOOLBAR_TITLE'), 'stack product');
if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_digicom', 'core.create')) > 0) {
//JToolbarHelper::addNew('product.add');
$layout = new JLayoutFile('toolbar.products');
$bar->appendButton('Custom', $layout->render(array()), 'products');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('products.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('products.unpublish', 'JTOOLBAR_UNPUBLISH', true);
//JToolbarHelper::custom('products.featured', 'featured.png', 'featured_f2.png', 'JFEATURE', true);
//JToolbarHelper::custom('products.unfeatured', 'unfeatured.png', 'featured_f2.png', 'JUNFEATURE', true);
//JToolbarHelper::archiveList('products.archive');
//JToolbarHelper::checkin('products.checkin');
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'products.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('products.trash');
}
// Instantiate a new JLayoutFile instance and render the layout
$layout = new JLayoutFile('toolbar.title');
$title = array('title' => JText::_('COM_DIGICOM_PRODUCTS_TOOLBAR_TITLE'), 'class' => 'product');
$bar->appendButton('Custom', $layout->render($title), 'title');
$layout = new JLayoutFile('toolbar.settings');
$bar->appendButton('Custom', $layout->render(array()), 'settings');
}
示例15: addToolbar
function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/phocamapsmarkers.php';
$state = $this->get('State');
$canDo = PhocaMapsMarkersHelper::getActions($this->t, $state->get('filter.marker_id'));
$user = JFactory::getUser();
$bar = JToolBar::getInstance('toolbar');
JToolBarHelper::title(JText::_('COM_PHOCAMAPS_MARKERS'), 'location');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('phocamapsmarker.add', 'JTOOLBAR_NEW');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('phocamapsmarker.edit', 'JTOOLBAR_EDIT');
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::custom('phocamapsmarkers.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::custom('phocamapsmarkers.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
}
if ($canDo->get('core.delete')) {
JToolBarHelper::deleteList('COM_PHOCAMAPS_WARNING_DELETE_ITEMS', 'phocamapsmarkers.delete', 'COM_PHOCAMAPS_DELETE');
}
// Add a batch button
if ($user->authorise('core.edit')) {
JHtml::_('bootstrap.modal', 'collapseModal');
$title = JText::_('JTOOLBAR_BATCH');
$dhtml = "<button data-toggle=\"modal\" data-target=\"#collapseModal\" class=\"btn btn-small\">\n\t\t\t\t\t\t<i class=\"icon-checkbox-partial\" title=\"{$title}\"></i>\n\t\t\t\t\t\t{$title}</button>";
$bar->appendButton('Custom', $dhtml, 'batch');
}
JToolBarHelper::divider();
JToolBarHelper::help('screen.phocamaps', true);
}