Ejemplo n.º 1
3
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = MessagesHelper::getActions();
     JToolBarHelper::title(JText::_('COM_MESSAGES_MANAGER_MESSAGES'), 'inbox.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('message.add');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('messages.publish', 'COM_MESSAGES_TOOLBAR_MARK_AS_READ');
         JToolBarHelper::unpublish('messages.unpublish', 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::divider();
         JToolBarHelper::deleteList('', 'messages.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::divider();
             JToolBarHelper::trash('messages.trash');
         }
     }
     //JToolBarHelper::addNew('module.add');
     JToolBarHelper::divider();
     $bar = JToolBar::getInstance('toolbar');
     $bar->appendButton('Popup', 'options', 'COM_MESSAGES_TOOLBAR_MY_SETTINGS', 'index.php?option=com_messages&view=config&tmpl=component', 850, 400);
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_messages');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
 }
Ejemplo n.º 2
0
 /**
  * Display the toolbar
  */
 protected function _setToolbar()
 {
     $state = $this->get('State');
     $canDo = ContentHelper::getActions($state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('Content_Articles_Title'), 'article.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::custom('article.add', 'new.png', 'new_f2.png', 'New', false);
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::custom('article.edit', 'edit.png', 'edit_f2.png', 'Edit', true);
     }
     JToolBarHelper::divider();
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::custom('articles.publish', 'publish.png', 'publish_f2.png', 'Publish', true);
         JToolBarHelper::custom('articles.unpublish', 'unpublish.png', 'unpublish_f2.png', 'Unpublish', true);
         if ($state->get('filter.published') != -1) {
             JToolBarHelper::divider();
             JToolBarHelper::archiveList('articles.archive');
         }
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'articles.delete');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('articles.trash');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_content');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.content.articles');
 }
Ejemplo n.º 3
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');
     }
 }
Ejemplo n.º 4
0
 /**
  * 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');
 }
Ejemplo n.º 5
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/fabrik.php';
     $canDo = FabrikHelper::getActions($this->state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('COM_FABRIK_MANAGER_GROUPS'), 'groups.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('group.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('group.edit', 'JTOOLBAR_EDIT');
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             JToolBarHelper::divider();
             JToolBarHelper::custom('groups.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
             JToolBarHelper::custom('groups.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         }
     }
     if (JFactory::getUser()->authorise('core.manage', 'com_checkin')) {
         JToolBarHelper::custom('groups.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'groups.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('groups.trash', 'JTOOLBAR_TRASH');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_fabrik');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_FABRIK_GROUPS', false, JText::_('JHELP_COMPONENTS_FABRIK_GROUPS'));
 }
Ejemplo n.º 6
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');
 }
Ejemplo n.º 7
0
 /**
  * The default method that will display the output of this view which is called by
  * Joomla
  * 
  * @param	string template	Template file name
  **/
 function display($tpl = null)
 {
     if ($this->getLayout() == 'edit') {
         $this->_displayEditLayout($tpl);
         return;
     }
     // Set the titlebar text
     JToolBarHelper::title(JText::_('CC USERS'), 'users');
     // Add the necessary buttons
     JToolBarHelper::back('Home', 'index.php?option=com_community');
     JToolBarHelper::divider();
     JToolBarHelper::custom('export', 'csv', 'csv', JText::_('CC EXPORT TO CSV'));
     JToolBarHelper::trash('delete', JText::_('CC DELETE'));
     $search = JRequest::getVar('search', '');
     $model =& $this->getModel('Users');
     $users =& $model->getAllUsers();
     $pagination =& $model->getPagination();
     $mainframe =& JFactory::getApplication();
     $filter_order = $mainframe->getUserStateFromRequest("com_community.users.filter_order", 'filter_order', 'a.name', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest("com_community.users.filter_order_Dir", 'filter_order_Dir', '', 'word');
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // Load tooltips
     JHTML::_('behavior.tooltip', '.hasTip');
     $usertype = JRequest::getVar('usertype', 'all', 'POST');
     $this->assignRef('search', $search);
     $this->assignRef('usertype', $usertype);
     $this->assignRef('users', $users);
     $this->assignRef('lists', $lists);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
Ejemplo n.º 8
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');
 }
Ejemplo n.º 9
0
 /**
  * The default method that will display the output of this view which is called by
  * Joomla
  *
  * @param	string template	Template file name
  **/
 public function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $search = $mainframe->getUserStateFromRequest("com_community.videos.search", 'search', '', 'string');
     // Set the titlebar text
     JToolBarHelper::title(JText::_('COM_COMMUNITY_PHOTOS'), 'photos');
     // Add the necessary buttons
     JToolBarHelper::trash('delete', JText::_('COM_COMMUNITY_DELETE'));
     JToolBarHelper::publishList('publish', JText::_('COM_COMMUNITY_PUBLISH'));
     JToolBarHelper::unpublishList('unpublish', JText::_('COM_COMMUNITY_UNPUBLISH'));
     $photos = $this->get('Photos');
     $pagination = $this->get('Pagination');
     foreach ($photos as $key => $val) {
         $pTable = JTable::getInstance('Photo', 'CTable');
         $pTable->load($val->pid);
         $photos[$key] = $pTable;
         $photos[$key]->albumName = $val->name;
     }
     $this->assignRef('photos', $photos);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('search', $search);
     //var_dump($photos);
     parent::display($tpl);
 }
