Example #1
1
 /**
  * Method to configure the toolbar for this view.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_finder');
     JToolbarHelper::title(JText::_('COM_FINDER_MAPS_TOOLBAR_TITLE'), 'zoom-in finder');
     $toolbar = JToolbar::getInstance('toolbar');
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publishList('maps.publish');
         JToolbarHelper::unpublishList('maps.unpublish');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.admin') || $canDo->get('core.options')) {
         JToolbarHelper::preferences('com_finder');
     }
     JToolbarHelper::divider();
     $toolbar->appendButton('Popup', 'bars', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350);
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_CONTENT_MAPS');
     if ($canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'maps.delete');
         JToolbarHelper::divider();
     }
     JHtmlSidebar::setAction('index.php?option=com_finder&view=maps');
     JHtmlSidebar::addFilter('', 'filter_branch', JHtml::_('select.options', JHtml::_('finder.mapslist'), 'value', 'text', $this->state->get('filter.branch')), true);
     JHtmlSidebar::addFilter(JText::_('COM_FINDER_INDEX_FILTER_BY_STATE'), 'filter_state', JHtml::_('select.options', JHtml::_('finder.statelist'), 'value', 'text', $this->state->get('filter.state')));
 }
Example #2
0
 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     $state = $this->get('State');
     $user = JFactory::getUser();
     //$canDo	= TSJsHelper::getActions('com_tsj', 'category', $state->get('filter.category_id'));
     if (version_compare(JPlatform::RELEASE, '12', '<')) {
     } else {
         $categoryId = $this->state->get('filter.category_id');
     }
     JToolBarHelper::title(JText::_('COM_TSJ_MANAGER_TARIF'));
     //Выводим кнопку настройки
     /*if (JFactory::getUser()->authorise('core.admin', 'com_tsj')) {
     		JToolBarHelper::preferences('com_tsj');
     		JToolBarHelper::divider();
     		}*/
     $toolbar = JToolBar::getInstance('toolbar');
     $toolbar->addButtonPath(JPATH_COMPONENT . DS . 'buttons');
     JToolBarHelper::addNew('tarif.add');
     JToolBarHelper::editList('tarif.edit');
     JToolBarHelper::deleteList('Вы действительно хотите удалить выбранные записи ?', 'tarif.remove');
     JToolBarHelper::help('com_tsj', true);
     if (version_compare(JPlatform::RELEASE, '12', '>=')) {
         JHtmlSidebar::setAction('index.php?option=com_tsj&view=default');
     }
 }
Example #3
0
 /**
  * Template types display method
  *
  * @copyright
  * @author 		RolandD
  * @todo
  * @see
  * @access 		public
  * @param
  * @return
  * @since 		4.0
  */
 public function display($tpl = null)
 {
     // Load the template types
     $this->templatetypes = $this->get('Items');
     // Get the pagination
     $this->pagination = $this->get('Pagination');
     // Load the user state
     $this->state = $this->get('State');
     // Render the submenu
     if (version_compare(JVERSION, '3.0', '>=')) {
         CsviHelper::addSubmenu('templatetypes');
         $this->sidebar = JHtmlSidebar::render();
     } else {
         // Get the panel
         $this->loadHelper('panel');
         $this->sidebar = '';
     }
     // Show the toolbar
     JToolBarHelper::title(JText::_('COM_CSVI_TEMPLATETYPES'), 'csvi_templates_48');
     JToolBarHelper::custom('templatetypes.reset', 'csvi_reset_32', 'csvi_reset_32', JText::_('COM_CSVI_RESET_SETTINGS'), false);
     JToolBarHelper::divider();
     JToolBarHelper::custom('templatetype.add', 'csvi_add_32', 'csvi_add_32', 'JTOOLBAR_NEW', false);
     JToolBarHelper::custom('templatetype.edit', 'csvi_edit_32', 'csvi_edit_32', 'JTOOLBAR_EDIT', true);
     JToolBarHelper::divider();
     JToolBarHelper::custom('templatetypes.publish', 'csvi_publish_32', 'csvi_publish_32', JText::_('JTOOLBAR_PUBLISH'), true);
     JToolBarHelper::custom('templatetypes.unpublish', 'csvi_unpublish_32', 'csvi_unpublish_32', JText::_('JTOOLBAR_UNPUBLISH'), true);
     //JToolBarHelper::help('about.html', true);
     // Display it all
     parent::display($tpl);
 }
