Exemplo n.º 1
2
 /**
  * Setup the Toolbar.
  */
 protected function _setToolbar()
 {
     $state = $this->get('State');
     $canDo = TemplatesHelper::getActions();
     $isSite = $state->get('filter.client_id') == 0;
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('style.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::custom('styles.sethome', 'default.png', 'default_f2.png', 'Templates_Toolbar_Set_Home', true);
     }
     JToolBarHelper::title(JText::_('Templates_Manager_Styles'), 'thememanager');
     if ($canDo->get('core.create') && $isSite) {
         JToolBarHelper::addNew('styles.duplicate', 'Templates_Toolbar_Save_Copy');
     }
     if ($canDo->get('core.delete') && $isSite) {
         JToolBarHelper::deleteList('', 'styles.delete');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_templates');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.templates');
 }
Exemplo n.º 2
2
 /**
  * Add the page title and toolbar.
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     if (isset($this->item->checked_out)) {
         $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     } else {
         $checkedOut = false;
     }
     $canDo = SomosmaestrosHelper::getActions();
     JToolBarHelper::title(JText::_('COM_SOMOSMAESTROS_TITLE_FORMACION'), 'formacion.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('formacion.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('formacion.save', 'JTOOLBAR_SAVE');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::custom('formacion.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('formacion.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('formacion.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('formacion.cancel', 'JTOOLBAR_CLOSE');
     }
 }
Exemplo n.º 3
1
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_('COM_REDSOCIALSTREAM_CONFIGURE'), 'configure.png');
     JToolBarHelper::apply();
     JToolBarHelper::cancel('cancel', 'COM_REDSOCIALSTREAM_CLOSE');
     //DEVNOTE: set document title
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_REDSOCIALSTREAM_REDSOCIALSTREAMS'));
     $mainframe = JFactory::getApplication();
     $context = "config";
     $model = $this->getModel('configure');
     $db = JFactory::getDbo();
     $q = "SELECT * FROM #__redsocialstream_settings";
     $db->setQuery($q);
     $this->settingsrows = $db->loadObjectList();
     $typelist = $this->get('type_list_sorted');
     $pagination = $this->get('Pagination');
     //DEVNOTE:give me ordering from request
     $filter_order = $mainframe->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'ordering');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', '');
     $this->assignRef('lists', $lists);
     $this->assignRef("typelist", $typelist);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
Exemplo n.º 4
1
 /**
  * Add the page title and toolbar.
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = SibdietHelper::getActions();
     JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_ERRAND'), 'database errands');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('errand.apply');
         JToolBarHelper::save('errand.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolbarHelper::save2new('errand.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolbarHelper::save2copy('errand.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('errand.cancel');
     } else {
         JToolBarHelper::cancel('errand.cancel', 'JTOOLBAR_CLOSE');
     }
 }
Exemplo n.º 5
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');
     }
 }
Exemplo n.º 6
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = JDownloadsHelper::getActions();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     $title = $isNew ? JText::_('COM_JDOWNLOADS_LICEDIT_ADD') : JText::_('COM_JDOWNLOADS_LICEDIT_EDIT');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . $title, 'jdlicenses');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('license.apply');
         JToolBarHelper::save('license.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('license.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('license.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('license.cancel');
     } else {
         JToolBarHelper::cancel('license.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('help.license', true);
 }
Exemplo n.º 7
0
 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     JToolBarHelper::title(JText::_('COM_BOOKINGFORCONNECTOR_ADMINISTRATION_TITLE'), 'BookingFor Connector');
     //		JToolBarHelper::title('BookingFor Connector');
     //JToolBarHelper::addNew('helloworld.add');
     JToolBarHelper::preferences('com_bookingforconnector');
 }
Exemplo n.º 8
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'jms.php';
     $state = $this->get('State');
     $canDo = JmsHelper::getActions($state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('COM_JMS_TITLE_COUPONS'), 'coupon.png');
     //Check if the form exists before showing the add/edit buttons
     $formPath = JPATH_COMPONENT_ADMINISTRATOR . DS . 'views' . DS . 'coupon';
     if (file_exists($formPath)) {
         if ($canDo->get('core.create')) {
             JToolBarHelper::addNew('coupon.add', 'JTOOLBAR_NEW');
         }
         if ($canDo->get('core.edit')) {
             JToolBarHelper::editList('coupon.edit', 'JTOOLBAR_EDIT');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('coupons.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::custom('coupons.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::archiveList('coupons.archive', 'JTOOLBAR_ARCHIVE');
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::divider();
         JToolBarHelper::deleteList('', 'coupons.delete', 'JTOOLBAR_DELETE');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_jms');
     }
 }
Exemplo n.º 9
0
 function display($tpl = null)
 {
     $entry = $this->get('Data');
     $characters_length = $this->get('CharactersLength');
     $robots_array = array('', 'index, follow', 'noindex, follow', 'index, nofollow', 'noindex, nofollow');
     if (empty($entry->id)) {
         JToolBarHelper::title(JText::_('COM_EASYFRONTENDSEO') . ' - ' . JText::_('COM_EASYFRONTENDSEO_NEWENTRY'), 'easyfrontendseo-add');
         JToolBarHelper::save('save');
         JToolBarHelper::cancel('cancel');
     } else {
         JToolBarHelper::title(JText::_('COM_EASYFRONTENDSEO') . ' - ' . JText::_('COM_EASYFRONTENDSEO_EDITENTRY'), 'easyfrontendseo-edit');
         JToolbarHelper::apply('apply');
         JToolBarHelper::save('save');
         JToolBarHelper::cancel('cancel', 'Close');
     }
     JHTML::_('behavior.framework');
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_easyfrontendseo/css/easyfrontendseo.css');
     $document->addScript('components/com_easyfrontendseo/js/wordcount.js', 'text/javascript');
     $output = "window.addEvent('domready', function(){";
     $output .= "new WordCount('counter_title', {inputName:'title', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_title', {inputName:'title', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= "new WordCount('counter_description', {inputName:'description', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_description', {inputName:'description', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= "new WordCount('counter_keywords', {inputName:'keywords', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_keywords', {inputName:'keywords', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= "new WordCount('counter_generator', {inputName:'generator', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_generator', {inputName:'generator', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= " });";
     $document->addScriptDeclaration($output, 'text/javascript');
     $this->entry = $entry;
     $this->characters_length = $characters_length;
     $this->robots_array = $robots_array;
     // Get donation code message
     require_once JPATH_COMPONENT . '/helpers/easyfrontendseo.php';
     $donation_code_message = EasyFrontendSeoHelper::getDonationCodeMessage();
     $this->donation_code_message = $donation_code_message;
     parent::display($tpl);
 }
Exemplo n.º 10
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', 1);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = UsersHelper::getActions();
     JToolBarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_GROUP_TITLE' : 'COM_USERS_VIEW_EDIT_GROUP_TITLE'), 'groups-add');
     if ($canDo->get('core.edit') || $canDo->get('core.create')) {
         JToolBarHelper::apply('group.apply');
         JToolBarHelper::save('group.save');
     }
     if ($canDo->get('core.create')) {
         JToolBarHelper::save2new('group.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('group.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('group.cancel');
     } else {
         JToolBarHelper::cancel('group.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_USERS_GROUPS_EDIT');
 }
Exemplo n.º 11
0
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     // Built the actions for new and existing records.
     $canDo = JHelperContent::getActions('com_testyourself');
     JToolBarHelper::title(JText::_('COM_TESTYOURSELF_MANAGER_QUESTION'), 'question questions');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('question.apply');
         JToolBarHelper::save('question.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolbarHelper::save2new('question.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolbarHelper::save2copy('question.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('question.cancel');
     } else {
         JToolBarHelper::cancel('question.cancel', 'JTOOLBAR_CLOSE');
     }
 }
Exemplo n.º 12
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();
     }
 }
Exemplo n.º 13
0
	function display ($tpl = null) {

		// Load the helper(s)


		jimport('joomla.filesystem.file');
		$config = JFactory::getConfig();
		$log_path = $config->get('log_path', VMPATH_ROOT . "/log");
		$layoutName = vRequest::getCmd('layout', 'default');
		VmConfig::loadJLang('com_virtuemart_log');

		if ($layoutName == 'edit') {
			$logFile = vRequest::getString('logfile', '');
			$this->SetViewTitle('LOG', $logFile);
			$fileContent = file_get_contents($log_path . DS . $logFile);
			$fileContentByLine = explode("\n", $fileContent);

			$this->assignRef('fileContentByLine', $fileContentByLine);
			JToolBarHelper::cancel();

		} else {
			if(!class_exists('JFolder')) require(VMPATH_LIBS.DS.'joomla'.DS.'filesystem'.DS.'folder.php');

			$logFiles = JFolder::files($log_path, $filter = '.', true, false, array('index.html'));

			$this->SetViewTitle('LOG');
			$this->assignRef('logFiles', $logFiles);
			$this->assignRef('path', $log_path);
		}

		parent::display($tpl);
	}
Exemplo n.º 14
0
 public function display($tpl = null)
 {
     JToolBarHelper::title(JText::_('COM_REDSHOP_GIFTCARD_MANAGEMENT'), 'redshop_giftcard_48');
     $uri = JFactory::getURI();
     jimport('joomla.html.pane');
     $pane = JPane::getInstance('sliders');
     $this->pane = $pane;
     $this->setLayout('default');
     $lists = array();
     $detail = $this->get('data');
     $isNew = $detail->giftcard_id < 1;
     $text = $isNew ? JText::_('COM_REDSHOP_NEW') : JText::_('COM_REDSHOP_EDIT');
     JToolBarHelper::title(JText::_('COM_REDSHOP_GIFTCARDS') . ': <small><small>[ ' . $text . ' ]</small></small>', 'redshop_giftcard_48');
     JToolBarHelper::apply();
     JToolBarHelper::save();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         JToolBarHelper::cancel('cancel', JText::_('JTOOLBAR_CLOSE'));
     }
     $lists['customer_amount'] = JHTML::_('select.booleanlist', 'customer_amount', 'class="inputbox" ', $detail->customer_amount);
     $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $detail->published);
     if (ECONOMIC_INTEGRATION == 1) {
         $redhelper = new redhelper();
         $accountgroup = $redhelper->getEconomicAccountGroup();
         $op = array();
         $op[] = JHTML::_('select.option', '0', JText::_('COM_REDSHOP_SELECT'));
         $accountgroup = array_merge($op, $accountgroup);
         $lists["accountgroup_id"] = JHTML::_('select.genericlist', $accountgroup, 'accountgroup_id', 'class="inputbox" size="1" ', 'value', 'text', $detail->accountgroup_id);
     }
     $this->lists = $lists;
     $this->detail = $detail;
     $this->request_url = $uri->toString();
     parent::display($tpl);
 }
Exemplo n.º 15
0
 /**
  * Add toolbar for this view
  */
 protected function addToolBar()
 {
     JSNFactory::localimport('helpers.html.jsntoolbar');
     JToolbarHelper::title(JText::_('JSN_RAW_LAYOUT_MANAGER_TITLE'), 'poweradmin-rawmode');
     JSNToolBarHelper::switchmode('poweradmin-rawmode-help', JText::_('JSN_RAWMODE_HELP_CONTENT_TEXT', true), JText::_('JSN_RAWMODE_HELP_CONTENT_TITLE_SHOW', true), JText::_('JSN_RAWMODE_HELP_CONTENT_TITLE_HIDE', true));
     JToolBarHelper::spacer(5);
 }
