本文整理汇总了PHP中JToolbarHelper::unpublish方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolbarHelper::unpublish方法的具体用法?PHP JToolbarHelper::unpublish怎么用?PHP JToolbarHelper::unpublish使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolbarHelper
的用法示例。
在下文中一共展示了JToolbarHelper::unpublish方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addToolBar
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_JUDIRECTORY_MANAGER_FIELD_GROUPS'), 'fieldgroups');
if ($this->groupCanDoManage) {
if ($this->canDo->get('core.create')) {
JToolBarHelper::addNew('fieldgroup.add');
}
if ($this->canDo->get('core.edit') || $this->canDo->get('core.edit.own')) {
JToolBarHelper::editList('fieldgroup.edit');
}
if ($this->canDo->get('core.edit.state')) {
JToolbarHelper::publish('fieldgroups.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('fieldgroups.unpublish', 'JTOOLBAR_UNPUBLISH', true);
}
}
if ($this->groupCanDoDelete) {
if ($this->canDo->get('core.delete')) {
JToolBarHelper::deleteList('COM_JUDIRECTORY_DELETE_FIELD_GROUP_WARNING', 'fieldgroups.delete');
}
}
JToolBarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
$bar->addButtonPath(JPATH_ADMINISTRATOR . "/components/com_judirectory/helpers/button");
$bar->appendButton('JUHelp', 'help', JText::_('JTOOLBAR_HELP'));
}
示例2: addToolBar
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_JUDOWNLOAD_MANAGER_COMMENTS'), 'comments');
if ($this->groupCanDoManage) {
if ($this->canDo->get('core.create')) {
JToolBarHelper::addNew('comment.add', 'JTOOLBAR_NEW');
}
if ($this->canDo->get('core.edit') || $this->canDo->get('core.edit.own')) {
JToolBarHelper::editList('comment.edit', 'JTOOLBAR_EDIT');
}
if ($this->canDo->get('core.edit.state')) {
JToolbarHelper::publish('comments.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('comments.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', 'comments.delete', 'JTOOLBAR_DELETE');
}
}
if (JFactory::getApplication()->input->getInt('doc_id', 0)) {
JToolBarHelper::custom($task = 'comments.back', $icon = 'back', $iconOver = 'back', $alt = JText::_('JTOOLBAR_BACK'), $listSelect = false, $x = false);
}
JToolBarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
$bar->addButtonPath(JPATH_ADMINISTRATOR . "/components/com_judownload/helpers/button");
$bar->appendButton('JUHelp', 'help', JText::_('JTOOLBAR_HELP'));
}
示例3: 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));
}
示例4: 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');
}
示例5: 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')));
}
}
示例6: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = UsersHelper::getActions();
JToolbarHelper::title(JText::_('COM_USERS_VIEW_USERS_TITLE'), 'user');
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('user.add');
}
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('user.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::divider();
JToolbarHelper::publish('users.activate', 'COM_USERS_TOOLBAR_ACTIVATE', true);
JToolbarHelper::unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
JToolbarHelper::custom('users.unblock', 'unblock.png', 'unblock_f2.png', 'COM_USERS_TOOLBAR_UNBLOCK', true);
JToolbarHelper::divider();
}
if ($canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'users.delete');
JToolbarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_users');
JToolbarHelper::divider();
}
JToolbarHelper::help('JHELP_USERS_USER_MANAGER');
JHtmlSidebar::setAction('index.php?option=com_users&view=users');
JHtmlSidebar::addFilter(JText::_('COM_USERS_FILTER_STATE'), 'filter_state', JHtml::_('select.options', UsersHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state')));
JHtmlSidebar::addFilter(JText::_('COM_USERS_FILTER_ACTIVE'), 'filter_active', JHtml::_('select.options', UsersHelper::getActiveOptions(), 'value', 'text', $this->state->get('filter.active')));
JHtmlSidebar::addFilter(JText::_('COM_USERS_FILTER_USERGROUP'), 'filter_group_id', JHtml::_('select.options', UsersHelper::getGroups(), 'value', 'text', $this->state->get('filter.group_id')));
JHtmlSidebar::addFilter(JText::_('COM_USERS_OPTION_FILTER_DATE'), 'filter_range', JHtml::_('select.options', Usershelper::getRangeOptions(), 'value', 'text', $this->state->get('filter.range')));
}
示例7: 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');
}
示例8: 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_CONTROLLER'), 'cogs controller');
if (in_array('requestschecks', $this->permissions)) {
if (isset($this->items[0])) {
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('request.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::checkin('requests.checkin');
JToolbarHelper::publish('requests.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('requests.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('requests.archive', 'COM_SIBDIET_TOOLBAR_WAITING_LIST');
}
if ($this->state->get('filter.published') == -2) {
JToolbarHelper::deleteList('', 'requests.delete', 'JTOOLBAR_EMPTY_TRASH');
} else {
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'));
}
}
}
}
示例9: 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');
}
}
示例10: 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')));
}
示例11: 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')));
}
示例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');
$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');
}
示例13: 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');
}
}
示例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
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));
}