Example #4
0
 protected function addToolbar()
 {
     $bar = JToolBar::getInstance('toolbar');
     $canDo = JCKHelper::getActions();
     JToolBarHelper::title(JText::_('COM_JCKMAN_SUBMENU_PLUGIN_NAME'), 'plugin.png');
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('list.edit');
     }
     //end if
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::publishList('list.publish');
         JToolBarHelper::unpublishList('list.unpublish');
         JToolbarHelper::checkin('list.checkin');
     }
     //end if
     // Add a Link button for Control Panel
     $bar->appendButton('Link', 'cpanel', JText::_('COM_JCKMAN_SUBMENU_CPANEL_NAME'), 'index.php?option=com_jckman&view=cpanel');
     JToolBarHelper::help($this->app->input->get('view'), false, 'http://www.joomlackeditor.com/installation-guide?start=14#plugin_man_help');
     JCKHelper::addSubmenu($this->app->input->get('view'));
     JHtmlSidebar::setAction('index.php?option=com_jckman&view=list');
     // FILTERS
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JCKHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state')));
     JHtmlSidebar::addFilter(JText::_('- Select Core Type -'), 'filter_iscore', JHtml::_('select.options', array(JHtml::_('select.option', '1', 'Core Plugins'), JHtml::_('select.option', '0', 'Not Core Plugins')), 'value', 'text', $this->state->get('filter.iscore')));
     $this->sidebar = JHtmlSidebar::render();
 }