Exemplo n.º 16
0
 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $user = JFactory::getUser();
     $option = JRequest::getCmd('option');
     $view = JRequest::getCmd('view');
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
     $limitstart = $mainframe->getUserStateFromRequest($option . $view . '.limitstart', 'limitstart', 0, 'int');
     $filter_order = $mainframe->getUserStateFromRequest($option . $view . 'filter_order', 'filter_order', '', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . $view . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $model = $this->getModel();
     $total = $model->getTotalGroups();
     if ($limitstart > $total - $limit) {
         $limitstart = max(0, (int) (ceil($total / $limit) - 1) * $limit);
         JRequest::setVar('limitstart', $limitstart);
     }
     $extraFieldGroups = $model->getGroups();
     $this->assignRef('rows', $extraFieldGroups);
     jimport('joomla.html.pagination');
     $pageNav = new JPagination($total, $limitstart, $limit);
     $this->assignRef('page', $pageNav);
     JToolBarHelper::title(JText::_('K2_EXTRA_FIELD_GROUPS'), 'k2.png');
     JToolBarHelper::deleteList('', 'remove', 'K2_DELETE');
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     if (K2_JVERSION != '15') {
         JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
     } else {
         $toolbar = JToolBar::getInstance('toolbar');
         $toolbar->appendButton('Popup', 'config', 'Parameters', 'index.php?option=com_k2&view=settings');
     }
     $this->loadHelper('html');
     K2HelperHTML::subMenu();
     parent::display($tpl);
 }
