本文整理汇总了PHP中JToolbarHelper::trash方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolbarHelper::trash方法的具体用法?PHP JToolbarHelper::trash怎么用?PHP JToolbarHelper::trash使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolbarHelper
的用法示例。
在下文中一共展示了JToolbarHelper::trash方法的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');
} 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');
}
示例2: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_sibdiet');
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
$bar->addButtonPath(JPATH_COMPONENT . '/toolbar/button/');
JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_REQUESTS'), 'list-view requests');
if (in_array('requests', $this->permissions)) {
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('request.add');
}
if (isset($this->items[0])) {
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('request.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::checkin('requests.checkin');
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::publish('requests.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::deleteList('', 'requests.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('requests.trash');
}
// Add a batch button for tags
if ($canDo->get('core.edit') && $canDo->get('core.edit.state')) {
JToolbarHelper::modal('collapseModal', 'icon-checkbox-partial', JText::_('JTOOLBAR_BATCH'));
}
$bar->appendButton('Print', 'index.php?option=com_sibdiet&view=printdiets&tmpl=component', 'COM_SIBDIET_PRINT_DIETS');
}
}
}
示例3: 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')));
}
示例4: 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));
}
示例5: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_languages');
JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'comments-2 langmanager');
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('JGLOBAL_CONFIRM_DELETE', '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', 'upload', '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');
JHtmlSidebar::setAction('index.php?option=com_languages&view=languages');
}
示例6: addToolBar
/**
* Setting the toolbar
*/
protected function addToolBar($total = NULL)
{
JToolBarHelper::title(JText::_('COM_AGENDADIRIGENTES') . ': ' . JText::_('COM_AGENDADIRIGENTES_MANAGER_COMPROMISSOS') . ($total ? ' <span style="font-size: 0.5em; vertical-align: middle;">(' . $total . ' ' . JText::_('COM_AGENDADIRIGENTES_ITEMS') . ')</span>' : ''));
if ($this->canDo->get('core.create')) {
JToolBarHelper::addNew('compromisso.add');
}
if ($this->canDo->get('core.edit') || $this->canDo->get('core.edit.own')) {
JToolBarHelper::editList('compromisso.edit');
}
if ($this->canDo->get('core.edit.state')) {
$allowFeature = $this->state->get('params')->get('allowFeature', 'state');
$isSuperUser = array_search(8, $this->user->groups) !== false;
JToolBarHelper::publishList('compromissos.publish');
JToolBarHelper::unpublishList('compromissos.unpublish');
if ($allowFeature == 'state' || $allowFeature == 'edit' && $this->canDo->get('core.edit') || $allowFeature == 'superuser' && $isSuperUser) {
JToolbarHelper::custom('compromissos.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
}
JToolbarHelper::archiveList('compromissos.archive');
}
if ($this->state->get('filter.state') == -2 && $this->canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'compromissos.delete');
} elseif ($this->canDo->get('core.edit.state')) {
JToolbarHelper::trash('compromissos.trash');
}
// Options button.
if ($this->canDo->get('core.admin')) {
JToolBarHelper::preferences('com_agendadirigentes');
}
}
示例7: 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));
}
示例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
/**
* 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')));
}
示例10: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/banners.php';
$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('', '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');
}
示例11: 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));
}
示例12: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_languages');
JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'comments-2 langmanager');
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')) {
JToolbarHelper::preferences('com_languages');
JToolbarHelper::divider();
}
JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT');
JHtmlSidebar::setAction('index.php?option=com_languages&view=languages');
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')));
}
示例13: addToolbar
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_jvisualcontent');
$user = JFactory::getUser();
JToolbarHelper::title(JText::_('COM_JVISUALCONTENT_EXTRAFIELDS_MANAGER'));
// Create new button
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('extrafield.add');
JToolbarHelper::divider();
}
// Create edit button
if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
JToolbarHelper::editList('type.edit');
}
// Create publish, unpublish buttons
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('extrafields.publish');
JToolbarHelper::unpublish('extrafields.unpublish');
JToolbarHelper::divider();
}
if ($this->state->get('filter.published') == -2 && $user->authorise('core.delete')) {
JToolbarHelper::deleteList('', 'extrafields.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('extrafields.trash');
}
// Create options button
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_jvisualcontent');
}
if (version_compare(JVERSION, '3.0', '>=')) {
$fieldsType = array('textfield' => JText::_('COM_JVISUALCONTENT_TEXT_FIELD'), 'textarea' => JText::_('COM_JVISUALCONTENT_TEXTAREA'), 'select' => JText::_('COM_JVISUALCONTENT_DROPDOWN_SELECT'), 'multiselect' => JText::_('COM_JVISUALCONTENT_DROPDOWN_LIST'), 'radio' => JText::_('COM_JVISUALCONTENT_RADIO'), 'checkbox' => JText::_('COM_JVISUALCONTENT_CHECKBOX'), 'editor' => JText::_('COM_JVISUALCONTENT_EDITOR'), 'calendar' => JText::_('COM_JVISUALCONTENT_CALENDAR'), 'file' => JText::_('COM_JVISUALCONTENT_FILE'));
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::_('COM_JVISUALCONTENT_OPTION_SELECT_TYPE'), 'filter_type', JHtml::_('select.options', $fieldsType, 'value', 'text', $this->state->get('filter.type')));
}
}
示例14: 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();
}
示例15: 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();
}