예제 #1
0
파일: view.html.php 프로젝트: naka211/jydsk
 /**
  * Add the page title and toolbar.
  */
 protected function addToolbar()
 {
     $canDo = JfoobarsHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('COM_JFOOBARS_JFOOBARS_TITLE'), 'jfoobar.png');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_jfoobars', 'core.create')) > 0) {
         JToolBarHelper::addNew('jfoobar.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('jfoobar.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('jfoobars.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('jfoobars.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::checkin('jfoobars.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'jfoobars.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('jfoobars.trash');
             JToolBarHelper::divider();
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_jfoobars');
         JToolBarHelper::divider();
     }
 }
예제 #2
0
 /**
  * Add the page title and toolbar.
  *
  * @return void
  */
 protected function addToolbar()
 {
     $name = $this->getName();
     $tag = strtoupper($name);
     $singular = BabioonAdHelper::toSingular($name);
     $doc = JFactory::getDocument();
     if (file_exists(JPATH_BASE . '/media/babioon/images/icon-48-babioon-' . $name . '.png')) {
         $doc->addStyleDeclaration('.icon-48-babioon-' . $name . ' {background-image: url(../media/babioon/images/icon-48-babioon-' . $name . '.png);}');
         $image = 'babioon-' . $name . '.png';
     } else {
         $doc->addStyleDeclaration('.icon-48-babioon {background-image: url(../media/babioon/images/icon-48-babioon.png);}');
         $image = 'babioon.png';
     }
     $user = JFactory::getUser();
     $canDo = BabioonAdHelper::getActions($singular);
     JToolBarHelper::title(JText::_('COM_BABIOONAD_' . $tag), $image);
     // Use sigular
     JToolBarHelper::editList($singular . '.edit');
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish($name . '.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish($name . '.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::checkin($name . '.checkin');
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::divider();
         JToolBarHelper::deleteList('', $name . '.delete');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_babioonad');
     }
 }
예제 #3
0
 /**
  * Setting the toolbar
  *
  * @since   2.0.0
  */
 protected function addToolbar()
 {
     // Load specific css component
     JHtml::_('stylesheet', 'com_externallogin/administrator/externallogin.css', array(), true);
     // Set the toolbar
     JToolBarHelper::title(JText::_('COM_EXTERNALLOGIN_MANAGER_SERVERS'), 'database');
     $bar = JToolBar::getInstance('toolbar');
     $bar->appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_externallogin&view=plugins&tmpl=component', 875, 550, 0, 0, '');
     JToolBarHelper::editList('server.edit');
     JToolBarHelper::publishList('servers.publish');
     JToolBarHelper::unpublishList('servers.unpublish');
     JToolBarHelper::checkin('servers.checkin');
     if ($this->state->get('filter.published') == -2) {
         JToolBarHelper::deleteList('COM_EXTERNALLOGIN_MSG_SERVERS_DELETE', 'servers.delete');
     } else {
         JToolBarHelper::archiveList('servers.archive');
         JToolBarHelper::trash('servers.trash');
     }
     JToolBarHelper::preferences('com_externallogin');
     JHtml::_('sidebar.addentry', JText::_('COM_EXTERNALLOGIN_SUBMENU_SERVERS'), 'index.php?option=com_externallogin', true);
     JHtml::_('sidebar.addentry', JText::_('COM_EXTERNALLOGIN_SUBMENU_USERS'), 'index.php?option=com_externallogin&view=users', false);
     JHtml::_('sidebar.addentry', JText::_('COM_EXTERNALLOGIN_SUBMENU_LOGS'), 'index.php?option=com_externallogin&view=logs', false);
     JHtml::_('sidebar.addentry', JText::_('COM_EXTERNALLOGIN_SUBMENU_ABOUT'), 'index.php?option=com_externallogin&view=about', false);
     JHtml::_('sidebar.setaction', 'index.php?option=com_externallogin&view=servers');
     JHtml::_('sidebar.addFilter', JText::_('COM_EXTERNALLOGIN_OPTION_SELECT_PLUGIN'), 'filter_plugin', JHtml::_('select.options', ExternalloginHelper::getPlugins(), 'value', 'text', $this->state->get('filter.plugin'), true));
     JHtml::_('sidebar.addFilter', JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true));
 }
예제 #4
0
	/**
	 * Add Toolbar
	 */
	protected function addToolbar()
	{
		JToolBarHelper::title(JText::_('COM_JEM_GROUPS'), 'groups');

		/* retrieving the allowed actions for the user */
		$canDo = JEMHelperBackend::getActions(0);

		/* create */
		if (($canDo->get('core.create'))) {
			JToolBarHelper::addNew('group.add');
		}

		/* edit */
		if (($canDo->get('core.edit'))) {
			JToolBarHelper::editList('group.edit');
			JToolBarHelper::divider();
		}

		if ($canDo->get('core.edit.state')) {
			JToolBarHelper::checkin('groups.checkin');
		}

		JToolBarHelper::deleteList('COM_JEM_CONFIRM_DELETE', 'groups.remove', 'JACTION_DELETE');

		JToolBarHelper::divider();
		JToolBarHelper::help('listgroups', true);
	}
