Ejemplo n.º 1
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');
     }
 }
Ejemplo n.º 2
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);
 }
Ejemplo n.º 3
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');
     }
 }
Ejemplo n.º 4
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);
	}
Ejemplo n.º 5
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);
 }
Ejemplo n.º 6
0
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jcomments.php';
     JFactory::getApplication()->input->set('hidemainmenu', 1);
     $userId = JFactory::getUser()->get('id');
     $canDo = JCommentsHelper::getActions();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     if (version_compare(JVERSION, '3.0', 'ge')) {
         JToolbarHelper::title($isNew ? JText::_('A_SMILIES_SMILEY_NEW') : JText::_('A_SMILIES_SMILEY_EDIT'), 'smilies.png');
     } else {
         JToolbarHelper::title($isNew ? JText::_('A_SMILIES_SMILEY_NEW') : JText::_('A_SMILIES_SMILEY_EDIT'), 'jcomments-smilies');
     }
     if (!$checkedOut && $canDo->get('core.edit')) {
         JToolBarHelper::apply('smiley.apply');
         JToolBarHelper::save('smiley.save');
     }
     if (!$isNew && $canDo->get('core.create')) {
         JToolbarHelper::save2new('smiley.save2new');
     }
     if ($isNew) {
         JToolBarHelper::cancel('smiley.cancel');
     } else {
         JToolBarHelper::cancel('smiley.cancel', 'JTOOLBAR_CLOSE');
     }
 }
Ejemplo n.º 7
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 = BannersHelper::getActions();
     JToolBarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_CLIENT_NEW') : JText::_('COM_BANNERS_MANAGER_CLIENT_EDIT'), 'banners-clients.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('client.apply');
         JToolBarHelper::save('client.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('client.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('client.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('client.cancel');
     } else {
         JToolBarHelper::cancel('client.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS_EDIT');
 }
Ejemplo n.º 8
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');
     }
 }
Ejemplo n.º 9
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);
 }
Ejemplo n.º 10
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');
 }
Ejemplo n.º 11
0
 /**
  * Sets the toolbar.
  */
 protected function addToolBar()
 {
     $canDo = SimpleCustomRouterHelper::getActions();
     $isNew = $this->item->id == 0;
     if ($isNew) {
         JToolBarHelper::title(JText::_('COM_SIMPLECUSTOMROUTER_MANAGER_ROUTE_NEW'));
         if ($canDo->get('core.create')) {
             JToolBarHelper::apply('route.apply');
             JToolBarHelper::save('route.save');
             JToolBarHelper::save2new('route.save2new');
         }
         JToolBarHelper::cancel('route.cancel');
     } else {
         JToolBarHelper::title(JText::_('COM_SIMPLECUSTOMROUTER_MANAGER_ROUTE_EDIT'));
         if ($canDo->get('core.edit')) {
             JToolBarHelper::apply('route.apply');
             JToolBarHelper::save('route.save');
             if ($canDo->get('core.create')) {
                 JToolBarHelper::save2new('route.save2new');
             }
         }
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2copy('route.save2copy');
         }
         JToolBarHelper::cancel('route.cancel', 'JTOOLBAR_CLOSE');
     }
 }