Ejemplo n.º 10
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', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('client.edit', 'JTOOLBAR_EDIT');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('clients.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::custom('clients.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('clients.archive', 'JTOOLBAR_ARCHIVE');
         JToolBarHelper::custom('clients.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('clients.trash', 'JTOOLBAR_TRASH');
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'clients.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_banners');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS');
 }
Ejemplo n.º 11
0
 /**
  * Setup the Toolbar.
  */
 protected function _setToolbar()
 {
     $state = $this->get('State');
     $canDo = MessagesHelper::getActions();
     JToolBarHelper::title(JText::_('Messages_Manager_Messages'), 'inbox.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('message.add');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::custom('messages.publish', 'publish.png', 'publish_f2.png', 'Messages_Toolbar_Publish', true);
         JToolBarHelper::custom('messages.unpublish', 'unpublish.png', 'unpublish_f2.png', 'Messages_Toolbar_UnPublish', true);
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'messages.delete');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('messages.trash');
         }
     }
     //JToolBarHelper::addNew('module.add');
     $bar =& JToolBar::getInstance('toolbar');
     $bar->appendButton('Popup', 'config', 'Messages_Toolbar_My_Settings', 'index.php?option=com_messages&view=config&tmpl=component', 850, 400);
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_messages');
     }
     JToolBarHelper::help('screen.messages.inbox');
 }
Ejemplo n.º 12
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/localize_empresa.php';
     $state = $this->get('State');
     $canDo = Localize_empresaHelper::getActions($state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('COM_LOCALIZE_EMPRESA_TITLE_CADASTRODEEMPRESAS'), 'cadastrodeempresas.png');
     //Check if the form exists before showing the add/edit buttons
     $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/cadastrodeempresa';
     if (file_exists($formPath)) {
         if ($canDo->get('core.create')) {
             JToolBarHelper::addNew('cadastrodeempresa.add', 'JTOOLBAR_NEW');
         }
         if ($canDo->get('core.edit') && isset($this->items[0])) {
             JToolBarHelper::editList('cadastrodeempresa.edit', 'JTOOLBAR_EDIT');
         }
     }
     if ($canDo->get('core.edit.state')) {
         if (isset($this->items[0]->state)) {
             JToolBarHelper::divider();
             JToolBarHelper::custom('cadastrodeempresas.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
             JToolBarHelper::custom('cadastrodeempresas.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         } else {
             if (isset($this->items[0])) {
                 //If this component does not use state then show a direct delete button as we can not trash
                 JToolBarHelper::deleteList('', 'cadastrodeempresas.delete', 'JTOOLBAR_DELETE');
             }
         }
         if (isset($this->items[0]->state)) {
             JToolBarHelper::divider();
             JToolBarHelper::archiveList('cadastrodeempresas.archive', 'JTOOLBAR_ARCHIVE');
         }
         if (isset($this->items[0]->checked_out)) {
             JToolBarHelper::custom('cadastrodeempresas.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);
         }
     }
     //Show trash and delete for components that uses the state field
     if (isset($this->items[0]->state)) {
         if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
             JToolBarHelper::deleteList('', 'cadastrodeempresas.delete', 'JTOOLBAR_EMPTY_TRASH');
             JToolBarHelper::divider();
         } else {
             if ($canDo->get('core.edit.state')) {
                 JToolBarHelper::trash('cadastrodeempresas.trash', 'JTOOLBAR_TRASH');
                 JToolBarHelper::divider();
             }
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_localize_empresa');
     }
     //Set sidebar action - New in 3.0
     JHtmlSidebar::setAction('index.php?option=com_localize_empresa&view=cadastrodeempresas');
     $this->extra_sidebar = '';
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), "value", "text", $this->state->get('filter.state'), true));
     //Filter for the field corretores
     $this->extra_sidebar .= '<div class="other-filters">';
     $this->extra_sidebar .= '<small><label for="filter_corretores">Corretores</label></small>';
     $this->extra_sidebar .= JHtmlList::users('filter_corretores', $this->state->get('filter.corretores'), 1, 'onchange="this.form.submit();"');
     $this->extra_sidebar .= '</div>';
 }