예제 #5
0
파일: view.html.php 프로젝트: MrJookie/pm
 /**
  * Adds the page title and toolbar.
  *
  */
 protected function addToolbar()
 {
     $user = JFactory::getUser();
     $asset = 'com_pfdesigns';
     JToolBarHelper::title(JText::_('COM_PROJECTFORK_DESIGNS_ALBUMS_TITLE'), 'article.png');
     if ($user->authorise('core.create', $asset)) {
         JToolBarHelper::addNew('album.add');
     }
     if ($user->authorise('core.edit', $asset) || $user->authorise('core.edit.own', $asset)) {
         JToolBarHelper::editList('album.edit');
     }
     if ($user->authorise('core.edit.state', $asset)) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('albums.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('albums.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('albums.archive');
         JToolBarHelper::checkin('albums.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $user->authorise('core.delete', $asset)) {
         JToolBarHelper::deleteList('', 'albums.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($user->authorise('core.edit.state', $asset)) {
         JToolBarHelper::trash('albums.trash');
         JToolBarHelper::divider();
     }
     if (version_compare(JVERSION, '3', 'ge')) {
         JHtmlSidebar::setAction('index.php?option=com_pfdesigns&view=albums');
         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_AUTHOR'), 'filter_author_id', JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id')));
     }
 }
예제 #6
0
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/wedding.php';
     $canDo = WeddingHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('COM_WEDDING_MANAGER_STORIES'), 'stories.png');
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             //				JToolBarHelper::divider();
             JToolBarHelper::publish('stories.publish', 'JTOOLBAR_PUBLISH', true);
             JToolBarHelper::unpublish('stories.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.state') != -1) {
             JToolBarHelper::divider();
             if ($this->state->get('filter.state') != 2) {
                 JToolBarHelper::archiveList('stories.archive');
             } elseif ($this->state->get('filter.state') == 2) {
                 JToolBarHelper::unarchiveList('stories.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::checkin('stories.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'stories.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('stories.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_wedding');
     }
 }
예제 #7
0
 /**
  * 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::divider();
         JToolBarHelper::publish('clients.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('clients.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         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');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('clients.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_banners');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS');
 }
예제 #8
0
 /**
  * Add Toolbar
  */
 protected function addToolbar()
 {
     JToolBarHelper::title(JText::_('COM_JEM_VENUES'), 'venues');
     $canDo = JEMHelperBackend::getActions(0);
     /* create */
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('venue.add');
     }
     /* edit */
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('venue.edit');
         JToolBarHelper::divider();
     }
     /* state */
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.published') != 2) {
             JToolBarHelper::publishList('venues.publish');
             JToolBarHelper::unpublishList('venues.unpublish');
             JToolBarHelper::divider();
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::checkin('venues.checkin');
     }
     /* delete-trash */
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('COM_JEM_CONFIRM_DELETE', 'venues.remove', 'JACTION_DELETE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('listvenues', true);
 }
예제 #9
0
파일: view.html.php 프로젝트: Tommar/remate
 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     JToolBarHelper::addNew('portfolio.add');
     JToolBarHelper::editList('portfolio.edit');
     JToolBarHelper::custom('portfolios.rebuild', 'refresh.png', 'refresh_f2.png', 'COM_BT_PORTFOLIO_PORTFOLIOS_REBUILD_IMAGES', false);
     JToolBarHelper::divider();
     JToolBarHelper::title(JText::_('COM_BT_PORTFOLIO_PORTFOLIOS_MANAGER'), 'portfolio.png');
     JToolBarHelper::publish('portfolios.publish', 'JTOOLBAR_PUBLISH', true);
     JToolBarHelper::unpublish('portfolios.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     JToolBarHelper::custom('portfolios.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
     JToolBarHelper::divider();
     JToolBarHelper::checkin('portfolios.checkin');
     JToolBarHelper::deleteList('', 'portfolios.delete');
     JToolBarHelper::preferences('com_bt_portfolio');
     $this->sidebar = '';
     Bt_portfolioHelper::addSubmenu(JRequest::getCmd('view', 'cpanel'));
     //added since 2.0 for j3.0
     if (!$this->legacy) {
         JHtmlSidebar::setAction('index.php?option=com_bt_portfolio&view=portfolios');
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', Bt_portfolioHelper::getPublishedOptions(), 'value', 'text', $this->state->get('filter.published'), true));
         JHtmlSidebar::addFilter(JText::_('COM_BT_PORTFOLIO_SELECT_FEATURED'), 'filter_featured', JHtml::_('select.options', Bt_portfolioHelper::getFeaturedOptions(), 'value', 'text', $this->state->get('filter.featured'), true));
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_catid', JHtml::_('select.options', Bt_portfolioHelper::getCategoryOptions(), 'value', 'text', $this->state->get('filter.catid')));
         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')));
         $this->sidebar = JHtmlSidebar::render();
     }
 }
