コード例 #1
0
ファイル: view.html.php プロジェクト: atikahmed/joomla-probid
 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();
 }
コード例 #2
0
ファイル: view.html.php プロジェクト: atikahmed/joomla-probid
 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();
 }