Exemplo n.º 17
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);
 }
Exemplo n.º 18
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     // Since we don't track these assets at the item level, use the category id.
     $canDo = BannersHelper::getActions($this->item->catid, 0);
     JToolBarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_BANNER_NEW') : JText::_('COM_BANNERS_MANAGER_BANNER_EDIT'), 'banners.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0)) {
         JToolBarHelper::apply('banner.apply');
         JToolBarHelper::save('banner.save');
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2new('banner.save2new');
         }
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('banner.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('banner.cancel');
     } else {
         JToolBarHelper::cancel('banner.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS_EDIT');
 }
Exemplo n.º 19
0
    /**
     * Renders the view
     *
     * @param   string  $tpl  Template name
     *
     * @return void
     */
    public function display($tpl = null)
    {
        $password = JFactory::getApplication()->getUserState('com_joomlaupdate.password', null);
        $filesize = JFactory::getApplication()->getUserState('com_joomlaupdate.filesize', null);
        $ajaxUrl = JUri::base() . 'components/com_joomlaupdate/restore.php';
        $returnUrl = 'index.php?option=com_joomlaupdate&task=update.finalise';
        // Set the toolbar information
        JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install');
        JToolBarHelper::divider();
        JToolBarHelper::help('JHELP_COMPONENTS_JOOMLA_UPDATE');
        // Add toolbar buttons
        if (JFactory::getUser()->authorise('core.admin', 'com_joomlaupdate')) {
            JToolbarHelper::preferences('com_joomlaupdate');
        }
        // Load mooTools
        JHtml::_('behavior.framework', true);
        $updateScript = <<<ENDSCRIPT
var joomlaupdate_password = '******';
var joomlaupdate_totalsize = '{$filesize}';
var joomlaupdate_ajax_url = '{$ajaxUrl}';
var joomlaupdate_return_url = '{$returnUrl}';

ENDSCRIPT;
        // Load our Javascript
        $document = JFactory::getDocument();
        $document->addScript('../media/com_joomlaupdate/json2.js');
        $document->addScript('../media/com_joomlaupdate/encryption.js');
        $document->addScript('../media/com_joomlaupdate/update.js');
        JHtml::_('script', 'system/progressbar.js', true, true);
        JHtml::_('stylesheet', 'media/mediamanager.css', array(), true);
        $document->addScriptDeclaration($updateScript);
        // Render the view
        parent::display($tpl);
    }
