[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [12367] simplify uitts
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [12367] simplify uitts |
Date: |
Sun, 23 Nov 2014 10:22:48 +0000 |
Revision: 12367
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12367
Author: sigurdne
Date: 2014-11-23 10:22:46 +0000 (Sun, 23 Nov 2014)
Log Message:
-----------
simplify uitts
Modified Paths:
--------------
branches/dev-syncromind/property/inc/class.uitts.inc.php
Modified: branches/dev-syncromind/property/inc/class.uitts.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uitts.inc.php 2014-11-22
17:01:58 UTC (rev 12366)
+++ branches/dev-syncromind/property/inc/class.uitts.inc.php 2014-11-23
10:22:46 UTC (rev 12367)
@@ -42,11 +42,8 @@
var $public_functions = array
(
'index' => true,
- 'index2' => true,
'view' => true,
- 'view2' => true,
'add' => true,
- 'add2' => true,
'delete' => true,
'download' => true,
'download2' => true,
@@ -1990,338 +1987,6 @@
}
- function index2()
- {
- if(!$this->acl->check('.ticket.external',
PHPGW_ACL_READ, 'property'))
- {
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uilocation.stop', 'perm'=> 1, 'acl_location'=> '.ticket.external'));
- }
-
-
$GLOBALS['phpgw']->xslttpl->add_file(array('tts','nextmatchs'));
-
-
- $second_display = phpgw::get_var('second_display',
'bool');
-
- $default_district =
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'])?$GLOBALS['phpgw_info']['user']['preferences']['property']['default_district']:'');
- $default_status =
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['tts_status'])?$GLOBALS['phpgw_info']['user']['preferences']['property']['tts_status']:'');
- $start_date = urldecode($this->start_date);
- $end_date = urldecode($this->end_date);
-
- if ($default_district && !$second_display &&
!$this->district_id)
- {
- $this->bo->district_id = $default_district;
- $this->district_id =
$default_district;
- }
-
- if ($default_status && !$second_display)
- {
- $this->bo->status_id = $default_status;
- $this->status_id = $default_status;
- }
-
- $bgcolor_array[1] = '#da7a7a';
- $bgcolor_array[2] = '#dababa';
- $bgcolor_array[3] = '#dadada';
-
-
- $ticket_list = $this->bo->read($start_date,$end_date);
- $uicols = $this->bo->uicols;
-
- //_debug_array($uicols);
- //_debug_array($ticket_list);
- while (is_array($ticket_list) && list(,$ticket) =
each($ticket_list))
- {
- if ($ticket['status']=='O')
- {
- $status =
isset($this->bo->config->config_data['tts_lang_open']) &&
$this->bo->config->config_data['tts_lang_open'] ?
$this->bo->config->config_data['tts_lang_open'] : lang('Open');
- }
- else
- {
- $status = lang('Closed');
- }
-
- $content[] = array
- (
- 'id'
=> $ticket['id'],
- 'bgcolor'
=> $bgcolor[$ticket['priority']],
- 'new_ticket'
=> $ticket['new_ticket']?$ticket['new_ticket']:'',
- 'priostr'
=> str_repeat("||", $ticket['priority']),
- 'subject'
=> $ticket['subject'],
- 'location_code'
=> $ticket['location_code'],
- 'address'
=> $ticket['address'],
- 'date'
=> $ticket['entry_date'],
- 'finnish_date'
=> $ticket['finnish_date'],
- 'delay'
=> (isset($ticket['delay'])?$ticket['delay']:''),
-
- 'user'
=> $ticket['user'],
- 'assignedto'
=> $ticket['assignedto'],
- 'child_date'
=> $ticket['child_date'],
- 'link_view'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uitts.view2', 'id'=> $ticket['id'])),
- 'lang_view_statustext' =>
lang('view the ticket'),
- 'text_view'
=> lang('view'),
- 'status'
=> $status,
- );
- }
-
- $table_header[] = array
- (
- 'sort_priority' =>
$this->nextmatchs->show_sort_order(array
- (
- 'sort' => $this->sort,
- 'var' => 'priority',
- 'order' => $this->order,
- 'extra' => array
- (
- 'menuaction' =>
'property.uitts.index',
- 'cat_id'
=>$this->cat_id,
- 'filter'
=>$this->status_id,
- 'user_id'
=>$this->user_id,
- 'district_id' =>
$this->district_id,
- 'query'
=>$this->query,
- 'second_display'
=> true,
-
'allrows'=>$this->allrows,
- 'start_date'
=>$start_date,
- 'end_date'
=>$end_date
- )
-
- )),
-
- 'lang_priority' =>
lang('Priority'),
- 'lang_priority_statustext'
=> lang('Sort the tickets by their priority'),
-
- 'sort_id' =>
$this->nextmatchs->show_sort_order(array
- (
- 'sort' => $this->sort,
- 'var' => 'fm_tts_tickets.id',
- 'order' => $this->order,
- 'extra' => array
- (
- 'menuaction' =>
'property.uitts.index',
- 'cat_id'
=>$this->cat_id,
- 'filter'
=>$this->status_id,
- 'user_id'
=>$this->user_id,
- 'district_id' =>
$this->district_id,
- 'query'
=>$this->query,
- 'second_display'
=> true,
-
'allrows'=>$this->allrows,
- 'start_date'
=>$start_date,
- 'end_date'
=>$end_date
- )
- )),
-
- 'lang_id' => lang('ID'),
- 'lang_id_statustext' => lang('Sort
the tickets by their ID'),
-
- 'lang_subject' =>
lang('Subject'),
- 'lang_time_created' =>
lang('Started'),
- 'lang_view' => lang('view'),
- 'lang_location_code' =>
lang('Location'),
- 'lang_address' =>
lang('Address'),
- 'lang_user' => lang('user'),
- 'sort_assigned_to' =>
$this->nextmatchs->show_sort_order(array
- (
- 'sort' => $this->sort,
- 'var' => 'assignedto',
- 'order' => $this->order,
- 'extra' => array
- (
- 'menuaction' =>
'property.uitts.index',
- 'cat_id'
=>$this->cat_id,
- 'filter'
=>$this->status_id,
- 'user_id'
=>$this->user_id,
- 'district_id' =>
$this->district_id,
- 'query'
=>$this->query,
- 'second_display'
=> true,
-
'allrows'=>$this->allrows,
- 'start_date'
=>$start_date,
- 'end_date'
=>$end_date
- )
- )),
- 'lang_assigned_to' =>
lang('Assigned to'),
- 'sort_opened_by' =>
$this->nextmatchs->show_sort_order(array
- (
- 'sort' => $this->sort,
- 'var' => 'user_lid',
- 'order' => $this->order,
- 'extra' =>
- array(
- 'menuaction' =>
'property.uitts.index',
- 'cat_id'
=>$this->cat_id,
- 'filter'
=>$this->status_id,
- 'user_id'
=>$this->user_id,
- 'district_id' =>
$this->district_id,
- 'query'
=>$this->query,
- 'second_display'
=> true,
-
'allrows'=>$this->allrows,
- 'start_date'
=>$start_date,
- 'end_date'
=>$end_date
- )
- )),
- 'sort_date' =>
$this->nextmatchs->show_sort_order(array
- (
- 'sort' => $this->sort,
- 'var' =>
'fm_tts_tickets.entry_date',
- 'order' => $this->order,
- 'extra' => array
- (
- 'menuaction' =>
'property.uitts.index',
- 'cat_id'
=>$this->cat_id,
- 'filter'
=>$this->status_id,
- 'user_id'
=>$this->user_id,
- 'district_id' =>
$this->district_id,
- 'query'
=>$this->query,
- 'second_display'
=> true,
-
'allrows'=>$this->allrows,
- 'start_date'
=>$start_date,
- 'end_date'
=>$end_date
- )
- )),
- 'sort_finnish_date' =>
$this->nextmatchs->show_sort_order(array
- (
- 'sort' => $this->sort,
- 'var' => 'finnish_date',
-
- 'order' => $this->order,
- 'extra' => array
- (
- 'menuaction' =>
'property.uitts.index',
- 'cat_id' =>
$this->cat_id,
- 'filter' =>
$this->status_id,
- 'user_id' =>
$this->user_id,
- 'district_id' =>
$this->district_id,
- 'query' =>
$this->query,
- 'second_display'=> true,
- 'allrows' =>
$this->allrows,
- 'start_date' =>
$start_date,
- 'end_date' =>
$end_date
- )
- )),
- 'lang_finnish_date' =>
lang('finnish date'),
- 'lang_delay' =>
lang('delay'),
- 'lang_finnish_statustext'=>
lang('presumed finnish date'),
- 'lang_opened_by' => lang('Opened
by'),
- 'lang_status' =>
lang('Status')
- );
-
- for ($i=0;$i<count($uicols);$i++)
- {
- $table_header[0]['extra'][$i]['header'] =
$uicols[$i];
- }
-
- $table_add[] = array
- (
- 'lang_add'
=> lang('add'),
- 'lang_add_statustext' => lang('add a
ticket'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uitts.add2'))
- );
-
- $link_data = array
- (
- 'menuaction' =>
'property.uitts.index2',
- 'second_display' => true,
- 'sort' =>
$this->sort,
- 'order' =>
$this->order,
- 'cat_id' =>
$this->cat_id,
- 'filter' =>
$this->status_id,
- 'user_id' =>
$this->user_id,
- 'query' =>
$this->query,
- 'district_id' =>
$this->district_id,
- 'start_date' => $start_date,
- 'end_date' =>
$end_date,
- 'allrows' =>
$this->allrows
- );
-
- $receipt =
$GLOBALS['phpgw']->session->appsession('receipt','property');
-
$GLOBALS['phpgw']->session->appsession('receipt','property','');
-
- $GLOBALS['phpgw']->preferences->read();
- $autorefresh ='';
- if
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['refreshinterval']))
- {
- $autorefresh =
$GLOBALS['phpgw_info']['user']['preferences']['property']['refreshinterval'].';
URL='.$GLOBALS['phpgw']->link('/index.php',$link_data);
- }
-
- if(!$this->allrows)
- {
- $record_limit =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
- }
- else
- {
- $record_limit = $this->bo->total_records;
- }
-
- $msgbox_data = $this->bocommon->msgbox_data($receipt);
-
- $link_date_search =
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uiproject.date_search'));
-
- $link_download = array
- (
- 'menuaction' =>
'property.uitts.download2',
- 'second_display' => true,
- 'sort' =>
$this->sort,
- 'order' =>
$this->order,
- 'cat_id' =>
$this->cat_id,
- 'filter' =>
$this->status_id,
- 'user_id' =>
$this->user_id,
- 'query' =>
$this->query,
- 'district_id' =>
$this->district_id,
- 'allrows' =>
$this->allrows,
- 'start_date' => $start_date,
- 'end_date' =>
$end_date,
- 'start' =>
$this->start
- );
-
-
$GLOBALS['phpgw']->xslttpl->add_file(array('search_field'));
-
-
$GLOBALS['phpgw']->js->validate_file('overlib','overlib','property');
-
- $data = array
- (
- 'lang_download'
=> 'download',
- 'link_download'
=> $GLOBALS['phpgw']->link('/index.php',$link_download),
- 'lang_download_help'
=> lang('Download table to your browser'),
-
- 'start_date'
=> $start_date,
- 'end_date'
=> $end_date,
- 'lang_none'
=> lang('None'),
- 'lang_date_search'
=> lang('Date search'),
- 'lang_date_search_help'
=> lang('Narrow the search by dates'),
- 'link_date_search'
=> $link_date_search,
-
- 'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
- 'autorefresh'
=> $autorefresh,
- 'allow_allrows'
=> true,
- 'allrows'
=> $this->allrows,
- 'start_record'
=> $this->start,
- 'record_limit'
=> $record_limit,
- 'num_records'
=> count($ticket_list),
- 'all_records'
=> $this->bo->total_records,
- 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
- 'img_path'
=>
$GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
-
- 'select_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
- 'filter_name'
=> 'filter',
- 'filter_list'
=> $this->bo->filter(array('format' => 'filter', 'filter'=>
$this->status_id,'default' => 'open')),
- 'lang_show_all'
=> isset($this->bo->config->config_data['tts_lang_open']) &&
$this->bo->config->config_data['tts_lang_open'] ?
$this->bo->config->config_data['tts_lang_open'] : lang('Open'),
- 'lang_filter_statustext'
=> lang('Select the filter. To show all entries select SHOW ALL'),
- 'lang_searchfield_statustext' =>
lang('Enter the search string. To show all entries, empty this field and press
the SUBMIT button again'),
- 'lang_searchbutton_statustext' =>
lang('Submit the search string'),
- 'query'
=> $this->query,
- 'lang_search'
=> lang('search'),
- 'table_header2'
=> $table_header,
- 'values2'
=> (isset($content)?$content:''),
- 'table_add'
=> $table_add,
- );
-
- $appname =
lang('helpdesk');
- $function_msg =
lang('list ticket');
-
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('property') . ' - ' . $appname . ': ' . $function_msg;
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list2' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
- $this->save_sessiondata();
- }
-
function add()
{
if(!$this->acl_add)
@@ -2702,161 +2367,7 @@
// $GLOBALS['phpgw']->xslttpl->pp();
}
- function add2()
- {
- if(!$this->acl->check('.ticket.external',
PHPGW_ACL_ADD, 'property'))
- {
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uilocation.stop', 'perm'=> 1, 'acl_location'=> '.ticket.external'));
- }
- $bolocation =
CreateObject('property.bolocation');
-
- $values = phpgw::get_var('values');
-
-
$GLOBALS['phpgw']->xslttpl->add_file(array('tts','files'));
-
-
- if(!$this->tenant_id)
- {
- $receipt['error'][]=array('msg'=>lang('No
Tenant selected !'));
- }
- else
- {
- $values['extra']['tenant_id'] =
$this->tenant_id;
- $values['location_code'] =
$bolocation->get_tenant_location($this->tenant_id);
-
-
- if(!$values['location_code'])
- {
-
$receipt['error'][]=array('msg'=>lang('No location for this tenant!'));
- }
- else
- {
- $location =
explode('-',$values['location_code']);
- $i = 1;
- foreach ($location as $entry)
- {
-
$values['location']["loc{$i}"]=$entry;
- $i++;
- }
- }
- if(is_array($values['location_code']))
- {
-
$receipt['error'][]=array('msg'=>lang('Several locations for this tenant!'));
- }
- }
-
- $values['location_data'] =
$bolocation->read_single($values['location_code'],array('tenant_id'=>$this->tenant_id,
'view' => true));
-
- $values['street_name'] =
$values['location_data']['street_name'];
- $values['street_number'] =
$values['location_data']['street_number'];
-
-
- $values['assignedto']=
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['assigntodefault'])?$GLOBALS['phpgw_info']['user']['preferences']['property']['assigntodefault']:'');
- if(!$values['assignedto'])
- {
- $receipt['error'][]=array('msg'=>lang('Please
set default assign to in preferences for user %1!',
$GLOBALS['phpgw']->accounts->id2name($this->account)));
- }
-
- $values['group_id']=
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['groupdefault'])?$GLOBALS['phpgw_info']['user']['preferences']['property']['groupdefault']:'');
-
- $values['cat_id'] =
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['tts_category'])?$GLOBALS['phpgw_info']['user']['preferences']['property']['tts_category']:'');
-
- if(!$values['cat_id'])
- {
- $receipt['error'][]=array('msg'=>lang('Please
set default category in preferences for user %1!',
$GLOBALS['phpgw']->accounts->id2name($this->account)));
- }
-
- if (isset($values['save']))
- {
- if(!$values['subject'])
- {
-
$receipt['error'][]=array('msg'=>lang('Please type a subject for this ticket
!'));
- }
-
- if(!isset($values['details']) ||
!$values['details'])
- {
-
$receipt['error'][]=array('msg'=>lang('Please give som details !'));
- }
-
- if(!isset($receipt['error']))
- {
- $receipt = $this->bo->add($values);
-
$GLOBALS['phpgw']->session->appsession('receipt','property',$receipt);
- //
$GLOBALS['phpgw']->session->appsession('session_data','fm_tts','');
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uitts.index'));
- }
- else
- {
- if(isset($values['extra']['p_num']) &&
$values['extra']['p_num'])
- {
-
$values['p'][$values['extra']['p_entity_id']]['p_num']=$values['extra']['p_num'];
-
$values['p'][$values['extra']['p_entity_id']]['p_entity_id']=$values['extra']['p_entity_id'];
-
$values['p'][$values['extra']['p_entity_id']]['p_cat_id']=$values['extra']['p_cat_id'];
-
$values['p'][$values['extra']['p_entity_id']]['p_cat_name']=phpgw::get_var('entity_cat_name_'.$values['extra']['p_entity_id'],
'string', 'POST');
- }
- }
- }
-
- $location_data=$bolocation->initiate_ui_location(array(
- 'values' =>
(isset($values['location_data'])?$values['location_data']:''),
- 'type_id' => -1, // calculated from
location_types
- 'no_link' => false, // disable lookup
links for location type less than type_id
- 'tenant' => true,
- 'lookup_type' => 'view',
- 'lookup_entity' => false,
- 'entity_data' => false
- ));
-
- $link_data = array
- (
- 'menuaction' => 'property.uitts.add2'
- );
-
- $msgbox_data =
(isset($receipt)?$this->bocommon->msgbox_data($receipt):'');
-
-
$GLOBALS['phpgw']->js->validate_file('dateformat','dateformat','property');
-
- $data = array
- (
- 'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
- 'location_data'
=> $location_data,
-
- 'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
- 'done_action'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uitts.index')),
- 'lang_subject'
=> lang('Subject'),
- 'lang_subject_statustext'
=> lang('Enter the subject of this ticket'),
-
- 'lang_details'
=> lang('Details'),
- 'lang_details_statustext'
=> lang('Enter the details of this ticket'),
-
- 'lang_save'
=> lang('save'),
- 'lang_done'
=> lang('done'),
- 'value_details'
=> (isset($values['details'])?$values['details']:''),
- 'value_subject'
=> (isset($values['subject'])?$values['subject']:''),
-
- 'lang_done_statustext'
=> lang('Back to the ticket list'),
- 'lang_save_statustext'
=> lang('Save the ticket'),
- 'lang_contact_phone'
=> lang('contact phone'),
- 'lang_contact_phone_statustext'
=> lang('contact phone'),
- 'value_contact_phone'
=> isset($values['contact_phone'])?$values['contact_phone']:'',
-
- 'lang_contact_email'
=> lang('contact email'),
- 'lang_contact_email_statustext'
=> lang('contact email'),
- 'value_contact_email'
=> isset($values['contact_email'])?$values['contact_email']:'',
- );
-
- $appname =
lang('helpdesk');
- $function_msg = lang('add
ticket');
-
- //$this->_insert_custom_js();
-
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('property') . ' - ' . $appname . ': ' . $function_msg;
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('add2' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
- }
-
-
function update_data()
{
$action = phpgw::get_var('action', 'string', 'GET');
@@ -4080,211 +3591,6 @@
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
}
- function view2()
- {
- if(!$this->acl->check('.ticket.external',
PHPGW_ACL_READ, 'property'))
- {
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uilocation.stop', 'perm'=> 1, 'acl_location'=> '.ticket.external'));
- }
-
- $bolocation = CreateObject('property.bolocation');
-
- $id = phpgw::get_var('id', 'int', 'GET');
- $values = phpgw::get_var('values');
- $receipt = '';
-
- $GLOBALS['phpgw']->xslttpl->add_file(array('tts'));
-
- if(isset($values['save']))
- {
- if(!$this->acl->check('.ticket.external',
PHPGW_ACL_ADD, 'property'))
- {
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uilocation.stop', 'perm'=>4, 'acl_location'=> '.ticket.external'));
- }
-
- $values['assignedto'] = 'ignore';
- $values['group_id'] = 'ignore';
- $values['cat_id'] = 'ignore';
-
- $so = CreateObject('property.sotts');
- $so->acl_location = '.ticket.external';
- $receipt = $so->update_ticket($values,$id);
- if
((isset($this->bo->config->config_data['mailnotification']) &&
$this->bo->config->config_data['mailnotification'])
- ||
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['tts_notify_me'])
- &&
$GLOBALS['phpgw_info']['user']['preferences']['property']['tts_notify_me']==1
- && $this->bo->fields_updated
- )
- )
- {
- $receipt = $this->bo->mail_ticket($id,
$so->fields_updated, $receipt);
- }
- }
-
- $ticket = $this->bo->read_single($id);
-
- $additional_notes =
$this->bo->read_additional_notes($id);
- $record_history = $this->bo->read_record_history($id);
-
- $form_link = array
- (
- 'menuaction' =>
'property.uitts.view2',
- 'id' => $id
- );
-
- $table_header_history[] = array
- (
- 'lang_date' => lang('Date'),
- 'lang_user' => lang('User'),
- 'lang_action' =>
lang('Action'),
- 'lang_new_value' => lang('New
value')
- );
-
- $table_header_additional_notes[] = array
- (
- 'lang_count' => '#',
- 'lang_date' => lang('Date'),
- 'lang_user' => lang('User'),
- 'lang_note' => lang('Note'),
- );
-
- //_debug_array($ticket['location_data']);
-
- $location_data=$bolocation->initiate_ui_location(array(
- 'values' => $ticket['location_data'],
- 'type_id' =>
count(explode('-',$ticket['location_data']['location_code'])),
- 'no_link' => false, // disable lookup
links for location type less than type_id
- 'tenant' =>
(isset($ticket['location_data']['tenant_id'])?$ticket['location_data']['tenant_id']:''),
- 'lookup_type' => 'view',
- 'lookup_entity' =>
$this->bocommon->get_lookup_entity('ticket'),
-
- 'entity_data' =>
(isset($ticket['p'])?$ticket['p']:'')
- ));
-
-
- if($ticket['contact_phone'])
- {
- for
($i=0;$i<count($location_data['location']);$i++)
- {
-
if($location_data['location'][$i]['input_name'] == 'contact_phone')
- {
-
unset($location_data['location'][$i]['value']);
- }
- }
- }
-
- if ($ticket['cat_id'])
- {
- $this->cat_id = $ticket['cat_id'];
- }
-
- $msgbox_data = $this->bocommon->msgbox_data($receipt);
-
- if (isset($ticket['origin']) AND
is_array($ticket['origin']))
- {
- for ($i=0;$i<count($ticket['origin']);$i++)
- {
-
$ticket['origin'][$i]['link']=$GLOBALS['phpgw']->link('/index.php',$ticket['origin'][$i]['link']);
-
-
if(substr($ticket['origin'][$i]['type'],0,6)=='entity')
- {
- $type =
explode("_",$ticket['origin'][$i]['type']);
- $entity_id = $type[1];
- $cat_id = $type[2];
-
- if(!is_object($boadmin_entity))
- {
- $boadmin_entity =
CreateObject('property.boadmin_entity');
- }
- $entity_category =
$boadmin_entity->read_single_category($entity_id,$cat_id);
- $ticket['origin'][$i]['descr']
= $entity_category['name'];
- }
- else
- {
- $ticket['origin'][$i]['descr']=
lang($ticket['origin'][$i]['type']);
- }
- }
- }
-
- $data = array
- (
- 'value_origin'
=> (isset($ticket['origin'])?$ticket['origin']:''),
- 'lang_finnish_date'
=> lang('finnish date'),
- 'value_finnish_date'
=> $ticket['finnish_date'],
-
- 'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
-
- 'location_data'
=> $location_data,
- 'lang_location_code'
=> lang('Location Code'),
-
-
- 'lang_ticket'
=> lang('Ticket'),
- 'table_header_additional_notes' =>
$table_header_additional_notes,
- 'table_header_history'
=> $table_header_history,
- 'status_list'
=> array('options' => $this->bo->get_status_list($ticket['status'])),
- 'lang_status_statustext'
=> lang('Set the status of the ticket'),
-
- 'lang_no_user'
=> lang('Select user'),
- 'lang_user_statustext'
=> lang('Select the user the selection belongs to. To do not use a user select
NO USER'),
- 'select_user_name'
=> 'values[assignedto]',
- 'user_list'
=>
$this->bocommon->get_user_list_right2('select',4,$ticket['assignedto'],$this->acl_location),
-
- 'lang_group'
=> lang('Group'),
- 'lang_no_group'
=> lang('No group'),
- 'group_list'
=>
$this->bocommon->get_group_list('select',$ticket['group_id'],$start=-1,$sort='ASC',$order='account_firstname',$query='',$offset=-1),
- 'select_group_name'
=> 'values[group_id]',
-
- 'lang_priority'
=> lang('Priority'),
- 'value_priority'
=> $ticket['priority'],
- 'lang_priority_statustext'
=> lang('Select the priority the selection belongs to.'),
- 'select_priority_name'
=> 'values[priority]',
- 'priority_list'
=> $this->bo->get_priority_list($ticket['priority']),
-
- 'lang_no_cat'
=> lang('no category'),
- 'cat_select'
=> $this->cats->formatted_xslt_list(array('select_name' =>
'values[cat_id]','selected' => $this->cat_id,'use_acl' =>
$this->_category_acl)),
- 'lang_category'
=> lang('category'),
- 'value_category_name'
=> $ticket['category_name'],
-
- 'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$form_link),
- 'done_action'
=>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'property.uitts.index')),
- 'value_subject'
=> $ticket['subject'],
- 'lang_subject_statustext'
=> lang('update subject'),
- 'value_id'
=> '[ #'. $id . ' ] - ',
-
- 'lang_details'
=> lang('Details'),
- 'value_details'
=> $ticket['details'],
- 'lang_details_statustext'
=> lang('Add new comments'),
-
- 'lang_additional_notes'
=> lang('Additional notes'),
-
- 'lang_new_note'
=> lang('New Note'),
- 'lang_opendate'
=> lang('Open Date'),
- 'value_opendate'
=> $ticket['entry_date'],
-
- 'lang_assignedfrom'
=> lang('Assigned from'),
- 'value_assignedfrom'
=> $ticket['user_name'],
- 'lang_assignedto'
=> lang('Assigned to'),
- 'value_assignedto_name'
=> (isset($ticket['assignedto_name'])?$ticket['assignedto_name']:''),
-
- 'lang_no_additional_notes'
=> lang('No additional notes'),
- 'lang_history'
=> lang('History'),
- 'lang_no_history'
=> lang('No history for this record'),
- 'additional_notes'
=> $additional_notes,
- 'record_history'
=> $record_history,
-
- 'lang_save'
=> lang('save'),
- 'lang_name'
=> lang('name'),
- 'lang_done'
=> lang('done'),
- 'lang_contact_phone'
=> lang('Contact phone'),
- 'contact_phone'
=> $ticket['contact_phone'],
- );
- //_debug_array($data);
- $appname = lang('helpdesk');
- $function_msg = lang('view ticket detail');
-
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('property') . ' - ' . $appname . ': ' . $function_msg;
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view2' => $data));
- }
-
function view_file()
{
if(!$this->acl_read)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [12367] simplify uitts,
Sigurd Nes <=