mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Exports further improved:
- Support reconciliation keys for every external key - Better support for Case logs and multiline text fields (both in the preview and in the results) - Do not repeat identical columns in the list of proposed columns. Examples with UserRequest: friendlyname is equivalent to ref, UserRequest::caller_name is equivalent to UserRequest::caller_id->name - Optimized the preview for huge data sets (OptimizeColumnLoad) - Cosmetics on the preview - Labels for ids aligned with the labels used by the CSV import feature - Fixed Stop Watch output for PDF/HTML/spreadsheet formats SVN:trunk[3712]
This commit is contained in:
@@ -58,7 +58,7 @@ class CSVBulkExport extends TabularBulkExport
|
||||
}
|
||||
|
||||
|
||||
protected function SuggestField($aAliases, $sClass, $sAlias, $sAttCode)
|
||||
protected function SuggestField($sClass, $sAttCode)
|
||||
{
|
||||
switch($sAttCode)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ class CSVBulkExport extends TabularBulkExport
|
||||
}
|
||||
}
|
||||
|
||||
return parent::SuggestField($aAliases, $sClass, $sAlias, $sAttCode);
|
||||
return parent::SuggestField($sClass, $sAttCode);
|
||||
}
|
||||
|
||||
public function EnumFormParts()
|
||||
@@ -170,13 +170,19 @@ class CSVBulkExport extends TabularBulkExport
|
||||
|
||||
protected function GetSampleData($oObj, $sAttCode)
|
||||
{
|
||||
if ($oObj)
|
||||
return '<div class="text-preview">'.htmlentities($this->GetValue($oObj, $sAttCode), ENT_QUOTES, 'UTF-8').'</div>';
|
||||
}
|
||||
|
||||
protected function GetValue($oObj, $sAttCode)
|
||||
{
|
||||
switch($sAttCode)
|
||||
{
|
||||
$sRet = trim($oObj->GetAsCSV($sAttCode), '"');
|
||||
}
|
||||
else
|
||||
{
|
||||
$sRet = '';
|
||||
case 'id':
|
||||
$sRet = $oObj->GetKey();
|
||||
break;
|
||||
|
||||
default:
|
||||
$sRet = trim($oObj->GetAsCSV($sAttCode), '"');
|
||||
}
|
||||
return $sRet;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user