Ejemplo n.º 12
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 = TemplatesHelper::getActions();
     JToolBarHelper::title($isNew ? JText::_('COM_TEMPLATES_MANAGER_ADD_STYLE') : JText::_('COM_TEMPLATES_MANAGER_EDIT_STYLE'), 'thememanager');
     // If not checked out, can save the item.
     if ($canDo->get('core.edit')) {
         JToolBarHelper::apply('style.apply');
         JToolBarHelper::save('style.save');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('style.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('style.cancel');
     } else {
         JToolBarHelper::cancel('style.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     // Get the help information for the template item.
     $lang = JFactory::getLanguage();
     $help = $this->get('Help');
     if ($lang->hasKey($help->url)) {
         $debug = $lang->setDebug(false);
         $url = JText::_($help->url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     JToolBarHelper::help($help->key, false, $url);
 }
Ejemplo n.º 13
0
 /**
  * Add the page title and toolbar.
  *
  * @return void
  *
  * @throws Exception
  */
 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 = VocabHelper::getActions();
     JToolBarHelper::title(JText::_('COM_VOCAB_TITLE_SUBJECT'), 'subject.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('subject.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('subject.save', 'JTOOLBAR_SAVE');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::custom('subject.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('subject.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     // Button for version control
     if ($this->state->params->get('save_history', 1) && $user->authorise('core.edit')) {
         JToolbarHelper::versions('com_vocab.subject', $this->item->id);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('subject.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('subject.cancel', 'JTOOLBAR_CLOSE');
     }
 }
Ejemplo n.º 14
0
 /**
  * Add the page title and toolbar.
  *
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $uid = JFactory::getUser()->get('id');
     $access = PFtasksHelper::getListActions($this->item->id);
     $checked_out = !($this->item->checked_out == 0 || $this->item->checked_out == $uid);
     $is_new = $this->item->id == 0;
     JToolBarHelper::title(JText::_('COM_PROJECTFORK_PAGE_' . ($checked_out ? 'VIEW_TASKLIST' : ($is_new ? 'ADD_TASKLIST' : 'EDIT_TASKLIST'))), 'article-add.png');
     // Built the actions for new and existing records.
     // For new records, check the create permission.
     if ($is_new) {
         JToolBarHelper::apply('tasklist.apply');
         JToolBarHelper::save('tasklist.save');
         JToolBarHelper::save2new('tasklist.save2new');
         JToolBarHelper::cancel('tasklist.cancel');
     } else {
         // Can't save the record if it's checked out.
         if (!$checked_out) {
             if ($access->get('core.edit') || $access->get('core.edit.own') && $this->item->created_by == $uid) {
                 JToolBarHelper::apply('tasklist.apply');
                 JToolBarHelper::save('tasklist.save');
                 JToolBarHelper::save2new('tasklist.save2new');
             }
         }
         JToolBarHelper::save2copy('tasklist.save2copy');
         JToolBarHelper::cancel('tasklist.cancel', 'JTOOLBAR_CLOSE');
     }
 }
Ejemplo n.º 15
0
 function __construct($default = array())
 {
     parent::__construct($default);
     $task = JRequest::getWord('task', '');
     switch ($task) {
         case 'add':
         case 'save':
         case 'apply':
         case 'edit':
             JToolBarHelper::apply();
             JToolBarHelper::save();
             JToolBarHelper::cancel();
             break;
         default:
             JToolBarHelper::addNew();
             JToolBarHelper::deleteList();
             JToolBarHelper::makeDefault('publish');
             break;
     }
     // Register Extra tasks
     JRequest::setVar('view', 'services');
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     $this->registerTask('publish', 'setDefault');
 }
Ejemplo n.º 16
0
 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->id;
     $isNew = $this->item->id == 0;
     $canDo = MailUPHelper::getActions($this->item->id);
     JToolBarHelper::title($isNew ? JText::_('COM_MAILUP_MANAGER_MAILUP_NEW') : JText::_('COM_MAILUP_MANAGER_MAILUP_EDIT'), 'group');
     // Built the actions for new and existing records.
     if ($isNew) {
         // For new records, check the create permission.
         if ($canDo->get('core.create')) {
             //JToolBarHelper::apply('group.save', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('group.applyGroup', 'JTOOLBAR_SAVE');
             //JToolBarHelper::custom('group.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
         }
         JToolBarHelper::cancel('group.cancel', 'JTOOLBAR_CANCEL');
     } else {
         if ($canDo->get('core.edit')) {
             // We can save the new record
             //JToolBarHelper::apply('group.save', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('group.updateGroup', 'JTOOLBAR_SAVE');
             // We can save this record, but check the create permission to see if we can return to make a new one.
             if ($canDo->get('core.create')) {
                 //JToolBarHelper::custom('group.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
             }
         }
         if ($canDo->get('core.create')) {
             //JToolBarHelper::custom('group.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
         }
         JToolBarHelper::cancel('group.cancel', 'JTOOLBAR_CLOSE');
     }
 }
Ejemplo n.º 17
0
 function toolbar()
 {
     switch (JRequest::getCmd('task')) {
         case 'edit':
         case 'apply':
         case 'add':
             switch (JRequest::getCmd('task')) {
                 case 'add':
                     JToolBarHelper::title(JText::_('COM_REDFORM_Add_Value'), 'redform_plus');
                     break;
                 default:
                     JToolBarHelper::title(JText::_('COM_REDFORM_Edit_Value'), 'redform_plus');
                     break;
             }
             JToolBarHelper::save();
             JToolBarHelper::apply();
             JToolBarHelper::cancel();
             break;
         default:
             JToolBarHelper::title(JText::_('COM_REDFORM_Values'), 'redform_values');
             if ($this->get('Total', 'fields') > 0) {
                 JToolBarHelper::publishList();
                 JToolBarHelper::unpublishList();
                 JToolBarHelper::spacer();
                 JToolBarHelper::deleteList();
                 JToolBarHelper::editListX();
                 JToolBarHelper::addNew();
             }
             break;
     }
 }
Ejemplo n.º 18
0
 function _setToolBar()
 {
     JToolBarHelper::title(JText::_('USER_RESOURCES_MANAGER'), 'addedit');
     JToolBarHelper::save('save_resources');
     JToolBarHelper::apply('apply_resources');
     JToolBarHelper::cancel();
 }
Ejemplo n.º 19
0
 function displayEdit($tpl = null)
 {
     JToolBarHelper::title($this->order->order_number, 'generic.png');
     JToolBarHelper::save();
     JToolBarHelper::cancel();
     parent::display($tpl);
 }
Ejemplo n.º 20
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 = RedirectHelper::getActions();
     JToolBarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINK'), 'redirect');
     // If not checked out, can save the item.
     if ($canDo->get('core.edit')) {
         JToolBarHelper::apply('link.apply');
         JToolBarHelper::save('link.save');
     }
     // This component does not support Save as Copy due to uniqueness checks.
     // While it can be done, it causes too much confusion if the user does
     // not change the Old URL.
     if ($canDo->get('core.edit') && $canDo->get('core.create')) {
         JToolBarHelper::save2new('link.save2new');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('link.cancel');
     } else {
         JToolBarHelper::cancel('link.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER_EDIT');
 }
Ejemplo n.º 21
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);
 }
Ejemplo n.º 22
0
 public function display($tpl = null)
 {
     $Redconfiguration = new Redconfiguration();
     $uri = JFactory::getURI();
     $lists = array();
     $detail = $this->get('data');
     $isNew = $detail->zipcode_id < 1;
     $text = $isNew ? JText::_('COM_REDSHOP_NEW') : JText::_('COM_REDSHOP_EDIT');
     JToolBarHelper::title(JText::_('COM_REDSHOP_ZIPCODE_DETAIL') . ': <small><small>[ ' . $text . ' ]</small></small>', 'redshop_region_48');
     JToolBarHelper::save();
     JToolBarHelper::apply();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         JToolBarHelper::cancel('cancel', JText::_('JTOOLBAR_CLOSE'));
     }
     $countryarray = $Redconfiguration->getCountryList((array) $detail);
     $detail->country_code = $countryarray['country_code'];
     $lists['country_code'] = $countryarray['country_dropdown'];
     $statearray = $Redconfiguration->getStateList((array) $detail);
     $lists['state_code'] = $statearray['state_dropdown'];
     $this->detail = $detail;
     $this->lists = $lists;
     $this->request_url = $uri->toString();
     parent::display($tpl);
 }
Ejemplo n.º 23
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);
 }
Ejemplo n.º 24
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');
 }
Ejemplo n.º 25
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);
 }
Ejemplo n.º 26
0
 public static function addButton()
 {
     $task = JRequest::getVar('task');
     $controller = JRequest::getVar('controller');
     switch (strtoupper($controller)) {
         case 'LOAINHA':
             $title = 'Loại nhà';
             break;
         case 'CAPCONGTRINH':
             $title = 'Cấp công trình';
             break;
         case 'TAISAN':
             $title = 'Tài sản';
             break;
         default:
             $title = '';
             break;
     }
     switch ($task) {
         case 'add':
         case 'edit':
             JToolBarHelper::save('save', 'Lưu và đóng');
             JToolBarHelper::cancel('cancel', 'Huỷ bỏ');
             break;
         default:
             JToolBarHelper::title(JText::_('Danh mục ' . $title . ': [Danh sách]'), 'generic.png');
             JToolBarHelper::addNew('add', 'Thêm mới');
             JToolBarHelper::deleteList(null, 'remove', 'Xóa');
             JToolBarHelper::publish('publish', 'Bật trạng thái');
             JToolBarHelper::unpublish('unpublish', 'Tắt trạng thái');
             break;
     }
 }
Ejemplo n.º 27
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');
 }
Ejemplo n.º 28
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');
 }
Ejemplo n.º 29
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');
     }
 }
Ejemplo n.º 30
0
 function edit()
 {
     JToolBarHelper::save();
     JToolBarHelper::cancel();
     JRequest::setVar('view', 'careerleveledit');
     parent::display();
 }