/** * 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'); } }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT.'/helpers/banners.php'; $canDo = BannersHelper::getActions($this->state->get('filter.category_id')); $user = JFactory::getUser(); JToolBarHelper::title(JText::_('COM_BANNERS_MANAGER_BANNERS'), 'banners.png'); if (count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0) { JToolBarHelper::addNew('banner.add'); } if (($canDo->get('core.edit'))) { JToolBarHelper::editList('banner.edit'); } if ($canDo->get('core.edit.state')) { if ($this->state->get('filter.state') != 2){ JToolBarHelper::divider(); JToolBarHelper::publish('banners.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('banners.unpublish', 'JTOOLBAR_UNPUBLISH', true); } if ($this->state->get('filter.state') != -1 ) { JToolBarHelper::divider(); if ($this->state->get('filter.state') != 2) { JToolBarHelper::archiveList('banners.archive'); } else if ($this->state->get('filter.state') == 2) { JToolBarHelper::unarchiveList('banners.publish'); } } } if ($canDo->get('core.edit.state')) { JToolBarHelper::checkin('banners.checkin'); } if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'banners.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('banners.trash'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_banners'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS'); }
protected function addToolBar() { $state = $this->get('State'); $canDo = EasyquickiconsHelper::getActions(); $layout = JRequest::getCmd('layout', 'default'); if ($layout != 'welcome') { JToolBarHelper::title(JText::_('COM_EASYQUICKICONS_TOOLBAR'), 'easyquickicons'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('easyquickicon.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('easyquickicon.edit'); } if ($canDo->get('core.edit.state')) { if ($state->get('filter.state') != 2) { JToolBarHelper::divider(); JToolBarHelper::publish('easyquickicons.publish', 'JTOOLBAR_ENABLE', true); JToolBarHelper::unpublish('easyquickicons.unpublish', 'JTOOLBAR_DISABLE', true); } if ($state->get('filter.state') != -1) { JToolBarHelper::divider(); if ($state->get('filter.state') != 2) { JToolBarHelper::archiveList('easyquickicons.archive'); } elseif ($state->get('filter.state') == 2) { JToolBarHelper::unarchiveList('easyquickicons.publish', 'JTOOLBAR_UNARCHIVE'); } } } if ($canDo->get('core.admin')) { JToolbarHelper::checkin('easyquickicons.checkin'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'easyquickicons.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('easyquickicons.trash'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_easyquickicons'); JToolBarHelper::divider(); } $bar = JToolBar::getInstance('toolbar'); $bar->appendButton('Help', 'help', 'JTOOLBAR_HELP', 'http://awynesoft.com/documentation.html', 640, 480); JHtmlSidebar::setAction('index.php?option=com_easyquickicons&view=easyquickicons'); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', EasyquickiconsHelper::publishedOptions(), 'value', 'text', $this->state->get('filter.state'), true)); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_easyquickicons'), 'value', 'text', $this->state->get('filter.category_id'))); } else { JToolBarHelper::back('COM_EASYQUICKICONS', 'index.php?option=' . JRequest::getCmd('option')); } }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/banners.php'; $canDo = BannersHelper::getActions($this->state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_BANNERS_MANAGER_BANNERS'), 'banners.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('banner.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('banner.edit', 'JTOOLBAR_EDIT'); } if ($canDo->get('core.edit.state')) { if ($this->state->get('filter.state') != 2) { JToolBarHelper::divider(); JToolBarHelper::custom('banners.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('banners.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } if ($this->state->get('filter.state') != -1) { JToolBarHelper::divider(); if ($this->state->get('filter.state') != 2) { JToolBarHelper::archiveList('banners.archive', 'JTOOLBAR_ARCHIVE'); } else { if ($this->state->get('filter.state') == 2) { JToolBarHelper::unarchiveList('banners.publish', 'JTOOLBAR_UNARCHIVE'); } } } } if ($canDo->get('core.edit.state')) { JToolBarHelper::custom('banners.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'banners.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('banners.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_banners'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = SolidresHelper::getActions(); JToolBarHelper::title(JText::_('SR_MANAGE_TAXES'), 'generic.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('tax.add', 'JTOOLBAR_NEW'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('tax.edit', 'JTOOLBAR_EDIT'); } if ($canDo->get('core.edit.state')) { if ($state->get('filter.state') != 2) { JToolBarHelper::divider(); JToolBarHelper::custom('taxes.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('taxes.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } if ($state->get('filter.state') != -1) { JToolBarHelper::divider(); if ($state->get('filter.state') != 2) { JToolBarHelper::archiveList('taxes.archive', 'JTOOLBAR_ARCHIVE'); } else { if ($state->get('filter.state') == 2) { JToolBarHelper::unarchiveList('taxes.publish', 'JTOOLBAR_UNARCHIVE'); } } } } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'taxes.delete', 'JTOOLBAR_EMPTY_TRASH'); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('taxes.trash', 'JTOOLBAR_TRASH'); } } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_solidres'); } JToolBarHelper::divider(); JToolBarHelper::help('screen.tax', 'JTOOLBAR_HELP'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = RedirectHelper::getActions(); JToolBarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINKS'), 'redirect'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('link.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('link.edit'); } if ($canDo->get('core.edit.state')) { if ($state->get('filter.state') != 2) { JToolBarHelper::divider(); JToolBarHelper::publish('links.publish', 'JTOOLBAR_ENABLE', true); JToolBarHelper::unpublish('links.unpublish', 'JTOOLBAR_DISABLE', true); } if ($state->get('filter.state') != -1) { JToolBarHelper::divider(); if ($state->get('filter.state') != 2) { JToolBarHelper::archiveList('links.archive'); } else { if ($state->get('filter.state') == 2) { JToolBarHelper::unarchiveList('links.publish', 'JTOOLBAR_UNARCHIVE'); } } } } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'links.delete', 'JTOOLBAR_EMPTY_TRASH'); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('links.trash'); JToolBarHelper::divider(); } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_redirect'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER'); }
/** * 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'); } }
function _DEFAULT() { global $filter_state; JToolBarHelper::title(JText::_('Article Manager'), 'article.png'); if ($filter_state == 'A' || $filter_state == NULL) { JToolBarHelper::unarchiveList(); } if ($filter_state != 'A') { JToolBarHelper::archiveList(); } JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); JToolBarHelper::customX('movesect', 'move.png', 'move_f2.png', 'Move'); JToolBarHelper::customX('copy', 'copy.png', 'copy_f2.png', 'Copy'); JToolBarHelper::trash(); JToolBarHelper::editListX(); JToolBarHelper::addNewX(); JToolBarHelper::preferences('com_content', '550'); JToolBarHelper::help('screen.content'); }
/** * Add the page title and toolbar * */ protected function addToolbar() { JToolBarHelper::title(JText::_('COM_TAGMETA_MANAGER'), 'tagmeta.png'); $canDo = TagMetaHelper::getActions(); if ($canDo->get('core.create')) { JToolBarHelper::custom('rules.copy', 'copy.png', 'copy_f2.png', JText::_('COM_TAGMETA_TOOLBAR_COPY')); JToolBarHelper::addNew('rule.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('rule.edit'); } JToolBarHelper::divider(); if ($canDo->get('core.edit.state')) { if ($this->state->get('filter.state') != 2) { JToolBarHelper::publish('rules.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('rules.unpublish', 'JTOOLBAR_UNPUBLISH', true); } JToolBarHelper::divider(); if ($this->state->get('filter.state') != -1) { if ($this->state->get('filter.state') != 2) { JToolBarHelper::archiveList('rules.archive'); } else { if ($this->state->get('filter.state') == 2) { JToolBarHelper::unarchiveList('rules.publish'); } } } //JToolBarHelper::checkin('rules.checkin'); JToolBarHelper::custom('rules.checkin', 'checkin', '', 'JTOOLBAR_CHECKIN', true); JToolBarHelper::trash('rules.trash'); } if ($canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'rules.delete', 'JTOOLBAR_EMPTY_TRASH'); } JToolBarHelper::divider(); if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_tagmeta'); } JHtmlSidebar::setAction('index.php?option=com_tagmeta&view=rules'); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true)); }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { 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'); } }
/** * 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'); } }
/** * 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'); } }
function display($tpl = null) { $mainframe = JFactory::getApplication(); $option = JRequest::getVar('option'); //initialise variables $user = JFactory::getUser(); $db = JFactory::getDBO(); $document = JFactory::getDocument(); JHTML::_('behavior.tooltip'); //get vars $filter_order = $mainframe->getUserStateFromRequest($option . '.archive.filter_order', 'filter_order', 'i.ordering', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . '.archive.filter_order_Dir', 'filter_order_Dir', '', 'word'); $search = $mainframe->getUserStateFromRequest($option . '.archive.search', 'search', '', 'string'); $search = FLEXI_J16GE ? $db->escape(trim(JString::strtolower($search))) : $db->getEscaped(trim(JString::strtolower($search))); //add css and submenu to document $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'); } } $perms = FlexicontentHelperPerm::getPerm(); // Create Submenu (and also check access to current view) FLEXISubmenu('CanArchives'); //create the toolbar JToolBarHelper::title(JText::_('FLEXI_ITEM_ARCHIVE'), 'archive'); if (FLEXI_J16GE) { JToolBarHelper::unarchiveList('archive.unarchive'); JToolBarHelper::deleteList('Are you sure?', 'archive.remove'); } else { JToolBarHelper::unarchiveList(); JToolBarHelper::deleteList(); } if ($perms->CanConfig) { JToolBarHelper::divider(); JToolBarHelper::spacer(); $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'); } //Get data from the model $rows =& $this->get('Data'); $pageNav =& $this->get('Pagination'); // search filter $lists['search'] = $search; // table ordering $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; $ordering = $lists['order'] == 'i.ordering'; //assign data to template $this->assignRef('lists', $lists); $this->assignRef('rows', $rows); $this->assignRef('pageNav', $pageNav); $this->assignRef('ordering', $ordering); $this->assignRef('user', $user); parent::display($tpl); }
/** * 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')) { if ($this->state->get('filter_state') != 2) { 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); } if ($this->state->get('filter_state') != -1) { JToolBarHelper::divider(); if ($this->state->get('filter_state') != 2) { JToolBarHelper::archiveList('events.archive'); } elseif ($this->state->get('filter_state') == 2) { JToolBarHelper::unarchiveList('events.publish'); } } } if ($canDo->get('core.edit.state')) { JToolBarHelper::checkin('events.checkin'); } if ($this->state->get('filter_state') == -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); }
function events() { $archive = JRequest::getVar('archive', -1); if ($archive == 1) { JToolBarHelper::unarchiveList('unarchive'); } else { JToolBarHelper::archiveList('archive'); } JToolBarHelper::divider(); JToolBarHelper::publishList('publish'); JToolBarHelper::divider(); JToolBarHelper::unpublishList('unpublish'); JToolBarHelper::divider(); JToolBarHelper::editList(); JToolBarHelper::divider(); JToolBarHelper::addNew(); JToolBarHelper::divider(); JToolBarHelper::editList('copy', JText::_('DT_COPY_EVENT')); JToolBarHelper::divider(); JToolBarHelper::divider(); JToolBarHelper::deleteList(); $this->view->setLayout('list'); $this->view->display(); }
function display($tpl = null) { global $mainframe, $option; //initialise variables $document =& JFactory::getDocument(); $db =& JFactory::getDBO(); $user =& JFactory::getUser(); $elsettings = ELAdmin::config(); //get vars $filter_order = $mainframe->getUserStateFromRequest($option . '.archive.filter_order', 'filter_order', 'a.dates', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . '.archive.filter_order_Dir', 'filter_order_Dir', '', 'word'); $filter = $mainframe->getUserStateFromRequest($option . '.archive.filter', 'filter', '', 'int'); $filter = intval($filter); $search = $mainframe->getUserStateFromRequest($option . '.archive.search', 'search', '', 'string'); $search = $db->getEscaped(trim(JString::strtolower($search))); $template = $mainframe->getTemplate(); //add css and submenu to document $document->addStyleSheet('components/com_eventlist/assets/css/eventlistbackend.css'); //Create Submenu JSubMenuHelper::addEntry(JText::_('EVENTLIST'), 'index.php?option=com_eventlist'); JSubMenuHelper::addEntry(JText::_('EVENTS'), 'index.php?option=com_eventlist&view=events'); JSubMenuHelper::addEntry(JText::_('VENUES'), 'index.php?option=com_eventlist&view=venues'); JSubMenuHelper::addEntry(JText::_('CATEGORIES'), 'index.php?option=com_eventlist&view=categories'); JSubMenuHelper::addEntry(JText::_('ARCHIVE'), 'index.php?option=com_eventlist&view=archive', true); JSubMenuHelper::addEntry(JText::_('GROUPS'), 'index.php?option=com_eventlist&view=groups'); JSubMenuHelper::addEntry(JText::_('HELP'), 'index.php?option=com_eventlist&view=help'); if ($user->get('gid') > 24) { JSubMenuHelper::addEntry(JText::_('SETTINGS'), 'index.php?option=com_eventlist&controller=settings&task=edit'); } JHTML::_('behavior.tooltip'); //create the toolbar JToolBarHelper::title(JText::_('ARCHIVE'), 'archive'); JToolBarHelper::unarchiveList(); JToolBarHelper::spacer(); JToolBarHelper::deleteList(); JToolBarHelper::spacer(); JToolBarHelper::help('el.archive', true); // Get data from the model $rows =& $this->get('Data'); //$total = & $this->get( 'Total'); $pageNav =& $this->get('Pagination'); //search filter $filters = array(); $filters[] = JHTML::_('select.option', '1', JText::_('EVENT TITLE')); $filters[] = JHTML::_('select.option', '2', JText::_('VENUE')); $filters[] = JHTML::_('select.option', '3', JText::_('CITY')); $filters[] = JHTML::_('select.option', '4', JText::_('CATEGORY')); $lists['filter'] = JHTML::_('select.genericlist', $filters, 'filter', 'size="1" class="inputbox"', 'value', 'text', $filter); // table ordering $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; // search filter $lists['search'] = $search; //assign data to template $this->assignRef('lists', $lists); $this->assignRef('rows', $rows); $this->assignRef('pageNav', $pageNav); $this->assignRef('elsettings', $elsettings); $this->assignRef('template', $template); parent::display($tpl); }
/** * Add the page title, submenu and toolbar. * */ protected function addToolbar() { $jinput = JFactory::getApplication()->input; $canDo = BwPostmanHelper::getActions(0, 'archive'); // Get document object, set document title and add css $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_BWPOSTMAN_ARC')); $document->addStyleSheet(JURI::root(true) . '/administrator/components/com_bwpostman/assets/css/bwpostman_backend.css'); // Set toolbar title JToolBarHelper::title(JText::_('COM_BWPOSTMAN_ARC'), 'list'); // Set toolbar items for the page (depending on the tab which we are in) $layout = $jinput->get('layout', 'newsletters'); switch ($layout) { // Which tab are we in? case "newsletters": if ($canDo->get('core.restore')) { JToolBarHelper::unarchiveList('archive.unarchive', JText::_('COM_BWPOSTMAN_UNARCHIVE')); } if ($canDo->get('core.delete')) { JToolBarHelper::deleteList(JText::_('COM_BWPOSTMAN_ARC_CONFIRM_REMOVING_NL'), 'archive.delete'); } break; case "subscribers": if ($canDo->get('core.restore')) { JToolBarHelper::unarchiveList('archive.unarchive', JText::_('COM_BWPOSTMAN_UNARCHIVE')); } if ($canDo->get('core.delete')) { JToolBarHelper::deleteList(JText::_('COM_BWPOSTMAN_ARC_CONFIRM_REMOVING_SUB'), 'archive.delete'); } break; case "campaigns": // Special unarchive and delete button because we need a confirm dialog with 3 options $bar = JToolBar::getInstance('toolbar'); $alt_archive = "unarchive"; if ($canDo->get('core.restore')) { $bar->appendButton('Popup', 'unarchive', $alt_archive, 'index.php?option=com_bwpostman&view=archive&format=raw&layout=campaigns_confirmunarchive', 500, 130); } $alt_delete = "delete"; if ($canDo->get('core.delete')) { $bar->appendButton('Popup', 'delete', $alt_delete, 'index.php?option=com_bwpostman&view=archive&format=raw&layout=campaigns_confirmdelete', 500, 150); } break; case "mailinglists": if ($canDo->get('core.restore')) { JToolBarHelper::unarchiveList('archive.unarchive', JText::_('COM_BWPOSTMAN_UNARCHIVE')); } if ($canDo->get('core.delete')) { JToolBarHelper::deleteList(JText::_('COM_BWPOSTMAN_ARC_CONFIRM_REMOVING_ML'), 'archive.delete'); } break; case "templates": if ($canDo->get('core.restore')) { JToolBarHelper::unarchiveList('archive.unarchive', JText::_('COM_BWPOSTMAN_UNARCHIVE')); } if ($canDo->get('core.delete')) { JToolBarHelper::deleteList(JText::_('COM_BWPOSTMAN_ARC_CONFIRM_REMOVING_TPL'), 'archive.delete'); } break; } JToolBarHelper::spacer(); JToolBarHelper::divider(); JToolBarHelper::spacer(); JToolBarHelper::help(JText::_("COM_BWPOSTMAN_FORUM"), false, 'http://www.boldt-webservice.de/forum/bwpostman.html'); JToolBarHelper::spacer(); }