Exemplo n.º 20
0
 function display($tpl = null)
 {
     $prod =& $this->get('Data');
     $isNew = $prod->id < 1;
     $text = $isNew ? JText::_("NEW") : JText::_("EDIT");
     JToolBarHelper::title(JText::_("PRODUCT") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fst_prods');
     if (FST_Helper::Is16()) {
         JToolBarHelper::custom('translate', 'translate', 'translate', 'Translate', false);
         JToolBarHelper::spacer();
     }
     JToolBarHelper::save();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'Close');
     }
     FSTAdminHelper::DoSubToolbar();
     $this->assignRef('prod', $prod);
     $path = JPATH_SITE . DS . 'images' . DS . 'fst' . DS . 'products';
     if (!file_exists($path)) {
         mkdir($path, 0777, true);
     }
     $files = JFolder::files($path, '(.png$|.jpg$|.jpeg$|.gif$)');
     $sections[] = JHTML::_('select.option', '', JText::_("NO_IMAGE"), 'id', 'title');
     foreach ($files as $file) {
         $sections[] = JHTML::_('select.option', $file, $file, 'id', 'title');
     }
     $lists['images'] = JHTML::_('select.genericlist', $sections, 'image', 'class="inputbox" size="1" ', 'id', 'title', $prod->image);
     $this->assignRef('lists', $lists);
     parent::display($tpl);
 }
