/** * 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); }
/** * 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); }
/** * About view display method * @return void * */ function display($tpl = null) { // Assign the values $this->folders = $this->get('FolderCheck'); // Get the schema version $this->schemaVersion = $this->get('SchemaVersion'); // Check for database errors $changeSet = $this->get('ChangeSet'); $this->errors = $changeSet->check(); // Render the submenu if (version_compare(JVERSION, '3.0', '>=')) { CsviHelper::addSubmenu('about'); $this->sidebar = JHtmlSidebar::render(); } else { // Get the panel $this->loadHelper('panel'); $this->sidebar = ''; } // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_ABOUT'), 'csvi_about_48'); JToolBarHelper::custom('about.fix', 'refresh', 'refresh', 'COM_CSVI_TOOLBAR_DATABASE_FIX', false, false); //JToolBarHelper::help('about.html', true); // Display it all parent::display($tpl); }
/** * Maps view display method * @return void * */ function display($tpl = null) { // Load the logs $this->items = $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('maps'); $this->sidebar = JHtmlSidebar::render(); } else { // Get the panel $this->loadHelper('panel'); $this->sidebar = ''; } // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_MAPS'), 'csvi_map_48'); JToolBarHelper::custom('map.add', 'csvi_add_32', 'csvi_add_32', 'JTOOLBAR_NEW', false); JToolBarHelper::custom('map.edit', 'csvi_edit_32', 'csvi_edit_32', 'JTOOLBAR_EDIT', true); JToolBarHelper::divider(); JToolBarHelper::custom('maps.delete', 'csvi_delete_32', 'csvi_delete_32', JText::_('JTOOLBAR_DELETE'), true); // Display it all parent::display($tpl); }
/** * 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->items = $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('replacements'); $this->sidebar = JHtmlSidebar::render(); } else { // Get the panel $this->loadHelper('panel'); $this->sidebar = ''; } // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_REPLACEMENTS'), 'csvi_replacement_48'); JToolBarHelper::addNew('replacement.add'); JToolBarHelper::editList('replacement.edit'); JToolBarHelper::deleteList('', 'replacements.delete'); //JToolBarHelper::help('about.html', true); // Display it all parent::display($tpl); }
/** * Log view display method * @return void */ function display($tpl = null) { $jinput = JFactory::getApplication()->input; // Get the task $task = $jinput->get('task'); // Get the log $model = $this->getModel('log'); switch ($task) { case 'logreader': $this->logdetails = $this->get('Logfile'); $this->logfile = $logfile = CSVIPATH_DEBUG . '/com_csvi.log.' . JRequest::getInt('run_id') . '.php'; break; default: // Load the logs $this->logentries = $this->get('Items'); // Get the pagination $this->pagination = $this->get('Pagination'); // Load the user state $this->state = $this->get('State'); // Load the action types $actiontypes = $this->get('ActionTypes'); $this->lists['actions'] = JHTML::_('select.genericlist', $actiontypes, 'filter_actiontype', '', 'value', 'text', JRequest::getWord('filter_actiontype')); // Render the submenu if (version_compare(JVERSION, '3.0', '>=')) { CsviHelper::addSubmenu('log'); $this->sidebar = JHtmlSidebar::render(); } else { // Get the panel $this->loadHelper('panel'); $this->sidebar = ''; } // Add toolbar JToolBarHelper::title(JText::_('COM_CSVI_LOG'), 'csvi_log_48'); JToolBarHelper::custom('logdetails.logdetails', 'csvi_logdetails_32', 'csvi_logdetails_32', JText::_('COM_CSVI_DETAILS'), true); JToolBarHelper::custom('log.remove', 'csvi_delete_32', 'csvi_delete_32', JText::_('COM_CSVI_DELETE'), true); JToolBarHelper::custom('log.remove_all', 'csvi_delete_32', 'csvi_delete_32', JText::_('COM_CSVI_DELETE_ALL'), false); // JToolBarHelper::help('log.html', true); break; } // Display it all parent::display($tpl); }
/** * Display the maintenance screen * * @copyright * @author RolandD * @todo * @see * @access public * @param string $tpl the template to use * @return * @since 3.0 */ function display($tpl = null) { // Get the component list $this->components = $this->get('Components'); // Get the maintenance options $this->options = $this->get('MaintenanceOptions'); $app = JFactory::getApplication(); $app->setUserState('com_csvi.global.form', false); // Load the results $jinput = JFactory::getApplication()->input; $settings = $jinput->get('settings', null, null); if ($settings->get('log.log_store', 1)) { $this->logresult = $this->get('Stats', 'log'); $this->logmessage = $this->get('StatsMessage', 'log'); } else { $this->logresult = false; } // Render the submenu if (version_compare(JVERSION, '3.0', '>=')) { CsviHelper::addSubmenu('maintenance'); $this->sidebar = JHtmlSidebar::render(); } else { // Get the panel $this->loadHelper('panel'); $this->sidebar = ''; } // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_MAINTENANCE'), 'csvi_maintenance_48'); if ($this->getLayout() != 'log') { JToolBarHelper::custom('cron.cron', 'csvi_cron_32', 'csvi_cron_32', JText::_('COM_CSVI_CRONLINE'), false); JToolBarHelper::custom('', 'csvi_continue_32.png', 'csvi_continue_32.png', JText::_('COM_CSVI_CONTINUE'), false); //JToolBarHelper::help('maintenance.html', true); } else { if ($settings->get('log.log_store', 1)) { JToolBarHelper::custom('logdetails.logdetails', 'csvi_logdetails_32', 'csvi_logdetails_32', JText::_('COM_CSVI_LOG_DETAILS'), false); } } // Display it all parent::display($tpl); }
/** * Available fields view display method * * @copyright * @author RolandD * @todo Replace JError * @see * @access public * @param * @return * @since 3.0 */ public function display($tpl = null) { // Get the list of available fields $this->availablefields = $this->get('Items'); // Load the pagination $this->pagination = $this->get('Pagination'); // Load the user state $this->state = $this->get('State'); if (!$this->get('FieldCheck')) { throw new Exception(JText::_('COM_CSVI_NO_AVAILABLE_FIELDS'), 0); } // Get the list of actions $options = array(); $options[] = JHtml::_('select.option', 'import', JText::_('COM_CSVI_IMPORT')); $options[] = JHtml::_('select.option', 'export', JText::_('COM_CSVI_EXPORT')); $this->actions = JHtml::_('select.genericlist', $options, 'jform_options_action', 'onchange="Csvi.loadTemplateTypes();"', 'value', 'text', $this->state->get('filter.action', '')); // Get the list of supported components $this->components = JHtml::_('select.genericlist', CsviHelper::getComponents(), 'jform_options_component', 'onchange="Csvi.loadTemplateTypes();"', 'value', 'text', $this->state->get('filter.component'), false, true); // Get the list of template types $model = $this->getModel(); $templates_model = $model->getModel('templates'); $operations = $templates_model->getTemplateTypes($this->state->get('filter.action', 'import'), $this->state->get('filter.component', false)); // Create the operations list $this->operations = JHtml::_('select.genericlist', $operations, 'jform_options_operation', '', 'value', 'name', $this->state->get('filter.operation'), false, true); // Render the submenu if (version_compare(JVERSION, '3.0', '>=')) { CsviHelper::addSubmenu('availablefields'); $this->sidebar = JHtmlSidebar::render(); } else { // Get the panel $this->loadHelper('panel'); $this->sidebar = ''; } // Show the toolbar $this->addToolbar(); // Display it all parent::display($tpl); }
/** * Analyzer view display method * @return void * */ public function display($tpl = null) { $jinput = JFactory::getApplication()->input; $this->process = $jinput->get('process', false); // Check if we need to run the analyzer if ($this->process) { $this->items = $this->get('Analyze'); } // Render the submenu if (version_compare(JVERSION, '3.0', '>=')) { CsviHelper::addSubmenu('analyzer'); $this->sidebar = JHtmlSidebar::render(); } else { // Get the panel $this->loadHelper('panel'); $this->sidebar = ''; } // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_ANALYZER'), 'csvi_analyzer_48'); JToolBarHelper::custom('analyzer.display', 'csvi_continue_32', 'csvi_continue_32', JText::_('COM_CSVI_ANALYZE'), false); //JToolBarHelper::help('about.html', true); // Display it all parent::display($tpl); }
/** * Import view display method * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function display($tpl = null) { $jinput = JFactory::getApplication()->input; $session = JFactory::getSession(); $option = $jinput->get('option'); // Load the models $model = $this->getModel(); $this->setModel(JModelLegacy::getInstance('templates', 'CsviModel')); $this->setModel(JModelLegacy::getInstance('availablefields', 'CsviModel')); // Load stylesheet $document = JFactory::getDocument(); $document->addStyleSheet(JURI::root() . 'administrator/components/com_csvi/assets/css/process.css'); // Set the template ID $sess_template_id = $session->get($option . '.select_template', 0); if ($sess_template_id !== 0) { $sess_template_id = unserialize($sess_template_id); } $template_id = $jinput->get('template_id', $sess_template_id, 'int'); $jinput->set('template_id', $template_id); // Load the saved templates $template_model = $this->getModel('Templates'); $this->templates = JHtml::_('select.genericlist', $template_model->getTemplates(), 'select_template', 'class="input-xlarge"', 'value', 'text', $jinput->get('template_id', 0, 'int')); // Load the selected template $this->loadHelper('template'); $this->template = new CsviTemplate(); $this->template->load($template_id); $jinput->set('template', $this->template); // Set the action, component and operation for the form if ($template_id > 0) { $jinput->set('jform', $this->template->getSettings()); } // Load the option templates $this->optiontemplates = $model->getOptions(); // Get the options for the user $this->form = $model->getForm(array(), true, $this->optiontemplates); // Load the fields $av_model = $this->getModel('availablefields'); $this->templatefields = $av_model->getAvailableFields($this->form->getValue('operation', 'options'), $this->form->getValue('component', 'options'), 'object', $this->form->getValue('custom_table')); // Load the replacements for the add field section $this->replacements = $this->get('Replacements'); // Add the component path to find template files $this->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR . '/views/process/tmpl/' . $this->form->getValue('component', 'options') . '/' . $this->form->getValue('action', 'options')); $this->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR . '/views/process/tmpl/' . $this->form->getValue('action', 'options')); // Load the helper $this->loadHelper($this->form->getValue('component', 'options')); // Load the configuration helper $this->loadHelper($this->form->getValue('component', 'options') . '_config'); $classname = 'Csvi' . $this->form->getValue('component', 'options') . '_config'; if (class_exists($classname)) { $this->config = new $classname(); } // Render the submenu if (version_compare(JVERSION, '3.0', '>=')) { CsviHelper::addSubmenu('process'); $this->sidebar = JHtmlSidebar::render(); } else { // Get the panel $this->loadHelper('panel'); $this->sidebar = ''; } // Get the toolbar title JToolBarHelper::title(JText::_('COM_CSVI_PROCESS'), 'csvi_process_48'); // Get the toolbar JToolBarHelper::custom('analyzer', 'csvi_analyzer_32', 'csvi_analyzer_32', JText::_('COM_CSVI_ANALYZER'), false); JToolBarHelper::divider(); JToolBarHelper::custom('cronline', 'csvi_cron_32', 'csvi_cron_32', JText::_('COM_CSVI_CRONLINE'), false); JToolBarHelper::custom('process.imexport', 'csvi_process_32', 'csvi_process_32', JText::_('COM_CSVI_PROCESS'), false); //JToolBarHelper::help('process.html', true); // Display it all parent::display($tpl); }