Ejemplo n.º 13
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');
     }
 }
Ejemplo n.º 14
0
 /**
  * Display the toolbar
  */
 protected function _setToolbar()
 {
     $state = $this->get('State');
     $extension = $state->get('filter.extension');
     // Need to load the menu language file as mod_menu hasn't been loaded yet.
     $lang =& JFactory::getLanguage();
     $lang->load($extension . '.menu', JPATH_ADMINISTRATOR . '/components/' . $extension);
     $lang->load($extension . '.menu');
     JToolBarHelper::title(JText::sprintf('Categories_Categories_Title', $this->escape(JText::_($extension))), 'categories.png');
     JToolBarHelper::custom('category.edit', 'new.png', 'new_f2.png', 'New', false);
     JToolBarHelper::custom('category.edit', 'edit.png', 'edit_f2.png', 'Edit', true);
     JToolBarHelper::divider();
     JToolBarHelper::custom('categories.publish', 'publish.png', 'publish_f2.png', 'Publish', true);
     JToolBarHelper::custom('categories.unpublish', 'unpublish.png', 'unpublish_f2.png', 'Unpublish', true);
     if ($state->get('filter.published') != -1) {
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('categories.archive');
     }
     if ($state->get('filter.published') == -2) {
         JToolBarHelper::deleteList('', 'categories.delete');
     } else {
         JToolBarHelper::trash('categories.trash');
     }
     JToolBarHelper::divider();
     JToolBarHelper::custom('categories.rebuild', 'refresh.png', 'refresh_f2.png', 'JToolbar_Rebuild', false);
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.categories');
 }
Ejemplo n.º 15
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);
 }
Ejemplo n.º 16
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     $canDo = LanguagesHelper::getActions();
     JToolBarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'langmanager.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('language.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('language.edit');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.published') != 2) {
             JToolBarHelper::publishList('languages.publish');
             JToolBarHelper::unpublishList('languages.unpublish');
         }
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('languages.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         // Add install languages link to the lang installer component
         $bar = JToolBar::getInstance('toolbar');
         $bar->appendButton('Link', 'extension', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages');
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_languages');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT');
 }
Ejemplo n.º 17
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');
     }
 }
Ejemplo n.º 18
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');
     }
 }
