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'))); }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = JHelperContent::getActions('com_content', 'category', $this->state->get('filter.category_id')); JToolbarHelper::title(JText::_('COM_CONTENT_FEATURED_TITLE'), 'star featured'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('article.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('article.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::custom('articles.unfeatured', 'unfeatured.png', 'featured_f2.png', 'JUNFEATURE', true); JToolbarHelper::archiveList('articles.archive'); JToolbarHelper::checkin('articles.checkin'); } if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('articles.trash'); } if ($canDo->get('core.admin') || $canDo->get('core.options')) { JToolbarHelper::preferences('com_content'); } JToolbarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES'); }
/** * 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'); } }
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)); }
/** * 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'); }
/** * 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)); }
/** * 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'))); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = ContentHelper::getActions($this->state->get('filter.category_id')); JToolbarHelper::title(JText::_('COM_CONTENT_FEATURED_TITLE'), 'featured.png'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('article.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('article.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true); JToolbarHelper::archiveList('articles.archive'); JToolbarHelper::checkin('articles.checkin'); } if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('articles.trash'); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_content'); } JToolbarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES'); JHtmlSidebar::setAction('index.php?option=com_content&view=featured'); 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_content'), 'value', 'text', $this->state->get('filter.category_id'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_MAX_LEVELS'), 'filter_level', JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level'))); 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_AUTHOR'), 'filter_author_id', JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'))); }
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'); } }
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)); }
/** * 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')); } } } }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/banners.php'; $canDo = BannersHelper::getActions($this->state->get('filter.category_id')); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_BANNERS'), 'banners.png'); if (count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0) { JToolbarHelper::addNew('banner.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('banner.edit'); } if ($canDo->get('core.edit.state')) { if ($this->state->get('filter.state') != 2) { JToolbarHelper::publish('banners.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('banners.unpublish', 'JTOOLBAR_UNPUBLISH', true); } if ($this->state->get('filter.state') != -1) { if ($this->state->get('filter.state') != 2) { JToolbarHelper::archiveList('banners.archive'); } elseif ($this->state->get('filter.state') == 2) { JToolbarHelper::unarchiveList('banners.publish'); } } } if ($canDo->get('core.edit.state')) { JToolbarHelper::checkin('banners.checkin'); } if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'banners.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('banners.trash'); } // Add a batch button if ($user->authorise('core.create', 'com_banners') && $user->authorise('core.edit', 'com_banners') && $user->authorise('core.edit.state', 'com_banners')) { JHtml::_('bootstrap.modal', 'collapseModal'); $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_banners'); } JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS'); JHtmlSidebar::setAction('index.php?option=com_banners&view=banners'); 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::_('COM_BANNERS_SELECT_CLIENT'), 'filter_client_id', JHtml::_('select.options', BannersHelper::getClientOptions(), 'value', 'text', $this->state->get('filter.client_id'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_banners'), 'value', 'text', $this->state->get('filter.category_id'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'))); }
/** * Add the page title and toolbar. * * @return void. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = JHelperContent::getActions('com_redirect'); JToolbarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINKS'), 'refresh redirect'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('link.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('link.edit'); } if ($canDo->get('core.edit.state')) { if ($state->get('filter.state') != 2) { JToolbarHelper::divider(); JToolbarHelper::publish('links.publish', 'JTOOLBAR_ENABLE', true); JToolbarHelper::unpublish('links.unpublish', 'JTOOLBAR_DISABLE', true); } if ($state->get('filter.state') != -1) { JToolbarHelper::divider(); if ($state->get('filter.state') != 2) { JToolbarHelper::archiveList('links.archive'); } elseif ($state->get('filter.state') == 2) { JToolbarHelper::unarchiveList('links.publish', 'JTOOLBAR_UNARCHIVE'); } } } if ($canDo->get('core.create')) { // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); JHtml::_('bootstrap.modal', 'collapseModal'); $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'links.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolbarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('links.trash'); JToolbarHelper::divider(); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_redirect'); JToolbarHelper::divider(); } JToolbarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER'); JHtmlSidebar::setAction('index.php?option=com_redirect&view=links'); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', RedirectHelper::publishedOptions(), 'value', 'text', $this->state->get('filter.state'), true)); }
/** * Add the page title and toolbar. * * @return void. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = JHelperContent::getActions('com_redirect'); JToolbarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINKS'), 'refresh redirect'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('link.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('link.edit'); } if ($canDo->get('core.edit.state')) { if ($state->get('filter.state') != 2) { JToolbarHelper::divider(); JToolbarHelper::publish('links.publish', 'JTOOLBAR_ENABLE', true); JToolbarHelper::unpublish('links.unpublish', 'JTOOLBAR_DISABLE', true); } if ($state->get('filter.state') != -1) { JToolbarHelper::divider(); if ($state->get('filter.state') != 2) { JToolbarHelper::archiveList('links.archive'); } elseif ($state->get('filter.state') == 2) { JToolbarHelper::unarchiveList('links.publish', 'JTOOLBAR_UNARCHIVE'); } } } if ($canDo->get('core.create')) { // Get the toolbar object instance $bar = JToolbar::getInstance('toolbar'); $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'links.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolbarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::custom('links.purge', 'purge', 'purge', 'COM_REDIRECT_TOOLBAR_PURGE', false); JToolbarHelper::trash('links.trash'); JToolbarHelper::divider(); } if ($canDo->get('core.admin') || $canDo->get('core.options')) { JToolbarHelper::preferences('com_redirect'); JToolbarHelper::divider(); } JToolbarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER'); }
/** * 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', 'category', $this->state->get('filter.category_id')); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_BANNERS'), 'bookmark banners'); if (count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0) { JToolbarHelper::addNew('banner.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('banner.edit'); } if ($canDo->get('core.edit.state')) { if ($this->state->get('filter.state') != 2) { JToolbarHelper::publish('banners.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('banners.unpublish', 'JTOOLBAR_UNPUBLISH', true); } if ($this->state->get('filter.state') != -1) { if ($this->state->get('filter.state') != 2) { JToolbarHelper::archiveList('banners.archive'); } elseif ($this->state->get('filter.state') == 2) { JToolbarHelper::unarchiveList('banners.publish'); } } } if ($canDo->get('core.edit.state')) { JToolbarHelper::checkin('banners.checkin'); } // Add a batch button if ($user->authorise('core.create', 'com_banners') && $user->authorise('core.edit', 'com_banners') && $user->authorise('core.edit.state', 'com_banners')) { JHtml::_('bootstrap.modal', 'collapseModal'); $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'banners.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('banners.trash'); } if ($user->authorise('core.admin', 'com_banners')) { JToolbarHelper::preferences('com_banners'); } JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $canDo = ContentHelper::getActions($this->state->get('filter.category_id')); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'), 'article.png'); if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_content', 'core.create')) > 0) { JToolbarHelper::addNew('article.add'); } if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolbarHelper::editList('article.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::custom('articles.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true); JToolbarHelper::archiveList('articles.archive'); JToolbarHelper::checkin('articles.checkin'); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('articles.trash'); } // Add a batch button if ($user->authorise('core.create', 'com_content') && $user->authorise('core.edit', 'com_content') && $user->authorise('core.edit.state', 'com_content')) { JHtml::_('bootstrap.modal', 'collapseModal'); $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_content'); } JToolbarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER'); JHtmlSidebar::setAction('index.php?option=com_content&view=articles'); 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_content'), 'value', 'text', $this->state->get('filter.category_id'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_MAX_LEVELS'), 'filter_level', JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level'))); 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_AUTHOR'), 'filter_author_id', JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_TAG'), 'filter_tag', JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag'))); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/weblinks.php'; $state = $this->get('State'); $canDo = JHelperContent::getActions('com_weblinks', 'category', $state->get('filter.category_id')); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_WEBLINKS_MANAGER_WEBLINKS'), 'link weblinks'); if (count($user->getAuthorisedCategories('com_weblinks', 'core.create')) > 0) { JToolbarHelper::addNew('weblink.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('weblink.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('weblinks.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('weblinks.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::archiveList('weblinks.archive'); JToolbarHelper::checkin('weblinks.checkin'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'weblinks.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('weblinks.trash'); } // Add a batch button if ($user->authorise('core.create', 'com_weblinks') && $user->authorise('core.edit', 'com_weblinks') && $user->authorise('core.edit.state', 'com_weblinks')) { JHtml::_('bootstrap.modal', 'collapseModal'); $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($user->authorise('core.admin', 'com_weblinks') || $user->authorise('core.options', 'com_weblinks')) { JToolbarHelper::preferences('com_weblinks'); } JToolbarHelper::help('JHELP_COMPONENTS_WEBLINKS_LINKS'); JHtmlSidebar::setAction('index.php?option=com_weblinks&view=weblinks'); 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_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_weblinks'), 'value', 'text', $this->state->get('filter.category_id'))); 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'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_TAG'), 'filter_tag', JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag'))); }
/** * Add the page title and toolbar. * * @since 3.1 */ protected function addToolbar() { $state = $this->get('State'); $canDo = TagsHelper::getActions($state->get('filter.parent_id')); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_TAGS_MANAGER_TAGS'), 'tags'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('tag.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('tag.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('tags.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('tags.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::archiveList('tags.archive'); } if ($canDo->get('core.admin')) { JToolbarHelper::checkin('tags.checkin'); } if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'tags.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('tags.trash'); } // Add a batch button if ($user->authorise('core.create', 'com_tags') && $user->authorise('core.edit', 'com_tags') && $user->authorise('core.edit.state', 'com_tags')) { JHtml::_('bootstrap.modal', 'collapseModal'); $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_tags'); } JToolbarHelper::help('JHELP_COMPONENTS_TAGS_MANAGER'); JHtmlSidebar::setAction('index.php?option=com_tags&view=tags'); 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'))); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = NewsfeedsHelper::getActions($state->get('filter.category_id')); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEEDS'), 'newsfeeds.png'); if (count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) { JToolbarHelper::addNew('newsfeed.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('newsfeed.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('newsfeeds.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('newsfeeds.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::archiveList('newsfeeds.archive'); } if ($canDo->get('core.admin')) { JToolbarHelper::checkin('newsfeeds.checkin'); } if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'newsfeeds.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('newsfeeds.trash'); } // 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'); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_newsfeeds'); } JToolbarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS'); JHtmlSidebar::setAction('index.php?option=com_newsfeeds&view=newsfeeds'); 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_newsfeeds'), 'value', 'text', $this->state->get('filter.category_id'))); 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'))); JHtmlSidebar::addFilter('-' . JText::_('JSELECT') . ' ' . JText::_('JTAG') . '-', 'filter_tag', JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag'))); }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $canDo = JHelperContent::getActions('com_proveedor', 'category', $this->state->get('filter.category_id')); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); // Titulo de vista proveedors y pongo icono users ya que no se como meter el nuestro en la plantilla administrador JToolbarHelper::title(JText::_('COM_PROVEEDOR_MANAGER_CONTACTS'), 'users proveedor'); if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_proveedor', 'core.create')) > 0) { JToolbarHelper::addNew('proveedor.add'); } if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolbarHelper::editList('proveedor.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('proveedors.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('proveedors.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::archiveList('proveedors.archive'); JToolbarHelper::checkin('proveedors.checkin'); } // Add a batch button if ($user->authorise('core.create', 'com_proveedors') && $user->authorise('core.edit', 'com_proveedors') && $user->authorise('core.edit.state', 'com_proveedors')) { $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'proveedors.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('proveedors.trash'); } if ($user->authorise('core.admin', 'com_proveedor') || $user->authorise('core.options', 'com_proveedor')) { JToolbarHelper::preferences('com_proveedor'); } JHtmlSidebar::setAction('index.php?option=com_proveedor'); 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_proveedor'), 'value', 'text', $this->state->get('filter.category_id'))); 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'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_TAG'), 'filter_tag', JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag'))); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/htraininglogs.php'; $state = $this->get('State'); $canDo = JHelperContent::getActions('com_htraininglogs', 'category', $state->get('filter.category_id')); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_HTRAININGLOGS_MANAGER_HtraininglogS'), 'link htraininglogs'); if (count($user->getAuthorisedCategories('com_htraininglogs', 'core.create')) > 0) { JToolbarHelper::addNew('htraininglog.add'); JToolBarHelper::custom('htraininglogs.thumbnails', 'icon', 'icon over', 'Thumbnails', true, true); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('htraininglog.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('htraininglogs.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('htraininglogs.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::archiveList('htraininglogs.archive'); JToolbarHelper::checkin('htraininglogs.checkin'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'htraininglogs.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('htraininglogs.trash'); } // Add a batch button if ($user->authorise('core.create', 'com_htraininglogs') && $user->authorise('core.edit', 'com_htraininglogs') && $user->authorise('core.edit.state', 'com_htraininglogs')) { JHtml::_('bootstrap.modal', 'collapseModal'); $name = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('name' => $name)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($user->authorise('core.admin', 'com_htraininglogs')) { JToolbarHelper::preferences('com_htraininglogs'); } JToolbarHelper::help('JHELP_COMPONENTS_HtraininglogS_LINKS'); JHtmlSidebar::setAction('index.php?option=com_htraininglogs&view=htraininglogs'); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true)); }
protected function addPublishButtons($delete = true) { $publishOptions = $this->getPublishOptions(); $filter_state = $this->state->get('filter.state'); if ((!array_key_exists('published', $publishOptions) || $publishOptions['published']) && $filter_state != 1) { JToolbarHelper::publishList($this->view . '.publish'); } if ((!array_key_exists('unpublish', $publishOptions) || $publishOptions['unpublish']) && $filter_state != '0') { JToolbarHelper::unpublishList($this->view . '.unpublish'); } if ((!array_key_exists('archived', $publishOptions) || $publishOptions['archived']) && $filter_state != 2) { JToolbarHelper::archiveList($this->view . '.archive'); } if ((!array_key_exists('trash', $publishOptions) || $publishOptions['trash']) && $filter_state != -2) { JToolbarHelper::trash($this->view . '.trash'); } elseif ($delete) { JToolbarHelper::deleteList('Are you sure?', $this->view . '.delete'); } }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = RedirectHelper::getActions(); JToolbarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINKS'), 'redirect'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('link.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('link.edit'); } if ($canDo->get('core.edit.state')) { if ($state->get('filter.state') != 2) { JToolbarHelper::divider(); JToolbarHelper::publish('links.publish', 'JTOOLBAR_ENABLE', true); JToolbarHelper::unpublish('links.unpublish', 'JTOOLBAR_DISABLE', true); } if ($state->get('filter.state') != -1) { JToolbarHelper::divider(); if ($state->get('filter.state') != 2) { JToolbarHelper::archiveList('links.archive'); } elseif ($state->get('filter.state') == 2) { JToolbarHelper::unarchiveList('links.publish', 'JTOOLBAR_UNARCHIVE'); } } } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'links.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolbarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('links.trash'); JToolbarHelper::divider(); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_redirect'); JToolbarHelper::divider(); } JToolbarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER'); JHtmlSidebar::setAction('index.php?option=com_redirect&view=links'); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', RedirectHelper::publishedOptions(), 'value', 'text', $this->state->get('filter.state'), true)); }
/** * Setting the toolbar */ protected function addToolBar($total = NULL) { JToolBarHelper::title(JText::_('COM_AGENDADIRIGENTES') . ': ' . JText::_('COM_AGENDADIRIGENTES_MANAGER_DIRIGENTES') . ($total ? ' <span style="font-size: 0.5em; vertical-align: middle;">(' . $total . ' ' . JText::_('COM_AGENDADIRIGENTES_ITEMS') . ')</span>' : '')); if ($this->canDo->get('dirigentes.create')) { JToolBarHelper::addNew('dirigente.add'); } if ($this->canDo->get('dirigentes.edit') || $this->canDo->get('dirigentes.edit.own')) { JToolBarHelper::editList('dirigente.edit'); } if ($this->canDo->get('dirigentes.edit.state')) { JToolBarHelper::publishList('dirigentes.publish'); JToolBarHelper::unpublishList('dirigentes.unpublish'); JToolbarHelper::archiveList('dirigentes.archive'); } if ($this->state->get('filter.state') == -2 && $this->canDo->get('dirigentes.delete')) { JToolbarHelper::deleteList('', 'dirigentes.delete'); } elseif ($this->canDo->get('dirigentes.edit.state')) { JToolbarHelper::trash('dirigentes.trash'); } JToolBarHelper::preferences('com_agendadirigentes'); }
/** * Add the page title and toolbar. * * @return void */ protected function addToolbar() { $canDo = PfmobileappwsHelper::getActions(); $user = JFactory::getUser(); JToolBarHelper::title(JText::_('Note'), 'generic.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('note.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('note.edit'); } if ($this->state->get('filter.state') != 2) { JToolbarHelper::publish('notes.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('notes.unpublish', 'JTOOLBAR_UNPUBLISH', true); } if ($canDo->get('core.edit.state')) { if ($this->state->get('filter.state') != -1) { if ($this->state->get('filter.state') != 2) { JToolbarHelper::archiveList('notes.archive'); } elseif ($this->state->get('filter.state') == 2) { JToolbarHelper::unarchiveList('notes.publish'); } } } if ($canDo->get('core.edit.state')) { JToolbarHelper::checkin('notes.checkin'); } if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'notes.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('notes.trash'); } JToolBarHelper::preferences('com_pfmobileappws', '550'); if (!version_compare(JVERSION, '3', '<')) { JHtmlSidebar::setAction('index.php?option=com_pfmobileappws&view=notes'); } if (!version_compare(JVERSION, '3', '<')) { JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true)); } }
protected function addToolbar() { $canDo = JHelperContent::getActions('com_places', 'point', $this->state->get('filter.point_id')); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_PLACES_POINTS_MANAGER'), 'home'); if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_places', 'core.create')) > 0) { JToolbarHelper::addNew('point.add'); } if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolbarHelper::editList('point.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('points.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('points.unpublish', 'JTOOLBAR_UNPUBLISH', true); // JToolbarHelper::custom('points.featured', 'featured.png', 'featured_f2.png', 'JFEATURE', true); // JToolbarHelper::custom('points.unfeatured', 'unfeatured.png', 'featured_f2.png', 'JUNFEATURE', true); JToolbarHelper::archiveList('points.archive'); JToolbarHelper::checkin('points.checkin'); } // Add a batch button if ($user->authorise('core.create', 'com_places') && $user->authorise('core.edit', 'com_places') && $user->authorise('core.edit.state', 'com_places')) { JHtml::_('bootstrap.modal', 'collapseModal'); $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'points.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('points.trash'); } if ($user->authorise('core.admin', 'com_places') || $user->authorise('core.options', 'com_places')) { JToolbarHelper::preferences('com_places'); } }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { /** @noinspection PhpIncludeInspection */ require_once JPATH_COMPONENT . '/helpers/catalogue.php'; /** @noinspection PhpUndefinedClassInspection */ $canDo = CatalogueHelper::getActions(); JToolbarHelper::title(JText::_('COM_CATALOGUE_MANAGER'), 'component.png'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('item.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('item.edit'); } if ($canDo->get('core.edit.state')) { if ($this->state->get('filter.state') != 2) { JToolbarHelper::publish('item.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('item.unpublish', 'JTOOLBAR_UNPUBLISH', true); } if ($this->state->get('filter.state') != -1) { if ($this->state->get('filter.published') != 2) { JToolbarHelper::archiveList('item.archive'); } elseif ($this->state->get('filter.state') == 2) { JToolbarHelper::unarchiveList('item.publish'); } } } if ($canDo->get('core.edit.state')) { JToolbarHelper::checkin('item.checkin'); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'catalogue.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('catalogue.trash'); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_catalogue'); } }
protected function addToolbar() { $state = $this->get('State'); $canDo = SimplefilemanagerHelper::getActions($state->get('filter.category_id')); $user = JFactory::getUser(); $bar = JToolBar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_SIMPLEFILEMANAGER_MANAGER_SIMPLEFILEMANAGERS'), 'file-2'); // User should be authorized to publish at least in a category if ($canDo->get('core.create') && count($user->getAuthorisedCategories('com_simplefilemanager', 'core.create')) > 0) { JToolbarHelper::addNew('simplefilemanager.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('simplefilemanager.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('simplefilemanagers.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('simplefilemanagers.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::archiveList('simplefilemanagers.archive'); JToolbarHelper::checkin('simplefilemanagers.checkin'); } $state = $this->get('State'); if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'simplefilemanagers.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('simplefilemanagers.trash'); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_simplefilemanager'); } JToolBarHelper::help('COM_SIMPLEFILEMANAGER_HELP_VIEW_SIMPLEFILEMANANGERS', false, 'http://www.simplefilemanager.eu/support'); JHtmlSidebar::setAction('index.php?option=com_simplefilemanager&view=simplefilemanagers'); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true)); $this->category = JFormHelper::loadFieldType('catid', false); $this->categoryOptions = $this->category->getOptions(); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category', JHtml::_('select.options', $this->categoryOptions, 'value', 'text', $this->state->get('filter.category'))); $this->visibilityOptions = array(1 => JText::_('COM_SIMPLEFILEMANAGER_VISIBILITY_PUBLIC'), 2 => JText::_('COM_SIMPLEFILEMANAGER_VISIBILITY_REGISTRED'), 3 => JText::_('COM_SIMPLEFILEMANAGER_VISIBILITY_USER'), 4 => JText::_('COM_SIMPLEFILEMANAGER_VISIBILITY_GROUP'), 5 => JText::_('COM_SIMPLEFILEMANAGER_VISIBILITY_AUTHOR')); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_VISIBILITY'), 'filter_visibility', JHtml::_('select.options', $this->visibilityOptions, 'value', 'text', $this->state->get('filter.visibility'))); }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $canDo = JHelperContent::getActions('com_contact', 'category', $this->state->get('filter.category_id')); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolbar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACTS'), 'address contact'); if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0) { JToolbarHelper::addNew('contact.add'); } if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolbarHelper::editList('contact.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('contacts.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('contacts.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::archiveList('contacts.archive'); JToolbarHelper::checkin('contacts.checkin'); } // Add a batch button if ($user->authorise('core.create', 'com_contacts') && $user->authorise('core.edit', 'com_contacts') && $user->authorise('core.edit.state', 'com_contacts')) { $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'contacts.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('contacts.trash'); } if ($user->authorise('core.admin', 'com_contact') || $user->authorise('core.options', 'com_contact')) { JToolbarHelper::preferences('com_contact'); } JToolbarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS'); JHtmlSidebar::setAction('index.php?option=com_contact'); }
/** * Add the page title and toolbar. * * @return void */ protected function addToolbar() { $this->canDo = MarketplaceHelper::getActions(); if (!$this->canDo->get('repositories.manage')) { JFactory::getApplication()->redirect('index.php?option=com_marketplace', JText::_('COM_MARKETPLACE_NO_AUTH')); } JToolBarHelper::title(JText::_('COM_MARKETPLACE_HEADER_' . $this->getName()), 'marketplace.png'); if ($this->canDo->get('repositories.manage.state') && !empty($this->items)) { JToolbarHelper::custom($this->getName() . '.reset', 'time', 'time', JText::_('COM_MARKETPLACE_BUTTON_RESET_TIMESTAMP')); JToolbarHelper::archiveList($this->getName() . '.archive'); JToolbarHelper::unpublishList($this->getName() . '.unpublish'); JToolbarHelper::publishList($this->getName() . '.publish'); JToolbarHelper::divider(); } if ($this->canDo->get('core.delete') && !empty($this->items)) { JToolbarHelper::deleteList('', $this->getName() . '.delete', 'JTOOLBAR_DELETE'); JToolbarHelper::divider(); } if ($this->canDo->get('core.admin')) { JToolbarHelper::preferences('com_marketplace'); JToolbarHelper::divider(); } MarketplaceHelper::addSubmenu($this->getName()); }