Exemplo n.º 21
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
     JToolBarHelper::title(JText::_($isNew ? 'COM_MENUS_VIEW_NEW_MENU_TITLE' : 'COM_MENUS_VIEW_EDIT_MENU_TITLE'), 'menu.png');
     // If a new item, can save the item.  Allow users with edit permissions to apply changes to prevent returning to grid.
     if ($isNew && $canDo->get('core.create')) {
         if ($canDo->get('core.edit')) {
             JToolBarHelper::apply('menu.apply');
         }
         JToolBarHelper::save('menu.save');
     }
     // If user can edit, can save the item.
     if (!$isNew && $canDo->get('core.edit')) {
         JToolBarHelper::apply('menu.apply');
         JToolBarHelper::save('menu.save');
     }
     // If the user can create new items, allow them to see Save & New
     if ($canDo->get('core.create')) {
         JToolBarHelper::save2new('menu.save2new');
     }
     if ($isNew) {
         JToolBarHelper::cancel('menu.cancel');
     } else {
         JToolBarHelper::cancel('menu.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_MENUS_MENU_MANAGER_EDIT');
 }
Exemplo n.º 22
0
 function _setToolBar()
 {
     JToolBarHelper::title(JText::_('USER_RESOURCES_MANAGER'), 'addedit');
     JToolBarHelper::save('save_resources');
     JToolBarHelper::apply('apply_resources');
     JToolBarHelper::cancel();
 }
Exemplo n.º 23
0
 protected function addToolBar()
 {
     JToolBarHelper::title(JText::_('COM_TEST_MANAGER_NEW'));
     JToolBarHelper::addNew('test.add');
     JToolBarHelper::editList('test.edit');
     JToolBarHelper::deleteList('', 'new.delete');
 }
Exemplo n.º 24
0
 function display($tpl = null)
 {
     //Load pane behavior
     jimport('joomla.html.pane');
     //initialise variables
     $document =& JFactory::getDocument();
     $pane =& JPane::getInstance('sliders');
     $user =& JFactory::getUser();
     //build toolbar
     JToolBarHelper::title(JText::_('IMPORT'), 'home');
     JToolBarHelper::help('el.import', true);
     // Get data from the model
     $eventfields =& $this->get('EventFields');
     $catfields =& $this->get('CategoryFields');
     //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', true);
     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::_('ARCHIVESCREEN'), 'index.php?option=com_eventlist&view=archive');
     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');
     }
     //assign vars to the template
     $this->assignRef('eventfields', $eventfields);
     $this->assignRef('catfields', $catfields);
     parent::display($tpl);
 }
Exemplo n.º 25
0
 /**
  * Validates the data submitted based on the suffix provided
  * A controller for this plugin, you could say
  *
  * @param $task
  * @return html
  */
 function viewList()
 {
     $app = JFactory::getApplication();
     $option = 'com_j2store';
     $ns = $option . '.report';
     $html = "";
     JToolBarHelper::title(JText::_('J2STORE_REPORT') . '-' . JText::_('PLG_J2STORE_' . strtoupper($this->_element)), 'j2store-logo');
     $vars = new JObject();
     $this->includeCustomModel('Reportitemised');
     $this->includeCustomTables();
     $model = F0FModel::getTmpInstance('ReportItemised', 'J2StoreModel');
     $model->setState('limit', $app->input->getInt('limit', 0));
     $model->setState('limitstart', $app->input->getInt('limitstart', 0));
     $model->setState('filter_search', $app->input->getString('filter_search'));
     $model->setState('filter_orderstatus', $app->input->getString('filter_orderstatus'));
     $model->setState('filter_order', $app->input->getString('filter_order'));
     $model->setState('filter_order_Dir', $app->input->getString('filter_order_Dir'));
     $list = $model->getData();
     //$list = $model->getList();
     $vars->state = $model->getState();
     $vars->list = $list;
     $vars->total = $model->getTotal();
     $vars->pagination = $model->getPagination();
     $vars->orderStatus = F0FModel::getTmpInstance('OrderStatuses', 'J2StoreModel')->enabled(1)->getList();
     $id = $app->input->getInt('id', '0');
     $vars->id = $id;
     $form = array();
     $form['action'] = "index.php?option=com_j2store&view=report&task=view&id={$id}";
     $vars->form = $form;
     $html = $this->_getLayout('default', $vars);
     return $html;
 }