Ejemplo n.º 19
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/weblinks.php';
     $state = $this->get('State');
     $canDo = WeblinksHelper::getActions($state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('COM_WEBLINKS_MANAGER_WEBLINKS'), 'weblinks.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('weblink.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('weblink.edit', 'JTOOLBAR_EDIT');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('weblinks.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::custom('weblinks.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('weblinks.archive', 'JTOOLBAR_ARCHIVE');
         JToolBarHelper::custom('weblinks.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'weblinks.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('weblinks.trash', 'JTOOLBAR_TRASH');
             JToolBarHelper::divider();
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_weblinks');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_COMPONENTS_WEBLINKS_LINKS');
 }
Ejemplo n.º 20
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/contact.php';
     $canDo = ContactHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACTS'), 'contact.png');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0) {
         JToolBarHelper::addNew('contact.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('contact.edit', 'JTOOLBAR_EDIT');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('contacts.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::custom('contacts.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('contacts.archive', 'JTOOLBAR_ARCHIVE');
         JToolBarHelper::custom('contacts.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'contacts.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('contacts.trash', 'JTOOLBAR_TRASH');
             JToolBarHelper::divider();
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_contact');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS');
 }
Ejemplo n.º 21
0
 /**
  * Setup the Toolbar.
  */
 protected function _setToolbar()
 {
     require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'banners.php';
     $state = $this->get('State');
     $canDo = BannersHelper::getActions($state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('Banners_Manager_Banners'), 'generic.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('banner.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('banner.edit');
     }
     JToolBarHelper::divider();
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::custom('banners.publish', 'publish.png', 'publish_f2.png', 'Publish', true);
         JToolBarHelper::custom('banners.unpublish', 'unpublish.png', 'unpublish_f2.png', 'Unpublish', true);
         JToolBarHelper::divider();
         if ($state->get('filter.published') != -1) {
             JToolBarHelper::archiveList('banners.archive');
         }
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'banners.delete');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('banners.trash');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_banners');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.banners.banners');
 }
Ejemplo n.º 22
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     $canDo = LanguagesHelper::getActions();
     JToolBarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'langmanager.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('language.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('language.edit');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.published') != 2) {
             JToolBarHelper::publishList('languages.publish');
             JToolBarHelper::unpublishList('languages.unpublish');
         }
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('languages.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_languages');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT');
 }
 /**
  * Display the toolbar
  *
  * @access      private
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $doc = JFactory::getDocument();
     $version = new JVersion();
     JToolBarHelper::addNew('sitemap.add');
     JToolBarHelper::custom('sitemap.edit', 'edit.png', 'edit_f2.png', 'JTOOLBAR_EDIT', true);
     $doc->addStyleDeclaration('.icon-48-sitemap {background-image: url(components/com_xmap/images/sitemap-icon.png);}');
     JToolBarHelper::title(JText::_('XMAP_SITEMAPS_TITLE'), 'sitemap.png');
     JToolBarHelper::custom('sitemaps.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_Publish', true);
     JToolBarHelper::custom('sitemaps.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
     if (version_compare($version->getShortVersion(), '3.0.0', '>=')) {
         JToolBarHelper::custom('sitemaps.setdefault', 'featured.png', 'featured_f2.png', 'XMAP_TOOLBAR_SET_DEFAULT', true);
     } else {
         JToolBarHelper::custom('sitemaps.setdefault', 'default.png', 'default_f2.png', 'XMAP_TOOLBAR_SET_DEFAULT', true);
     }
     if ($state->get('filter.published') == -2) {
         JToolBarHelper::deleteList('', 'sitemaps.delete', 'JTOOLBAR_DELETE');
     } else {
         JToolBarHelper::trash('sitemaps.trash', 'JTOOLBAR_TRASH');
     }
     JToolBarHelper::divider();
     if (class_exists('JHtmlSidebar')) {
         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')));
         $this->sidebar = JHtmlSidebar::render();
     }
 }
Ejemplo n.º 24
0
 /**
  * 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')));
     }
 }
Ejemplo n.º 25
0
 /**
  * Method to configure the toolbar for this view.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     $canDo = FinderHelper::getActions();
     JToolBarHelper::title(JText::_('COM_FINDER_INDEX_TOOLBAR_TITLE'), 'finder');
     $toolbar = JToolBar::getInstance('toolbar');
     $toolbar->appendButton('Popup', 'archive', 'COM_FINDER_INDEX', 'index.php?option=com_finder&view=indexer&tmpl=component', 500, 210);
     JToolBarHelper::divider();
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::publishList('index.publish');
         JToolBarHelper::unpublishList('index.unpublish');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'index.delete');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('index.purge', 'COM_FINDER_INDEX_TOOLBAR_PURGE', false);
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_finder');
     }
     JToolBarHelper::divider();
     $toolbar->appendButton('Popup', 'stats', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 500);
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_INDEXED_CONTENT');
 }
Ejemplo n.º 26
0
 /**
  * The default method that will display the output of this view which is called by
  * Joomla
  *
  * @param	string template	Template file name
  **/
 public function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     //$search				= $mainframe->getUserStateFromRequest( "com_community.videos.search", 'search', '', 'string' );
     $search = JRequest::getVar('search', '');
     // Set the titlebar text
     JToolBarHelper::title(JText::_('COM_COMMUNITY_VIDEOS'), 'videos');
     // Add the necessary buttons
     JToolbarHelper::custom('fetchThumbnail', 'pictures', '', JText::_('COM_COMMUNITY_FETCH_THUMBNAIL'));
     JToolBarHelper::trash('delete', JText::_('COM_COMMUNITY_DELETE'));
     JToolBarHelper::publishList('publish', JText::_('COM_COMMUNITY_PUBLISH'));
     JToolBarHelper::unpublishList('unpublish', JText::_('COM_COMMUNITY_UNPUBLISH'));
     $videos = $this->get('Videos');
     $pagination = $this->get('Pagination');
     $categories = $this->get('Categories');
     foreach ($videos as $key => $vid) {
         foreach ($categories as $cat) {
             $videos[$key]->categoryName = '';
             if ($cat->id == $vid->category_id) {
                 $videos[$key]->categoryName = $cat->name;
                 break;
             }
         }
     }
     $catHTML = $this->_getCategoriesHTML($categories);
     $this->assignRef('videos', $videos);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('search', $search);
     $this->assignRef('categories', $catHTML);
     parent::display($tpl);
 }