Example #5
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/sibdiet.php';
     $state = $this->get('State');
     $canDo = SibdietHelper::getActions();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_ACTIVITIES'), 'database activities');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('activity.add');
     }
     if ($canDo->get('core.edit') && isset($this->items[0])) {
         JToolBarHelper::editList('activity.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::checkin('activities.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::publish('activities.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::deleteList('', 'activities.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('activities.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_sibdiet');
     }
     JHtmlSidebar::setAction('index.php?option=com_sibdiet&view=activities');
 }
Example #6
0
 /**
  * Add a menu on the sidebar of page
  */
 protected function addSidebar()
 {
     JHtmlSidebar::setAction('index.php?option=' . $this->option . '&view=' . $this->getName());
     $statesOptions = array(JHtml::_("select.option", 0, JText::_("COM_IDENTITYPROOF_NOT_VERIFIED")), JHtml::_("select.option", 1, JText::_("COM_IDENTITYPROOF_VERIFIED")));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', $statesOptions, 'value', 'text', $this->state->get('filter.state'), true));
     $this->sidebar = JHtmlSidebar::render();
 }
Example #7
0
 public function getDanhsach()
 {
     $data = $this->inputData();
     $vName = JRequest::getString('view');
     AdminTochucHelper::addSubmenu($vName);
     AdminTochucHelper::addButton($vName);
     $this->mainframe = JFactory::getApplication();
     $this->option = JRequest::getWord('option');
     $uri = JFactory::getURI();
     $status = $this->mainframe->getUserStateFromRequest($this->option . 'status', 'status', '', 'string');
     $filter_order = $this->mainframe->getUserStateFromRequest($this->option . 'filter_order', 'filter_order', 'name', 'cmd');
     $filter_order_Dir = $this->mainframe->getUserStateFromRequest($this->option . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $search = $this->mainframe->getUserStateFromRequest($this->option . 'search', 'search', '', 'string');
     if (strpos($search, '"') !== false) {
         $search = str_replace(array('=', '<'), '', $search);
     }
     $search = JString::strtolower($search);
     if (!in_array(strtoupper($filter_order_Dir), array('ASC', 'DESC'))) {
         $filter_order_Dir = '';
     }
     $javascript = 'onchange="document.adminForm.submit()"';
     $lists['status'] = JHTML::_('select.genericlist', array(array('value' => '', 'text' => '--Trạng thái--'), array('value' => '1', 'text' => 'Sử dụng'), array('value' => '0', 'text' => 'Không sử dụng')), 'status', $javascript . ' class="inputbox" size="1"', 'value', 'text', $status);
     $model = JModelLegacy::getInstance('tochucdang', 'TochucModel');
     $items = $model->listDanhsach($data['table']);
     $totals = $model->getTotal($data['table']);
     $pagination = $model->getPagination($data['table']);
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     $lists['search'] = $search;
     $this->sidebar = JHtmlSidebar::render();
     $this->assignRef('data', $data);
     $this->assignRef('lists', $lists);
     $this->assignRef('items', $items);
     $this->assignRef('pagination', $pagination);
 }
 /**
  * Add the page title and toolbar.
  *
  * @since  1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     JFactory::getApplication()->input->set('hidemainmenu', 1);
     $isNew = empty($this->item->lang_id);
     $canDo = $this->canDo;
     JToolbarHelper::title(JText::_($isNew ? 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE' : 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_EDIT_TITLE'), 'comments-2 langmanager');
     // If a new item, can save.
     if ($isNew && $canDo->get('core.create')) {
         JToolbarHelper::save('language.save');
     }
     //If an existing item, allow to Apply and Save.
     if (!$isNew && $canDo->get('core.edit')) {
         JToolbarHelper::apply('language.apply');
         JToolbarHelper::save('language.save');
     }
     // If an existing item, can save to a copy only if we have create rights.
     if ($canDo->get('core.create')) {
         JToolbarHelper::save2new('language.save2new');
     }
     if ($isNew) {
         JToolbarHelper::cancel('language.cancel');
     } else {
         JToolbarHelper::cancel('language.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_EDIT');
     $this->sidebar = JHtmlSidebar::render();
 }
Example #9
0
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_languages');
     JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'comments-2 langmanager');
     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('JGLOBAL_CONFIRM_DELETE', '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', 'upload', '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');
     JHtmlSidebar::setAction('index.php?option=com_languages&view=languages');
 }
Example #10
0
 /**
  * Configure the Linkbar.
  *
  * @param   string  $vName  The name of the active view.
  *
  * @return  void
  *
  * @since   1.6
  */
 public static function addSubmenu($vName)
 {
     JHtmlSidebar::addEntry(JText::_('COM_BANNERS_SUBMENU_BANNERS'), 'index.php?option=com_banners&view=banners', $vName == 'banners');
     JHtmlSidebar::addEntry(JText::_('COM_BANNERS_SUBMENU_CATEGORIES'), 'index.php?option=com_categories&extension=com_banners', $vName == 'categories');
     JHtmlSidebar::addEntry(JText::_('COM_BANNERS_SUBMENU_CLIENTS'), 'index.php?option=com_banners&view=clients', $vName == 'clients');
     JHtmlSidebar::addEntry(JText::_('COM_BANNERS_SUBMENU_TRACKS'), 'index.php?option=com_banners&view=tracks', $vName == 'tracks');
 }
Example #11
0
 function display($tpl = null)
 {
     $this->categories = $this->get('Categories');
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->countItems = $this->get('CountItems');
     $this->pagination = $this->get('Pagination');
     /*
     		jimport('joomla.html.pagination');		
     		$limit = JRequest::getVar('limit', '25', '', 'int');
     		$limitstart = JRequest::getVar('limitstart', '0', '', 'int');		
     		$pagination = new JPagination($this->countItems, $limitstart, $limit);
     		$this->pagination  = $pagination;*/
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     $version = new JVersion();
     if (version_compare($version->getShortVersion(), '3.0.0', '<')) {
         $tpl = 'legacy';
     } else {
         /*JHtmlSidebar::addFilter(
         			JText::_('JOPTION_SELECT_CATEGORY'),
         			'filter_category',
         			JHtml::_('select.options', DJClassifiedsCategory::getCatSelect(), 'value', 'text', $this->state->get('filter.category'), true)
         		);*/
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', array(JHtml::_('select.option', '1', 'JPUBLISHED'), JHtml::_('select.option', '0', 'JUNPUBLISHED')), 'value', 'text', $this->state->get('filter.published'), true));
         JHtmlSidebar::addFilter(JText::_('COM_DJCLASSIFIEDS_SELECT_ACTIVE'), 'filter_active', JHtml::_('select.options', array(JHtml::_('select.option', '1', 'COM_DJCLASSIFIEDS_ACTIVE'), JHtml::_('select.option', '0', 'COM_DJCLASSIFIEDS_HIDE')), 'value', 'text', $this->state->get('filter.active'), true));
         $this->sidebar = JHtmlSidebar::render();
     }
     parent::display($tpl);
 }
Example #12
0
 /**
  * Display the Message templates view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 function display($tpl = null)
 {
     // Get data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Add menu helper file
     require_once JPATH_COMPONENT . '/helpers/menu.php';
     // Add sidebar
     MenuHelper::addSubmenu('messagetemplates');
     // Load message type model
     $model = JModelLegacy::getInstance('messagetype', 'IssnregistryModel');
     // Load message types
     $types = $model->getMessageTypesHash();
     // Pass $types to the layout
     $this->assignRef('types', $types);
     // Set the toolbar
     $this->addToolBar();
     // Render the sidebar
     $this->sidebar = JHtmlSidebar::render();
     // Display the template
     parent::display($tpl);
 }
Example #13
0
 protected function addToolbar()
 {
     $state = $this->get('State');
     JToolBarHelper::title(JText::_('COM_XMAP_SITEMAPS_TITLE'), 'list');
     $canDo = JHelperContent::getActions('com_xmap', 'sitemap');
     JToolBarHelper::addNew('sitemap.add');
     JToolbarHelper::editList('sitemap.edit');
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('sitemaps.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('sitemaps.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'sitemaps.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('sitemaps.trash');
     }
     if ($canDo->get('core.manage')) {
         JToolbarHelper::custom('sitemaps.ping', 'heart', 'heart', JText::_('COM_XMAP_TOOLBAR_PING'));
     }
     if (JFactory::getUser()->authorise('core.admin')) {
         JToolbarHelper::preferences('com_xmap');
     }
     if (JHelperContent::getActions('com_plugins')->get('core.edit.state')) {
         JToolbarHelper::custom('sitemaps.plugins', 'power-cord', 'power-cord', JText::_('COM_XMAP_TOOLBAR_PLUGINS'), false);
     }
     JHtmlSidebar::setAction('index.php?option=com_xmap&view=sitemaps');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', XmapHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state')));
     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();
 }
Example #14
0
 function display($cachable = false, $urlparams = false)
 {
     $jshopConfig = JSFactory::getConfig();
     $mainframe = JFactory::getApplication();
     $context = "jshoping.list.admin.currencies";
     $filter_order = $mainframe->getUserStateFromRequest($context . 'filter_order', 'filter_order', "currency_ordering", 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', "asc", 'cmd');
     $current_currency = JSFactory::getTable('currency', 'jshop');
     $current_currency->load($jshopConfig->mainCurrency);
     if ($current_currency->currency_value != 1) {
         JError::raiseWarning("", _JSHOP_ERROR_MAIN_CURRENCY_VALUE);
     }
     $currencies = JSFactory::getModel("currencies");
     $rows = $currencies->getAllCurrencies(0, $filter_order, $filter_order_Dir);
     $view = $this->getView("currencies", 'html');
     $view->setLayout("list");
     $view->assign('rows', $rows);
     $view->assign('config', $jshopConfig);
     $view->assign('filter_order', $filter_order);
     $view->assign('filter_order_Dir', $filter_order_Dir);
     $view->sidebar = JHtmlSidebar::render();
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayCourencies', array(&$view));
     $view->displayList();
 }
Example #15
0
 /**
  * Add a menu on the sidebar of page
  */
 protected function addSidebar()
 {
     JHtmlSidebar::setAction('index.php?option=' . $this->option . '&view=' . $this->getName());
     $txnStatesOptions = array(JHtml::_("select.option", 1, JText::_("COM_CROWDFUNDINGDATA_COMPLETED")), JHtml::_("select.option", 0, JText::_("COM_CROWDFUNDINGDATA_NOT_COMPLETED")));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_transaction_state', JHtml::_('select.options', $txnStatesOptions, 'value', 'text', $this->state->get('filter.transaction_state'), true));
     $this->sidebar = JHtmlSidebar::render();
 }
Example #16
0
 function display($tpl = null)
 {
     $this->addToolbar();
     EventgalleryHelpersEventgallery::addSubmenu('events');
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
Example #17
0
 /**
  * About view display method
  * @return void
  * */
 function display($tpl = null)
 {
     // Load the form
     $this->form = $this->get('Form');
     // Load a list of tables
     $this->tablelist = $this->get('TableList');
     // Get ICEcat statistics
     $this->icecat_stats = $this->get('IcecatStats');
     // Render the submenu
     if (version_compare(JVERSION, '3.0', '>=')) {
         CsviHelper::addSubmenu('settings');
         $this->sidebar = JHtmlSidebar::render();
     } else {
         // Get the panel
         $this->loadHelper('panel');
         $this->sidebar = '';
     }
     // Show the toolbar
     JToolBarHelper::title(JText::_('COM_CSVI_SETTINGS_TITLE'), 'csvi_settings_48');
     JToolBarHelper::custom('settings.reset', 'csvi_reset_32', 'csvi_reset_32', JText::_('COM_CSVI_RESET_SETTINGS'), false);
     JToolBarHelper::custom('settings.save', 'csvi_save_32', 'csvi_save_32', JText::_('COM_CSVI_SAVE'), false);
     //JToolBarHelper::help('settings.html', true);
     // Display it all
     parent::display($tpl);
 }
Example #18
0
 /**
  * Display the view
  *
  * @param   string $tpl Template name
  *
  * @return void
  *
  * @throws Exception
  */
 public function display($tpl = null)
 {
     $this->langs = NenoHelper::getTargetLanguages(false);
     NenoHelperBackend::addSubmenu('');
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
Example #19
0
 /**
  * Configure the Linkbar.
  *
  * @param   string  $vName   The name of the active view.
  * @param   int     $client  The client id of the active view. Maybe be 0 or 1
  *
  * @return  void
  */
 public static function addSubmenu($vName, $client = 0)
 {
     JHtmlSidebar::addEntry(JText::_('COM_LANGUAGES_SUBMENU_INSTALLED_SITE'), 'index.php?option=com_languages&view=installed&client=0', $vName == 'installed' && $client === 0);
     JHtmlSidebar::addEntry(JText::_('COM_LANGUAGES_SUBMENU_INSTALLED_ADMINISTRATOR'), 'index.php?option=com_languages&view=installed&client=1', $vName == 'installed' && $client === 1);
     JHtmlSidebar::addEntry(JText::_('COM_LANGUAGES_SUBMENU_CONTENT'), 'index.php?option=com_languages&view=languages', $vName == 'languages');
     JHtmlSidebar::addEntry(JText::_('COM_LANGUAGES_SUBMENU_OVERRIDES'), 'index.php?option=com_languages&view=overrides', $vName == 'overrides');
 }
Example #20
0
 public function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->categories = Djc2Categories::getInstance();
     $user = JFactory::getUser();
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->ordering = array();
     foreach ($this->items as &$item) {
         if (!isset($this->ordering[$item->parent_id])) {
             $this->ordering[$item->parent_id] = array();
         }
         $this->ordering[$item->parent_id][] = $item->id;
     }
     $this->addToolbar();
     if (class_exists('JHtmlSidebar') && $user->authorise('core.admin')) {
         $this->sidebar = JHtmlSidebar::render();
     }
     $version = new JVersion();
     if (version_compare($version->getShortVersion(), '3.0.0', '<')) {
         $tpl = 'legacy';
     }
     parent::display($tpl);
 }
Example #21
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_FILTERS_TOOLBAR_TITLE'), 'finder');
     $toolbar = JToolbar::getInstance('toolbar');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('filter.add');
         JToolbarHelper::editList('filter.edit');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publishList('filters.publish');
         JToolbarHelper::unpublishList('filters.unpublish');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'filters.delete');
         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, 350);
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_SEARCH_FILTERS');
     JHtmlSidebar::setAction('index.php?option=com_finder&view=filters');
     JHtmlSidebar::addFilter(JText::_('COM_FINDER_INDEX_FILTER_BY_STATE'), 'filter_state', JHtml::_('select.options', JHtml::_('finder.statelist'), 'value', 'text', $this->state->get('filter.state')));
 }