Exemplo n.º 26
0
 /**
  * Setting the toolbar
  */
 public function addToolbar()
 {
     $input = JFactory::getApplication()->input;
     $input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->id;
     $isNew = $this->item->id == 0;
     JToolbarHelper::title($isNew ? JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW') : JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT'));
     if ($isNew) {
         if ($this->canDo->get('core.create')) {
             JToolBarHelper::apply('helloworld.apply', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('helloworld.save', 'JTOOLBAR_SAVE');
             JToolBarHelper::custom('helloworld.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
         }
         JToolBarHelper::cancel('helloworld.cancel', 'JTOOLBAR_CANCEL');
         JToolbarHelper::save('helloworld.save');
         JToolbarHelper::cancel('helloworld.cancel', $isNew ? 'JTOOLBAR_CANCEL' : 'JTOOLBAR_CLOSE');
     } else {
         if ($this->canDo->get('core.edit')) {
             // We can save the new record
             JToolBarHelper::apply('helloworld.apply', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('helloworld.save', 'JTOOLBAR_SAVE');
             // We can save this record, but check the create permission to see
             // if we can return to make a new one.
             if ($this->canDo->get('core.create')) {
                 JToolBarHelper::custom('helloworld.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
             }
         }
         if ($this->canDo->get('core.create')) {
             JToolBarHelper::custom('helloworld.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
         }
         JToolBarHelper::cancel('helloworld.cancel', 'JTOOLBAR_CLOSE');
     }
 }
Exemplo n.º 27
0
 function display($tpl = null)
 {
     if (JRequest::getString('task') != 'edit' && JRequest::getString('task') != 'add') {
         JToolBarHelper::title('J-HotelReservation : ' . JText::_('LNG_MANAGE_TAXES', true), 'generic.png');
         JRequest::setVar('hidemainmenu', 1);
         $hotel_id = $this->get('HotelId');
         if ($hotel_id > 0) {
             JToolBarHelper::addNew('managetaxes.edit');
             JToolBarHelper::editList('managetaxes.edit');
             JToolBarHelper::deleteList('', 'managetaxes.delete', JText::_('LNG_DELETE', true));
             JToolBarHelper::custom('managetaxes.back', JHotelUtil::getDashBoardIcon(), 'home', JText::_('LNG_HOTEL_DASHBOARD', true), false, false);
         }
         $this->hotel_id = $hotel_id;
         $items = $this->get('Datas');
         $this->items = $items;
         $hotels = $this->get('Hotels');
         $hotels = checkHotels(JFactory::getUser()->id, $hotels);
         $this->hotels = $hotels;
     } else {
         $item = $this->get('Data');
         $this->item = $item;
         $hotel_id = $this->get('HotelId');
         $this->hotel_id = $hotel_id;
         $hotel = $this->get('Hotel');
         $this->hotel = $hotel;
         JToolBarHelper::title('J-Hotel Reservation : ' . ($item->tax_id > 0 ? JText::_("LNG_EDIT", true) : JText::_("LNG_ADD_NEW", true)) . ' ' . JText::_('LNG_TAX', true), 'generic.png');
         JRequest::setVar('hidemainmenu', 1);
         JToolBarHelper::cancel('managetaxes.back');
         JToolBarHelper::save('managetaxes.save');
     }
     parent::display($tpl);
 }
Exemplo n.º 28
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = NewsfeedsHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     JToolBarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEED'), 'newsfeeds.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0)) {
         JToolBarHelper::apply('newsfeed.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('newsfeed.save', 'JTOOLBAR_SAVE');
     }
     if (!$checkedOut && count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
         JToolBarHelper::custom('newsfeed.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('newsfeed.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT');
 }
Exemplo n.º 29
0
	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 */
	protected function addToolbar()
	{
		
		$canDo = TagnyilvantartasHelper::getActions();
		$user = JFactory::getUser();
		JToolBarHelper::title( JText::_( 'Cimkek' ), 'generic.png' );
		if ($canDo->get('core.create')) {
			JToolBarHelper::addNew('cimkek.add');
		}	
		
		if (($canDo->get('core.edit')))
		{
			JToolBarHelper::editList('cimkek.edit');
		}
		
				
				

		if ($canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('COM_TAGNYILVANTARTAS_SURE_DELETE', 'cimkeks.delete', 'JACTION_DELETE');
		}
				
		
		JToolBarHelper::preferences('com_tagnyilvantartas', '550');  
		if(!version_compare(JVERSION,'3','<')){		
			JHtmlSidebar::setAction('index.php?option=com_tagnyilvantartas&view=cimkeks');
		}
				
					
	}	
Exemplo 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');
 }