forked from extern/egroupware
Human friendly values for status
This commit is contained in:
parent
4c9b620657
commit
9ab2212cfa
@ -22,6 +22,7 @@ class timesheet_export_csv implements importexport_iface_export_plugin {
|
|||||||
'date-time' => array('ts_start', 'ts_modified'),
|
'date-time' => array('ts_start', 'ts_modified'),
|
||||||
'select-cat' => array('cat_id'),
|
'select-cat' => array('cat_id'),
|
||||||
'links' => array('pl_id'),
|
'links' => array('pl_id'),
|
||||||
|
'select' => array('ts_status'),
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,12 +50,16 @@ class timesheet_export_csv implements importexport_iface_export_plugin {
|
|||||||
$export_object = new importexport_export_csv($_stream, (array)$options);
|
$export_object = new importexport_export_csv($_stream, (array)$options);
|
||||||
$export_object->set_mapping($options['mapping']);
|
$export_object->set_mapping($options['mapping']);
|
||||||
|
|
||||||
|
$lookups = array(
|
||||||
|
'ts_status' => $uitimesheet->status_labels+array(lang('No status'))
|
||||||
|
);
|
||||||
|
|
||||||
// $options['selection'] is array of identifiers as this plugin doesn't
|
// $options['selection'] is array of identifiers as this plugin doesn't
|
||||||
// support other selectors atm.
|
// support other selectors atm.
|
||||||
foreach ($selection as $identifier) {
|
foreach ($selection as $identifier) {
|
||||||
$record = new timesheet_egw_record($identifier);
|
$record = new timesheet_egw_record($identifier);
|
||||||
if($options['convert']) {
|
if($options['convert']) {
|
||||||
importexport_export_csv::convert($record, self::$types, 'timesheet');
|
importexport_export_csv::convert($record, self::$types, 'timesheet', $lookups);
|
||||||
} else {
|
} else {
|
||||||
// Implode arrays, so they don't say 'Array'
|
// Implode arrays, so they don't say 'Array'
|
||||||
foreach($record->get_record_array() as $key => $value) {
|
foreach($record->get_record_array() as $key => $value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user