Example #22
0
 /**
  * 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();
     }
 }
Example #23
0
 /**
  * Configure the Linkbar.
  */
 public static function addSubmenu($vName = '')
 {
     JHtmlSidebar::addEntry(JText::_('COM_AVAILABLE_ASSETS_TITLE_AIRCRAFTLIST'), 'index.php?option=com_available_assets&view=aircraftlist', $vName == 'aircraftlist');
     JHtmlSidebar::addEntry(JText::_('COM_AVAILABLE_ASSETS_TITLE_ADDITIONS'), 'index.php?option=com_available_assets&view=additions', $vName == 'additions');
     JHtmlSidebar::addEntry(JText::_('COM_AVAILABLE_ASSETS_TITLE_REMOVALS'), 'index.php?option=com_available_assets&view=removals', $vName == 'removals');
     JHtmlSidebar::addEntry(JText::_('COM_AVAILABLE_ASSETS_TITLE_UPDATES'), 'index.php?option=com_available_assets&view=updates', $vName == 'updates');
 }
Example #24
0
 function display($tpl = null)
 {
     $this->days = $this->get('Days');
     $this->countDays = $this->get('CountDays');
     $this->state = $this->get('State');
     jimport('joomla.html.pagination');
     $limit = JRequest::getVar('limit', '25', '', 'int');
     $limitstart = JRequest::getVar('limitstart', '0', '', 'int');
     $pagination = new JPagination($this->countDays, $limitstart, $limit);
     $this->pagination = $pagination;
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     if (class_exists('JHtmlSidebar')) {
         $this->sidebar = JHtmlSidebar::render();
     }
     $version = new JVersion();
     if (version_compare($version->getShortVersion(), '3.0.0', '<')) {
         $tpl = 'legacy';
     }
     parent::display($tpl);
 }