Ejemplo n.º 27
0
 /**
  * Setup the Toolbar.
  */
 protected function _setToolbar()
 {
     $state = $this->get('State');
     $canDo = NewsfeedsHelper::getActions($state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('Newsfeeds_Manager_Newsfeeds'), 'newsfeeds.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('newsfeed.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('newsfeed.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::custom('newsfeeds.publish', 'publish.png', 'publish_f2.png', 'JToolbar_Publish', true);
         JToolBarHelper::custom('newsfeeds.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JToolbar_Unpublish', true);
         JToolBarHelper::divider();
         if ($state->get('filter.published') != -1) {
             JToolBarHelper::archiveList('newsfeeds.archive');
         }
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'newsfeeds.delete');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('newsfeeds.trash');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_newsfeeds');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.newsfeed');
 }
Ejemplo n.º 28
0
 /**
  * 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();
     }
 }
Ejemplo n.º 29
0
 /**
  * The default method that will display the output of this view which is called by
  * Joomla
  *
  * @param	string template	Template file name
  **/
 public function display($tpl = null)
 {
     if ($this->getLayout() == 'edit') {
         $this->_displayEditLayout($tpl);
         return;
     }
     // Set the titlebar text
     JToolBarHelper::title(JText::_('COM_COMMUNITY_CONFIGURATION_MULTIPROFILES'), 'multiprofile');
     // Add the necessary buttons
     JToolBarHelper::publishList('publish', JText::_('COM_COMMUNITY_PUBLISH'));
     JToolBarHelper::unpublishList('unpublish', JText::_('COM_COMMUNITY_UNPUBLISH'));
     JToolBarHelper::divider();
     JToolBarHelper::trash('delete', JText::_('COM_COMMUNITY_DELETE'));
     JToolBarHelper::addNew('add', JText::_('COM_COMMUNITY_NEW'));
     $profiles = $this->get('MultiProfiles');
     $pagination = $this->get('Pagination');
     $mainframe = JFactory::getApplication();
     $ordering = $mainframe->getUserStateFromRequest("com_community.multiprofile.filter_order", 'filter_order', 'ordering', 'cmd');
     $orderingDirection = $mainframe->getUserStateFromRequest("com_community.multiprofile.filter_order_Dir", 'filter_order_Dir', 'ASC', 'word');
     $this->assignRef('profiles', $profiles);
     $this->assignRef('ordering', $ordering);
     $this->assignRef('orderingDirection', $orderingDirection);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
Ejemplo n.º 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');
 }