예제 #10
0
파일: view.html.php 프로젝트: bubujie/xixia
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/faqs.php';
     $state = $this->get('State');
     $canDo = FaqsHelper::getActions($state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('COM_FAQS_MANAGER_FAQS'), 'faqs.png');
     if (count($user->getAuthorisedCategories('com_faqs', 'core.create')) > 0) {
         JToolBarHelper::addNew('faq.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('faq.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('faqs.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('faqs.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('faqs.archive');
         JToolBarHelper::checkin('faqs.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'faqs.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('faqs.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_faqs');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_COMPONENTS_FAQS_LINKS');
 }
예제 #11
0
 /**
  * Add Toolbar
  */
 protected function addToolbar()
 {
     JToolBarHelper::title(JText::_('COM_JEM_EVENTS'), 'events');
     /* retrieving the allowed actions for the user */
     $canDo = JEMHelperBackend::getActions(0);
     /* create */
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('event.add');
     }
     /* edit */
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('event.edit');
         JToolBarHelper::divider();
     }
     /* state */
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::publishList('events.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublishList('events.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::custom('events.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
         JToolBarHelper::archiveList('events.archive');
         JToolBarHelper::checkin('events.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('COM_JEM_CONFIRM_DELETE', 'events.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('events.trash');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('listevents', true);
 }
예제 #12
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = RentalHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('COM_RENTAL_MANAGER_LOCATIONS'), 'location.png');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_rental', 'core.create')) > 0) {
         JToolBarHelper::addNew('location.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('location.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('locations.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('locations.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('locations.archive');
         JToolBarHelper::checkin('locations.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'locations.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('locations.trash');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_rental');
     }
 }
예제 #13
0
 /**
  * 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::divider();
         JToolBarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('articles.archive');
         JToolBarHelper::checkin('articles.checkin');
         JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::trash('articles.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_content');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
 }
예제 #14
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $state = $this->get('State');
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('licenses');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_LICENSES'), 'jdlicenses');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('license.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('license.edit');
         JToolBarHelper::divider();
         JToolBarHelper::checkin('licenses.checkin');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('licenses.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('licenses.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList(JText::_('COM_JDOWNLOADS_DELETE_LIST_ITEM_CONFIRMATION'), 'licenses.delete', 'COM_JDOWNLOADS_TOOLBAR_REMOVE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('help.licenses', true);
 }
예제 #15
0
 /**
  * Установки тулбара
  */
 protected function _setToolBar()
 {
     require_once JPATH_COMPONENT . '/helpers/smfaq.php';
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     SmFaqHelper::addSubmenu($this->_name);
     $canDo = SmFaqHelper::getActions($this->state->get('filter.category_id'));
     // Выводим нужные кнопки и заголовок
     JToolBarHelper::title(JText::_('COM_SMFAQ_MANAGER_QUESTIONS'), 'smfaq');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNewX('smfaq.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editListX('smfaq.edit', 'JTOOLBAR_EDIT');
     }
     JToolBarHelper::divider();
     JToolBarHelper::custom('smfaqlist.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
     JToolBarHelper::custom('smfaqlist.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
     JToolBarHelper::divider();
     JToolBarHelper::checkin('smfaqlist.checkin');
     // Замена тулбара карзины на удаление
     if ($this->state->get('filter.published') == -2) {
         JToolBarHelper::deleteList('COM_SMFAQ_YOU_WANT_DELETE_THIS', 'smfaqlist.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         JToolBarHelper::trash('smfaqlist.trash', 'JTOOLBAR_TRASH');
     }
     JToolBarHelper::divider();
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_smfaq');
     }
 }
예제 #16
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/j2xml.php';
     $canDo = J2XMLHelper::getActions();
     $doc = JFactory::getDocument();
     $icon_48_websites = " .icon-48-websites {background:url(../media/com_j2xml/images/icon-48-websites.png) no-repeat; }";
     $doc->addStyleDeclaration($icon_48_websites);
     JToolBarHelper::title(JText::_('COM_J2XML_MANAGER_WEBSITES'), 'websites.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('website.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('website.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('websites.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('websites.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::checkin('websites.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'websites.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('websites.trash');
     }
 }
예제 #17
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/rokcandy.php';
     $option = JFactory::getApplication()->input->get('option');
     $view = JFactory::getApplication()->input->get('view');
     $lang = JFactory::getLanguage();
     $canDo = RokCandyHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('COM_ROKCANDY_MANAGER_MACRO'), 'rokcandy.png');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_rokcandy', 'core.create')) > 0) {
         JToolBarHelper::addNew('candymacro.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('candymacro.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('candymacros.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('candymacros.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('candymacros.archive');
         JToolBarHelper::checkin('candymacros.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'candymacros.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('candymacros.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_rokcandy');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help(strtoupper($option) . '_' . strtoupper($view) . '_HELP_URL', TRUE, '', $option);
     $version = new JVersion();
     if (version_compare($version->getShortVersion(), '3.0', '>=')) {
         JHtmlSidebar::setAction('index.php?option=com_rokcandy');
         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_rokcandy'), 'value', 'text', $this->state->get('filter.category_id')));
     }
 }
예제 #18
0
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jnt_hanhphuc.php';
     $canDo = Jnt_HanhphucHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('Albums Manager'), 'article.png');
     //		if (count($user->getAuthorisedCategories('com_jnt_hanhphuc', 'core.create')) > 0)
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('album.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('album.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             JToolBarHelper::divider();
             JToolBarHelper::publish('albums.publish', 'JTOOLBAR_PUBLISH', true);
             JToolBarHelper::unpublish('albums.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.state') != -1) {
             JToolBarHelper::divider();
             if ($this->state->get('filter.state') != 2) {
                 JToolBarHelper::archiveList('albums.archive');
             } elseif ($this->state->get('filter.state') == 2) {
                 JToolBarHelper::unarchiveList('albums.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::checkin('albums.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'albums.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('albums.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_jnt_hanhphuc');
     }
 }
예제 #19
0
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jnt_hanhphuc.php';
     $canDo = Jnt_HanhPhucHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('COM_JNT_HANHPHUC_MANAGER_BANNERS'), 'banners.png');
     if (count($user->getAuthorisedCategories('com_jnt_hanhphuc', 'core.create')) > 0) {
         JToolBarHelper::addNew('service.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('service.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             JToolBarHelper::divider();
             JToolBarHelper::publish('services.publish', 'JTOOLBAR_PUBLISH', true);
             JToolBarHelper::unpublish('services.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.state') != -1) {
             JToolBarHelper::divider();
             if ($this->state->get('filter.state') == 2) {
                 JToolBarHelper::unarchiveList('banners.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::checkin('services.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'services.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('services.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_jnt_hanhphuc');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS');
 }
예제 #20
0
파일: view.html.php 프로젝트: ngxuanmui/hp3
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/hp_comment.php';
     $canDo = Hp_CommentHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('HP Comments Manager'), 'comments.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('comment.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('comment.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             JToolBarHelper::divider();
             JToolBarHelper::publish('comments.publish', 'JTOOLBAR_PUBLISH', true);
             JToolBarHelper::unpublish('comments.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.state') != -1) {
             JToolBarHelper::divider();
             if ($this->state->get('filter.state') != 2) {
                 JToolBarHelper::archiveList('comments.archive');
             } elseif ($this->state->get('filter.state') == 2) {
                 JToolBarHelper::unarchiveList('comments.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::checkin('comments.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'comments.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('comments.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_hp_comment');
     }
 }
예제 #21
0
파일: view.html.php 프로젝트: Tommar/remate
 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     JToolBarHelper::addNew('extrafield.add');
     JToolBarHelper::editList('extrafield.edit');
     JToolBarHelper::divider();
     JToolBarHelper::title(JText::_('COM_BT_PORTFOLIO_EXTRAFIELDS_MANAGER'), 'article.png');
     JToolBarHelper::publish('extrafields.publish', 'JTOOLBAR_PUBLISH', true);
     JToolBarHelper::unpublish('extrafields.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     JToolBarHelper::divider();
     JToolBarHelper::checkin('extrafields.checkin');
     JToolBarHelper::deleteList('', 'extrafields.delete');
     JToolBarHelper::preferences('com_bt_portfolio');
     $this->sidebar = '';
     Bt_portfolioHelper::addSubmenu(JRequest::getCmd('view', 'cpanel'));
     //added since 2.0 for j3.0
     if (!$this->legacy) {
         JHtmlSidebar::setAction('index.php?option=com_bt_portfolio&view=extrafields');
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', Bt_portfolioHelper::getPublishedOptions(), 'value', 'text', $this->state->get('filter.published'), true));
         JHtmlSidebar::addFilter(JText::_('COM_BT_PORTFOLIO_SELECT_TYPE'), 'filter_type', JHtml::_('select.options', Bt_portfolioHelper::getTypeOptions(), 'value', 'text', $this->state->get('filter.type'), true));
         $this->sidebar = JHtmlSidebar::render();
     }
 }
예제 #22
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = PluginsHelper::getActions();
     JToolBarHelper::title(JText::_('COM_PLUGINS_MANAGER_PLUGINS'), 'plugin');
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('plugin.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('plugins.publish', 'JTOOLBAR_ENABLE', true);
         JToolBarHelper::unpublish('plugins.unpublish', 'JTOOLBAR_DISABLE', true);
         JToolBarHelper::divider();
         JToolBarHelper::checkin('plugins.checkin');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_plugins');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_EXTENSIONS_PLUGIN_MANAGER');
 }
예제 #23
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = ModulesHelper::getActions();
     JToolBarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES'), 'module.png');
     if ($canDo->get('core.create')) {
         //JToolBarHelper::addNew('module.add');
         $bar = JToolBar::getInstance('toolbar');
         $bar->appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_modules&view=select&tmpl=component', 850, 400);
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('module.edit');
     }
     if ($canDo->get('core.create')) {
         JToolBarHelper::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::checkin('modules.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('modules.trash');
             JToolBarHelper::divider();
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_modules');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_EXTENSIONS_MODULE_MANAGER');
 }
예제 #24
0
 /**
  * Add the page title and toolbar.
  */
 protected function addToolbar()
 {
     $doc = JFactory::getDocument();
     $doc->addStyleDeclaration('.icon-48-babioon {background-image: url(../media/babioon/images/icon-48-babioon.png);}');
     $user = JFactory::getUser();
     $canDo = BabioonDownloadHelpers::getActions();
     JToolBarHelper::title(JText::_('COM_BABIOONDOWNLOAD_DOWNLOADS'), 'babioon.png');
     JToolBarHelper::addNew('download.add');
     JToolBarHelper::editList('download.edit');
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             JToolBarHelper::divider();
             JToolBarHelper::publish('download.publish', 'JTOOLBAR_PUBLISH', true);
             JToolBarHelper::unpublish('download.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.state') != -1) {
             JToolBarHelper::divider();
             if ($this->state->get('filter.state') != 2) {
                 JToolBarHelper::archiveList('download.archive');
             } elseif ($this->state->get('filter.state') == 2) {
                 JToolBarHelper::unarchiveList('download.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::checkin('download.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'download.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('download.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_babioondownload');
     }
 }
예제 #25
0
파일: view.html.php 프로젝트: ngxuanmui/hp3
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = Jnt_HanhPhucHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('Hanhphuc.vn: Manager Services'), 'banners.png');
     if (count($user->getAuthorisedCategories('com_jnt_hanhphuc', 'core.create')) > 0) {
         JToolBarHelper::addNew('service.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('service.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             JToolBarHelper::divider();
             JToolBarHelper::publish('services.publish', 'JTOOLBAR_PUBLISH', true);
             JToolBarHelper::unpublish('services.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.state') != -1) {
             JToolBarHelper::divider();
             if ($this->state->get('filter.state') == 2) {
                 JToolBarHelper::unarchiveList('banners.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::checkin('services.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'services.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('services.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_jnt_hanhphuc');
     }
 }
예제 #26
0
 /**
  * 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();
     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::divider();
         JToolBarHelper::publish('newsfeeds.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('newsfeeds.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('newsfeeds.archive');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::checkin('newsfeeds.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'newsfeeds.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('newsfeeds.trash');
             JToolBarHelper::divider();
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_newsfeeds');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS');
 }
예제 #27
0
 /**
  * Add the page title and toolbar.
  */
 protected function addToolbar()
 {
     // Initialise variables.
     $canDo = null;
     $user = JFactory::getUser();
     // Get the results for each action.
     $canDo = JEMHelperBackend::getActions(0);
     JToolBarHelper::title(JText::_('COM_JEM_CATEGORIES'), 'elcategories');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('category.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('category.edit');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::publish('categories.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('categories.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('categories.archive');
     }
     if (JFactory::getUser()->authorise('core.admin')) {
         JToolBarHelper::checkin('categories.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('COM_JEM_CONFIRM_DELETE', 'categories.remove', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('categories.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('categories.rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false);
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('listcategories', true);
 }
예제 #28
0
 function display($tpl = null)
 {
     //initialise variables
     global $globalcats;
     $app = JFactory::getApplication();
     $option = JRequest::getVar('option');
     $view = JRequest::getVar('view');
     $user = JFactory::getUser();
     $db = JFactory::getDBO();
     $document = JFactory::getDocument();
     $cparams = JComponentHelper::getParams('com_flexicontent');
     $print_logging_info = $cparams->get('print_logging_info');
     if ($print_logging_info) {
         global $fc_run_times;
     }
     JHTML::_('behavior.tooltip');
     //get vars
     $order_property = !FLEXI_J16GE ? 'c.ordering' : 'c.lft';
     $filter_order = $app->getUserStateFromRequest($option . '.' . $view . '.filter_order', 'filter_order', $order_property, 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest($option . '.' . $view . '.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_state = $app->getUserStateFromRequest($option . '.' . $view . '.filter_state', 'filter_state', '', 'string');
     $filter_cats = $app->getUserStateFromRequest($option . '.' . $view . '.filter_cats', 'filter_cats', '', 'int');
     $filter_level = $app->getUserStateFromRequest($option . '.' . $view . '.filter_level', 'filter_level', '', 'string');
     $filter_access = $app->getUserStateFromRequest($option . '.' . $view . '.filter_access', 'filter_access', '', 'string');
     if (FLEXI_J16GE) {
         $filter_language = $app->getUserStateFromRequest($option . '.' . $view . '.filter_language', 'filter_language', '', 'string');
     }
     $search = $app->getUserStateFromRequest($option . '.' . $view . '.search', 'search', '', 'string');
     $search = FLEXI_J16GE ? $db->escape(trim(JString::strtolower($search))) : $db->getEscaped(trim(JString::strtolower($search)));
     // Prepare the document: add css files, etc
     $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/flexicontentbackend.css');
     if (FLEXI_J30GE) {
         $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j3x.css');
     } else {
         if (FLEXI_J16GE) {
             $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j25.css');
         } else {
             $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j15.css');
         }
     }
     // Get User's Global Permissions
     $perms = FlexicontentHelperPerm::getPerm();
     // Create Submenu (and also check access to current view)
     FLEXISubmenu('CanCats');
     // Create document/toolbar titles
     $doc_title = JText::_('FLEXI_CATEGORIES');
     $site_title = $document->getTitle();
     JToolBarHelper::title($doc_title, 'fc_categories');
     $document->setTitle($doc_title . ' - ' . $site_title);
     // ******************
     // Create the toolbar
     // ******************
     $js = "window.addEvent('domready', function(){";
     $contrl = FLEXI_J16GE ? "categories." : "";
     $contrl_singular = FLEXI_J16GE ? "category." : "";
     $toolbar = JToolBar::getInstance('toolbar');
     // Copy Parameters
     $btn_task = '';
     $popup_load_url = JURI::base() . 'index.php?option=com_flexicontent&view=categories&layout=params&tmpl=component';
     if (FLEXI_J30GE || !FLEXI_J16GE) {
         // Layout of Popup button broken in J3.1, add in J1.5 it generates duplicate HTML tag id (... just for validation), so add manually
         $js .= "\n\t\t\t\tjQuery('#toolbar-params a.toolbar, #toolbar-params button')\n\t\t\t\t\t.attr('onclick', 'javascript:;')\n\t\t\t\t\t.attr('href', '" . $popup_load_url . "')\n\t\t\t\t\t.attr('rel', '{handler: \\'iframe\\', size: {x: 600, y: 440}, onClose: function() {}}');\n\t\t\t";
         JToolBarHelper::custom($btn_task, 'params.png', 'params_f2.png', 'FLEXI_COPY_PARAMS', false);
         JHtml::_('behavior.modal', '#toolbar-params a.toolbar, #toolbar-params button');
     } else {
         $toolbar->appendButton('Popup', 'params', JText::_('FLEXI_COPY_PARAMS'), str_replace('&', '&', $popup_load_url), 600, 440);
     }
     //if (FLEXI_J16GE)
     //	$toolbar->appendButton('Popup', 'move', JText::_('FLEXI_COPY_MOVE'), JURI::base().'index.php?option=com_flexicontent&view=categories&layout=batch&tmpl=component', 800, 440);
     JToolBarHelper::divider();
     $add_divider = false;
     if (!FLEXI_J16GE || $user->authorise('core.create', 'com_flexicontent')) {
         $cancreate_cat = true;
     } else {
         $usercats = FlexicontentHelperPerm::getAllowedCats($user, $actions_allowed = array('core.create'), $require_all = true, $check_published = true, $specific_catids = false, $find_first = true);
         $cancreate_cat = count($usercats) > 0;
     }
     if ($cancreate_cat) {
         JToolBarHelper::addNew($contrl_singular . 'add');
         $add_divider = true;
     }
     if (!FLEXI_J16GE || ($user->authorise('core.edit', 'com_flexicontent') || $user->authorise('core.edit.own', 'com_flexicontent'))) {
         JToolBarHelper::editList($contrl_singular . 'edit');
         $add_divider = true;
     }
     if (FLEXI_J16GE && $user->authorise('core.admin', 'checkin')) {
         JToolBarHelper::checkin($contrl . 'checkin');
         $add_divider = true;
     }
     if ($add_divider) {
         JToolBarHelper::divider();
     }
     $add_divider = false;
     if (!FLEXI_J16GE || ($user->authorise('core.edit.state', 'com_flexicontent') || $user->authorise('core.edit.state.own', 'com_flexicontent'))) {
         JToolBarHelper::publishList($contrl . 'publish');
         JToolBarHelper::unpublishList($contrl . 'unpublish');
         JToolBarHelper::divider();
         if (FLEXI_J16GE) {
             JToolBarHelper::archiveList($contrl . 'archive');
         }
     }
     $add_divider = false;
     if (!FLEXI_J16GE || $filter_state == -2 && $user->authorise('core.delete', 'com_flexicontent')) {
         //JToolBarHelper::deleteList(JText::_('FLEXI_ARE_YOU_SURE'), $contrl.'remove');
         // This will work in J2.5+ too and is offers more options (above a little bogus in J1.5, e.g. bad HTML id tag)
         $msg_alert = JText::sprintf('FLEXI_SELECT_LIST_ITEMS_TO', JText::_('FLEXI_DELETE'));
         $msg_confirm = JText::_('FLEXI_ITEMS_DELETE_CONFIRM');
         $btn_task = $contrl . 'remove';
         $extra_js = "";
         flexicontent_html::addToolBarButton('FLEXI_DELETE', 'delete', '', $msg_alert, $msg_confirm, $btn_task, $extra_js, $btn_list = true, $btn_menu = true, $btn_confirm = true);
         $add_divider = true;
     } elseif ($user->authorise('core.edit.state', 'com_flexicontent')) {
         JToolBarHelper::trash($contrl . 'trash');
         $add_divider = true;
     }
     if ($add_divider) {
         JToolBarHelper::divider();
     }
     if ($perms->CanConfig) {
         //JToolBarHelper::custom($contrl.'rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false);
         $session = JFactory::getSession();
         $fc_screen_width = (int) $session->get('fc_screen_width', 0, 'flexicontent');
         $_width = $fc_screen_width && $fc_screen_width - 84 > 940 ? $fc_screen_width - 84 > 1400 ? 1400 : $fc_screen_width - 84 : 940;
         $fc_screen_height = (int) $session->get('fc_screen_height', 0, 'flexicontent');
         $_height = $fc_screen_height && $fc_screen_height - 128 > 550 ? $fc_screen_height - 128 > 1000 ? 1000 : $fc_screen_height - 128 : 550;
         JToolBarHelper::preferences('com_flexicontent', $_height, $_width, 'Configuration');
     }
     $js .= "});";
     $document->addScriptDeclaration($js);
     //Get data from the model
     if ($print_logging_info) {
         $start_microtime = microtime(true);
     }
     if (FLEXI_J16GE) {
         $rows = $this->get('Items');
     } else {
         $rows = $this->get('Data');
     }
     if ($print_logging_info) {
         @($fc_run_times['execute_main_query'] += round(1000000 * 10 * (microtime(true) - $start_microtime)) / 10);
     }
     // Get assigned items
     $model = $this->getModel();
     $rowids = array();
     foreach ($rows as $row) {
         $rowids[] = $row->id;
     }
     if ($print_logging_info) {
         $start_microtime = microtime(true);
     }
     $rowtotals = $model->getAssignedItems($rowids);
     if ($print_logging_info) {
         @($fc_run_times['execute_sec_queries'] += round(1000000 * 10 * (microtime(true) - $start_microtime)) / 10);
     }
     foreach ($rows as $row) {
         $row->nrassigned = isset($rowtotals[$row->id]) ? $rowtotals[$row->id]->nrassigned : 0;
     }
     // Parse configuration for every category
     foreach ($rows as $cat) {
         $cat->config = FLEXI_J16GE ? new JRegistry($cat->config) : new JParameter($cat->config);
     }
     if (FLEXI_J16GE) {
         $this->state = $this->get('State');
         // Preprocess the list of items to find ordering divisions.
         foreach ($rows as &$item) {
             $this->ordering[$item->parent_id][] = $item->id;
         }
     }
     $pagination = $this->get('Pagination');
     $categories =& $globalcats;
     $lists['copyid'] = flexicontent_cats::buildcatselect($categories, 'copycid', '', 2, 'class="inputbox"', false, true, $actions_allowed = array('core.edit'));
     $lists['destid'] = flexicontent_cats::buildcatselect($categories, 'destcid[]', '', false, 'class="inputbox" size="15" multiple="true"', false, true, $actions_allowed = array('core.edit'));
     // *******************
     // Create Form Filters
     // *******************
     // filter by a category (it's subtree will be displayed)
     $categories = $globalcats;
     $lists['cats'] = flexicontent_cats::buildcatselect($categories, 'filter_cats', $filter_cats, 2, 'class="inputbox" size="1" onchange="this.form.submit();"', $check_published = true, $check_perms = false);
     // filter depth level
     $options = array();
     $options[] = JHtml::_('select.option', '', JText::_('FLEXI_SELECT_MAX_DEPTH'));
     for ($i = 1; $i <= 10; $i++) {
         $options[] = JHtml::_('select.option', $i, $i);
     }
     $fieldname = $elementid = 'filter_level';
     $attribs = ' size="1" class="inputbox" onchange="this.form.submit();" ';
     $lists['level'] = JHTML::_('select.genericlist', $options, $fieldname, $attribs, 'value', 'text', $filter_level, $elementid, $translate = true);
     // filter publication state
     if (FLEXI_J16GE) {
         $options = JHtml::_('jgrid.publishedOptions');
         array_unshift($options, JHtml::_('select.option', '', JText::_('JOPTION_SELECT_PUBLISHED')));
         $fieldname = $elementid = 'filter_state';
         $attribs = ' size="1" class="inputbox" onchange="Joomla.submitform()" ';
         $lists['state'] = JHTML::_('select.genericlist', $options, $fieldname, $attribs, 'value', 'text', $filter_state, $elementid, $translate = true);
     } else {
         $lists['state'] = JHTML::_('grid.state', $filter_state);
     }
     if (FLEXI_J16GE) {
         // filter access level
         $options = JHtml::_('access.assetgroups');
         array_unshift($options, JHtml::_('select.option', '', JText::_('JOPTION_SELECT_ACCESS')));
         $fieldname = $elementid = 'filter_access';
         $attribs = ' size="1" class="inputbox" onchange="Joomla.submitform()" ';
         $lists['access'] = JHTML::_('select.genericlist', $options, $fieldname, $attribs, 'value', 'text', $filter_access, $elementid, $translate = true);
         // filter language
         $lists['language'] = flexicontent_html::buildlanguageslist('filter_language', 'size="1" class="inputbox" onchange="submitform();"', $filter_language, 2);
     } else {
         // filter access level
         $options = array();
         $options[] = JHtml::_('select.option', '', JText::_('FLEXI_SELECT_ACCESS_LEVEL'));
         $options[] = JHtml::_('select.option', '0', JText::_('Public'));
         $options[] = JHtml::_('select.option', '1', JText::_('Registered'));
         $options[] = JHtml::_('select.option', '2', JText::_('SPECIAL'));
         $fieldname = $elementid = 'filter_access';
         $attribs = ' size="1" class="inputbox" onchange="this.form.submit()" ';
         $lists['access'] = JHTML::_('select.genericlist', $options, $fieldname, $attribs, 'value', 'text', $filter_access, $elementid, $translate = true);
     }
     // filter search word
     $lists['search'] = $search;
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     $ordering = $lists['order'] == $order_property ? $order_property : '';
     //assign data to template
     $this->assignRef('lists', $lists);
     $this->assignRef('rows', $rows);
     $this->assignRef('perms', $perms);
     if (FLEXI_J16GE) {
         $this->assignRef('orderingx', $ordering);
     } else {
         $this->assignRef('ordering', $ordering);
     }
     $this->assignRef('pagination', $pagination);
     $this->assignRef('user', $user);
     parent::display($tpl);
 }
예제 #29
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     // Initialise variables.
     TZ_PortfolioHelper::addSubmenu('categories');
     $categoryId = $this->state->get('filter.category_id');
     $component = $this->state->get('filter.component');
     $section = $this->state->get('filter.section');
     $canDo = null;
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     // Avoid nonsense situation.
     if ($component == 'com_tz_portfolio') {
         return;
     }
     // Need to load the menu language file as mod_menu hasn't been loaded yet.
     $lang = JFactory::getLanguage();
     $lang->load($component, JPATH_BASE, null, false, false) || $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component, null, false, false) || $lang->load($component, JPATH_BASE, $lang->getDefault(), false, false) || $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component, $lang->getDefault(), false, false);
     // Load the category helper.
     require_once JPATH_COMPONENT . '/helpers/categories.php';
     // Get the results for each action.
     $canDo = TZ_PortfolioHelper::getActions($component, $categoryId);
     // If a component categories title string is present, let's use it.
     if ($lang->hasKey($component_title_key = strtoupper($component . ($section ? "_{$section}" : '')) . '_CATEGORIES_TITLE')) {
         $title = JText::_($component_title_key);
     } elseif ($lang->hasKey($component_section_key = strtoupper($component . ($section ? "_{$section}" : '')))) {
         $title = JText::sprintf('COM_CATEGORIES_CATEGORIES_TITLE', $this->escape(JText::_($component_section_key)));
     } else {
         $title = JText::_('COM_CATEGORIES_CATEGORIES_BASE_TITLE');
     }
     // Load specific css component
     JHtml::_('stylesheet', $component . '/administrator/categories.css', array(), true);
     // Prepare the toolbar.
     JToolBarHelper::title($title, 'categories ' . substr($component, 4) . ($section ? "-{$section}" : '') . '-categories');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories($component, 'core.create')) > 0) {
         JToolBarHelper::addNew('category.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('category.edit');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::publish('categories.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('categories.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('categories.archive');
     }
     if (JFactory::getUser()->authorise('core.admin')) {
         JToolBarHelper::checkin('categories.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete', $component)) {
         JToolBarHelper::deleteList('', 'categories.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('categories.trash');
         JToolBarHelper::divider();
     }
     // Add a batch button
     if ($canDo->get('core.edit')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         $batchIcon = '<i class="icon-checkbox-partial" title="' . $title . '"></i>';
         $batchClass = ' class="btn btn-small"';
         //// If the joomla's version is more than or equal to 3.0
         if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
             $title = JText::_('COM_TZ_PORTFOLIO_BATCH');
             $batchIcon = '<span class="tz-icon-batch" title="' . $title . '"></span>';
             $batchClass = '';
         }
         $dhtml = '<a' . $batchClass . ' href="#" data-toggle="modal" data-target="#collapseModal">';
         $dhtml .= $batchIcon . $title . '</a>';
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::custom('categories.rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false);
         //			JToolBarHelper::preferences($component);
         JToolBarHelper::preferences('com_tz_portfolio');
         JToolBarHelper::divider();
     }
     // Compute the ref_key if it does exist in the component
     if (!$lang->hasKey($ref_key = strtoupper($component . ($section ? "_{$section}" : '')) . '_CATEGORIES_HELP_KEY')) {
         $ref_key = 'JHELP_COMPONENTS_' . strtoupper(substr($component, 4) . ($section ? "_{$section}" : '')) . '_CATEGORIES';
     }
     // Get help for the categories view for the component by
     // -remotely searching in a language defined dedicated URL: *component*_HELP_URL
     // -locally  searching in a component help file if helpURL param exists in the component and is set to ''
     // -remotely searching in a component URL if helpURL param exists in the component and is NOT set to ''
     if ($lang->hasKey($lang_help_url = strtoupper($component) . '_HELP_URL')) {
         $debug = $lang->setDebug(false);
         $url = JText::_($lang_help_url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     $doc = JFactory::getDocument();
     // If the joomla is version 3.0
     if (COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio/fonts/font-awesome-v3.0.2/css/font-awesome.min.css');
     }
     $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio/css/style.min.css');
     //        // Complie button
     //        $compileTitle   = JText::_('COM_TZ_PORTFOLIO_COMPILE_LESS_TO_CSS');
     //        $compileIcon    = '<i class="icon-check"></i>&nbsp;';
     //        $compileClass   = ' class="btn btn-small"';
     //
     //        //// If the joomla's version is more than or equal to 3.0
     //        if(!COM_TZ_PORTFOLIO_JVERSION_COMPARE){
     //            $compileIcon    = '<span class="tz-icon-compile"></span>';
     //            $compileClass   = null;
     //        }
     //
     //        $compileButton   = '<a'.$compileClass.' onclick="Joomla.submitbutton(\'action.lesscall\')" href="#">'
     //            .$compileIcon.$compileTitle.'</a> ';
     //
     //        //  JS Compress button
     //        $compressTitle  = JText::_('COM_TZ_PORTFOLIO_COMPRESSION_JS');
     //        $compressIcon   = '<i class="icon-check"></i>&nbsp;';
     //        $compressClass  = ' class="btn btn-small"';
     //
     //        //// If the joomla's version is more than or equal to 3.0
     //        if(!COM_TZ_PORTFOLIO_JVERSION_COMPARE){
     //            $compressIcon    = '<span class="tz-icon-compress"></span>';
     //            $compressClass   = null;
     //        }
     //
     //        $compressButton   = '<a'.$compressClass.' onclick="Joomla.submitbutton(\'action.jscompress\')" href="#">'
     //            .$compressIcon.$compressTitle.'</a> ';
     //
     //        $bar -> appendButton('Custom',$compileButton,'compile');
     //        $bar -> appendButton('Custom',$compressButton,'compress');
     //        JToolBarHelper::divider();
     JToolBarHelper::help($ref_key, JComponentHelper::getParams($component)->exists('helpURL'), $url);
     JHtmlSidebar::setAction('index.php?option=com_tz_portfolio&view=categories');
     // Special HTML workaround to get send popup working
     $docClass = ' class="btn btn-small"';
     $youtubeIcon = '<i class="tz-icon-youtube tz-icon-14"></i>&nbsp;';
     $wikiIcon = '<i class="tz-icon-wikipedia tz-icon-14"></i>&nbsp;';
     $youtubeTitle = JText::_('COM_TZ_PORTFOLIO_VIDEO_TUTORIALS');
     $wikiTitle = JText::_('COM_TZ_PORTFOLIO_WIKIPEDIA_TUTORIALS');
     //// If the joomla's version is more than or equal to 3.0
     if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         $youtubeIcon = '<span class="tz-icon-youtube" title="' . $youtubeTitle . '"></span>';
         $wikiIcon = '<span class="tz-icon-wikipedia" title="' . $wikiTitle . '"></span>';
         $docClass = null;
     }
     $videoTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://www.youtube.com/channel/UCykS6SX6L2GOI-n3IOPfTVQ/videos\', \'' . $youtubeTitle . '\', 800, 500, 1)"' . ' href="#">' . $youtubeIcon . $youtubeTitle . '</a>';
     $wikiTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://wiki.templaza.com/Main_Page\', \'' . $wikiTitle . '\', 800, 500, 1)"' . ' href="#">' . $wikiIcon . $wikiTitle . '</a>';
     $bar->appendButton('Custom', $videoTutorial, 'youtube');
     $bar->appendButton('Custom', $wikiTutorial, 'wikipedia');
     JHtmlSidebar::addFilter(JText::_('COM_TZ_PORTFOLIO_OPTION_SELECT_FIELDS_GROUP'), 'filter_group', JHtml::_('select.options', $this->listsGroup, 'value', 'text', $this->state->get('filter.group')));
     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_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')));
 }
예제 #30
-3
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     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::divider();
         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::divider();
         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');
         JToolBarHelper::divider();
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('articles.trash');
             JToolBarHelper::divider();
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_content');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER');
 }