Example #25
0
 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     ContentHelper::addSubmenu('featured');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->authors = $this->get('Authors');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Levels filter.
     $options = array();
     $options[] = JHtml::_('select.option', '1', JText::_('J1'));
     $options[] = JHtml::_('select.option', '2', JText::_('J2'));
     $options[] = JHtml::_('select.option', '3', JText::_('J3'));
     $options[] = JHtml::_('select.option', '4', JText::_('J4'));
     $options[] = JHtml::_('select.option', '5', JText::_('J5'));
     $options[] = JHtml::_('select.option', '6', JText::_('J6'));
     $options[] = JHtml::_('select.option', '7', JText::_('J7'));
     $options[] = JHtml::_('select.option', '8', JText::_('J8'));
     $options[] = JHtml::_('select.option', '9', JText::_('J9'));
     $options[] = JHtml::_('select.option', '10', JText::_('J10'));
     $this->f_levels = $options;
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
Example #26
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')));
     }
 }
Example #27
0
 /**
  * Method to display the view.
  *
  * @param   string  $tpl  A template file to load. [optional]
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  *
  * @since   2.5
  */
 public function display($tpl = null)
 {
     // Load plug-in language files.
     FinderHelperLanguage::loadPluginLanguage();
     $this->items = $this->get('Items');
     $this->total = $this->get('Total');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->pluginState = $this->get('pluginState');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     FinderHelper::addSubmenu('index');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     if (!$this->pluginState['plg_content_finder']->enabled) {
         JFactory::getApplication()->enqueueMessage(JText::_('COM_FINDER_INDEX_PLUGIN_CONTENT_NOT_ENABLED'), 'warning');
     } elseif ($this->get('TotalIndexed') === 0) {
         JFactory::getApplication()->enqueueMessage(JText::_('COM_FINDER_INDEX_NO_DATA') . '  ' . JText::_('COM_FINDER_INDEX_TIP'), 'notice');
     }
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     // Configure the toolbar.
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
 function display($cachable = false, $urlparams = false)
 {
     $db = JFactory::getDBO();
     $_configdisplayprice = JSFactory::getModel("configDisplayPrice");
     $rows = $_configdisplayprice->getList();
     $countries = JSFactory::getModel("countries");
     $list = $countries->getAllCountries(0);
     $countries_name = array();
     foreach ($list as $v) {
         $countries_name[$v->country_id] = $v->name;
     }
     foreach ($rows as $k => $v) {
         $list = unserialize($v->zones);
         foreach ($list as $k2 => $v2) {
             $list[$k2] = $countries_name[$v2];
         }
         if (count($list) > 10) {
             $tmp = array_slice($list, 0, 10);
             $rows[$k]->countries = implode(", ", $tmp) . "...";
         } else {
             $rows[$k]->countries = implode(", ", $list);
         }
     }
     $typedisplay = array(0 => _JSHOP_PRODUCT_BRUTTO_PRICE, 1 => _JSHOP_PRODUCT_NETTO_PRICE);
     $view = $this->getView("config_display_price", 'html');
     $view->setLayout("list");
     $view->assign('rows', $rows);
     $view->assign('typedisplay', $typedisplay);
     $view->sidebar = JHtmlSidebar::render();
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayConfigDisplayPrice', array(&$view));
     $view->displayList();
 }
Example #29
0
 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise an Error object.
  *
  * @since   1.6
  */
 public function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // Modal layout doesn't need the submenu.
     if ($this->getLayout() !== 'modal') {
         NewsfeedsHelper::addSubmenu('newsfeeds');
     }
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // We don't need toolbar in the modal layout.
     if ($this->getLayout() !== 'modal') {
         $this->addToolbar();
         $this->sidebar = JHtmlSidebar::render();
     } else {
         // In article associations modal we need to remove language filter if forcing a language.
         // We also need to change the category filter to show show categories with All or the forced language.
         if ($forcedLanguage = JFactory::getApplication()->input->get('forcedLanguage', '', 'CMD')) {
             // If the language is forced we can't allow to select the language, so transform the language selector filter into an hidden field.
             $languageXml = new SimpleXMLElement('<field name="language" type="hidden" default="' . $forcedLanguage . '" />');
             $this->filterForm->setField($languageXml, 'filter', true);
             // Also, unset the active language filter so the search tools is not open by default with this filter.
             unset($this->activeFilters['language']);
             // One last changes needed is to change the category filter to just show categories with All language or with the forced language.
             $this->filterForm->setFieldAttribute('category_id', 'language', '*,' . $forcedLanguage, 'filter');
         }
     }
     parent::display($tpl);
 }
Example #30
-1
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_templates');
     JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_STYLES'), 'eye thememanager');
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::makeDefault('styles.setDefault', 'COM_TEMPLATES_TOOLBAR_SET_HOME');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('style.edit');
     }
     if ($canDo->get('core.create')) {
         JToolbarHelper::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'styles.delete');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_templates');
         JToolbarHelper::divider();
     }
     JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_STYLES');
     JHtmlSidebar::setAction('index.php?option=com_templates&view=styles');
     JHtmlSidebar::addFilter(JText::_('COM_TEMPLATES_FILTER_TEMPLATE'), 'filter_template', JHtml::_('select.options', TemplatesHelper::getTemplateOptions($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.template')));
     JHtmlSidebar::addFilter(JText::_('JGLOBAL_FILTER_CLIENT'), 'filter_client_id', JHtml::_('select.options', TemplatesHelper::getClientOptions(), 'value', 'text', $this->state->get('filter.client_id')));
 }