protected function getInput() { // Base name of the HTML control. $ctrl = $this->name; $value = $this->value; // Construct an array of the HTML OPTION statements. $options = array(); // Construct the various argument calls that are supported. $attribs = ' '; if (isset($this->element['size'])) { $attribs .= 'size="' . (int) $this->element['size'] . '"'; } if (isset($this->element['class'])) { $attribs .= 'class="' . (string) $this->element['class'] . '"'; } else { $attribs .= 'class="inputbox"'; } if (isset($this->element['multiple'])) { $attribs .= ' multiple="multiple"'; } $options = RSTicketsProHelper::getStatuses(); if (empty($value)) { $value = $options; } // Render the HTML SELECT list. return JHTML::_('select.genericlist', $options, $ctrl, $attribs, 'value', 'text', $value, $this->name); }
function fetchElement($name, $value, &$node, $control_name) { // Base name of the HTML control. $ctrl = $control_name . '[' . $name . ']'; // Construct an array of the HTML OPTION statements. $options = array(); // Construct the various argument calls that are supported. $attribs = ' '; if ($v = $node->attributes('size')) { $attribs .= 'size="' . $v . '"'; } if ($v = $node->attributes('class')) { $attribs .= 'class="' . $v . '"'; } else { $attribs .= 'class="inputbox"'; } if ($m = $node->attributes('multiple')) { $attribs .= ' multiple="multiple"'; $ctrl .= '[]'; } $options = RSTicketsProHelper::getStatuses(); if (empty($value)) { $value = $options; } // Render the HTML SELECT list. return JHTML::_('select.genericlist', $options, $ctrl, $attribs, 'value', 'text', $value, $control_name . $name); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if ($mainframe->isSite()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } $departments = RSTicketsProHelper::getDepartments(); $lists['departments'] = JHTML::_('select.genericlist', $departments, 'department_id[]', 'size="5" multiple="multiple"', 'value', 'text', $departments); $lists['statuses'] = JHTML::_('select.genericlist', RSTicketsProHelper::getStatuses(), 'status_id[]', 'size="5" multiple="multiple"', 'value', 'text', RSTicketsProHelper::getStatuses()); $lists['priorities'] = JHTML::_('select.genericlist', RSTicketsProHelper::getPriorities(), 'priority_id[]', 'size="5" multiple="multiple"', 'value', 'text', RSTicketsProHelper::getPriorities()); $ordering = array(); $ordering[] = JHTML::_('select.option', 'date', JText::_('Default')); $ordering[] = JHTML::_('select.option', 'last_reply', JText::_('RST_TICKET_LAST_REPLY')); $ordering[] = JHTML::_('select.option', 'subject', JText::_('RST_TICKET_SUBJECT')); $ordering[] = JHTML::_('select.option', 'status', JText::_('RST_TICKET_STATUS')); $ordering[] = JHTML::_('select.option', 'priority', JText::_('RST_TICKET_PRIORITY')); $ordering[] = JHTML::_('select.option', 'replies', JText::_('RST_TICKET_REPLIES')); $lists['ordering'] = JHTML::_('select.genericlist', $ordering, 'filter_order', '', 'value', 'text'); $ordering_dir = array(); $ordering_dir[] = JHTML::_('select.option', 'DESC', JText::_('DESC')); $ordering_dir[] = JHTML::_('select.option', 'ASC', JText::_('ASC')); $lists['ordering_dir'] = JHTML::_('select.genericlist', $ordering_dir, 'filter_order_Dir', '', 'value', 'text'); $this->assign('is_staff', RSTicketsProHelper::isStaff()); $this->assign('permissions', RSTicketsProHelper::getCurrentPermissions()); $this->assign('is_advanced', JRequest::getVar('advanced', false)); $this->assignRef('lists', $lists); $this->assign('itemid', $this->get('itemid')); $this->assign('show_footer', RSTicketsProHelper::getConfig('rsticketspro_link')); $this->assign('footer', RSTicketsProHelper::getFooter()); if (RSTicketsProHelper::isJ16() && $mainframe->isSite()) { // Description if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } // Keywords if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } // Robots if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } } parent::display(); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if ($mainframe->isSite()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } $row = $this->get('ticket'); $this->assignRef('row', $row); $this->assign('date_format', RSTicketsProHelper::getConfig('date_format')); $this->assign('show_ticket_info', RSTicketsProHelper::getConfig('show_ticket_info')); $this->assign('show_ticket_voting', RSTicketsProHelper::getConfig('show_ticket_voting')); $this->assign('what', RSTicketsProHelper::getConfig('show_user_info')); $this->assign('avatar', RSTicketsProHelper::getConfig('avatars')); $this->assign('show_email_link', RSTicketsProHelper::getConfig('show_email_link')); $this->assign('show_signature', RSTicketsProHelper::getConfig('show_signature')); $this->assign('show_kb_search', RSTicketsProHelper::getConfig('show_kb_search')); $this->assign('show_time_spent', RSTicketsProHelper::getConfig('enable_time_spent')); $this->assign('time_spent_unit', JText::_('RST_TIME_UNIT_' . strtoupper(RSTicketsProHelper::getConfig('time_spent_unit')))); $this->assign('permissions', $this->get('permissions')); $is_staff = RSTicketsProHelper::isStaff(); $this->assign('is_staff', $is_staff); $this->assign('can_upload', $this->get('canupload')); $this->assign('can_update', $this->get('canupdate')); $this->assign('can_update_custom_fields', $this->get('canupdatecustomfields')); $this->assign('data', $this->get('data')); $this->assign('use_editor', RSTicketsProHelper::getConfig('allow_rich_editor')); $this->assignRef('editor', JFactory::getEditor()); $editor_javascript = "document.getElementById('message').innerHTML = content.replace(/<(.*?)>/g, '');"; if ($this->use_editor) { // fix for JCE if ($this->editor->get('_name') == 'jce') { $editor_javascript = str_replace("'content'", 'content', $this->editor->setContent('message', 'content')); } elseif ($this->editor->get('_name') == 'jckeditor') { $editor_javascript = str_replace(array('(!oEditor) ', "'content'"), array('(!oEditor) ? ', 'content'), $this->editor->setContent('message', 'content')) . "\n"; } else { $editor_javascript = $this->editor->setContent('message', 'content'); } } else { $editor_javascript = str_replace('innerHTML', 'value', $editor_javascript); } $this->assign('editor_javascript', $editor_javascript); $this->assign('show_footer', $this->get('showfooter')); $this->assign('footer', $this->get('footer')); $this->assign('do_print', JRequest::getInt('print', 0)); $this->assignRef('department', $this->get('department')); if ($is_staff) { $status = RSTicketsProHelper::getStatuses(); $lists['status'] = JHTML::_('select.genericlist', $status, 'status_id', '', 'value', 'text', $row->status_id); $priority = RSTicketsProHelper::getPriorities(); $lists['priority'] = JHTML::_('select.genericlist', $priority, 'priority_id', '', 'value', 'text', $row->priority_id); $department = RSTicketsProHelper::getDepartments(); $lists['department'] = JHTML::_('select.genericlist', $department, 'department_id', '', 'value', 'text', $row->department_id); $staff = RSTicketsProHelper::getStaff(); $unassigned[] = JHTML::_('select.option', 0, JText::_('RST_UNASSIGNED')); $staff = array_merge($unassigned, $staff); $lists['staff'] = JHTML::_('select.genericlist', $staff, 'staff_id', '', 'value', 'text', $row->staff_id); $this->assignRef('lists', $lists); $this->assign('history_tickets', $this->get('HistoryTickets')); } $ticket_view = RSTicketsProHelper::getConfig('ticket_view'); $this->assign('ticket_view', $ticket_view); if ($ticket_view == 'tabbed') { jimport('joomla.html.pane'); $tabparams = array(); $tabparams['startOffset'] = JRequest::getInt('tabposition', 0); $tabs =& JPane::getInstance('Tabs', $tabparams, true); $this->assignRef('tabs', $tabs); } $model = $this->getModel(); $model->addViewingHistory(); parent::display(); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if ($mainframe->isSite()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } $this->assign('date_format', RSTicketsProHelper::getConfig('date_format')); $this->assign('permissions', $this->get('permissions')); $this->assign('is_staff', RSTicketsProHelper::isStaff()); $this->assignRef('tickets', $this->get('tickets')); $this->assignRef('pagination', $this->get('pagination')); $staff = RSTicketsProHelper::getStaff(); $unassigned = array(); $unassigned[] = JHTML::_('select.option', -1, JText::_('RST_UNCHANGED')); $unassigned[] = JHTML::_('select.option', 0, JText::_('RST_UNASSIGNED')); $staff = array_merge($unassigned, $staff); $lists['staff'] = JHTML::_('select.genericlist', $staff, 'bulk_staff_id', '', 'value', 'text'); $priority = RSTicketsProHelper::getPriorities(); $unchanged = array(); $unchanged[] = JHTML::_('select.option', 0, JText::_('RST_UNCHANGED')); $priority = array_merge($unchanged, $priority); $lists['priority'] = JHTML::_('select.genericlist', $priority, 'bulk_priority_id', '', 'value', 'text'); $status = RSTicketsProHelper::getStatuses(); $unchanged = array(); $unchanged[] = JHTML::_('select.option', 0, JText::_('RST_UNCHANGED')); $status = array_merge($unchanged, $status); $lists['status'] = JHTML::_('select.genericlist', $status, 'bulk_status_id', '', 'value', 'text'); $delete = array(); $delete[] = JHTML::_('select.option', 0, JText::_('RST_UNCHANGED')); $delete[] = JHTML::_('select.option', 1, JText::_('RST_DELETE_SELECTED')); $lists['delete'] = JHTML::_('select.genericlist', $delete, 'bulk_delete', 'onchange="rst_disable_bulk(this.value);" onclick="rst_disable_bulk(this.value);"', 'value', 'text', ''); $notify = array(); $notify[] = JHTML::_('select.option', 0, JText::_('RST_UNCHANGED')); $notify[] = JHTML::_('select.option', 1, JText::_('RST_NOTIFY_SELECTED')); $lists['notify'] = JHTML::_('select.genericlist', $notify, 'bulk_notify', '', 'value', 'text', ''); $this->assignRef('lists', $lists); $this->assignRef('sortColumn', $this->get('sortColumn')); $this->assignRef('sortOrder', $this->get('sortOrder')); $this->assignRef('limitstart', JRequest::getInt('limitstart', 0)); $this->assign('is_searching', $this->get('searching')); $searches = $this->get('searches'); $this->assign('searches', $searches); $this->assign('has_searches', !empty($searches)); $this->assign('predefined_search', $this->get('predefinedsearch')); $this->assign('show_footer', RSTicketsProHelper::getConfig('rsticketspro_link')); $this->assign('footer', RSTicketsProHelper::getFooter()); $this->assignRef('priorityColors', $this->get('prioritycolors')); $this->assign('colorWholeTicket', RSTicketsProHelper::getConfig('color_whole_ticket')); if (RSTicketsProHelper::isJ16() && $mainframe->isSite()) { // Description if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } // Keywords if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } // Robots if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } } parent::display(); }