mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02:00
Export/XML: new option to include link sets (default: no)
SVN:trunk[3696]
This commit is contained in:
@@ -41,11 +41,15 @@ class XMLBulkExport extends BulkExport
|
||||
switch($sPartId)
|
||||
{
|
||||
case 'xml_options':
|
||||
$sChecked = (utils::ReadParam('no_localize', 0) == 1) ? ' checked ' : '';
|
||||
$sNoLocalizeChecked = (utils::ReadParam('no_localize', 0) == 1) ? ' checked ' : '';
|
||||
$sLinksetChecked = (utils::ReadParam('linksets', 0) == 1) ? ' checked ' : '';
|
||||
$oP->add('<fieldset><legend>'.Dict::S('Core:BulkExport:XMLOptions').'</legend>');
|
||||
$oP->add('<table>');
|
||||
$oP->add('<tr>');
|
||||
$oP->add('<td><input type="checkbox" id="xml_no_localize" name="no_localize" value="1"'.$sChecked.'><label for="xml_no_localize"> '.Dict::S('Core:BulkExport:OptionNoLocalize').'</label></td>');
|
||||
$oP->add('<td><input type="checkbox" id="xml_no_localize" name="no_localize" value="1"'.$sNoLocalizeChecked.'><label for="xml_no_localize"> '.Dict::S('Core:BulkExport:OptionNoLocalize').'</label></td>');
|
||||
$oP->add('</tr>');
|
||||
$oP->add('<tr>');
|
||||
$oP->add('<td><input type="checkbox" id="xml_linksets" name="linksets" value="1"'.$sLinksetChecked.'><label for="xml_linksets"> '.Dict::S('Core:BulkExport:OptionLinkSets').'</label></td>');
|
||||
$oP->add('</tr>');
|
||||
$oP->add('</table>');
|
||||
$oP->add('</fieldset>');
|
||||
@@ -61,6 +65,7 @@ class XMLBulkExport extends BulkExport
|
||||
parent::ReadParameters();
|
||||
|
||||
$this->aStatusInfo['localize'] = (utils::ReadParam('no_localize', 0) != 1);
|
||||
$this->aStatusInfo['linksets'] = (utils::ReadParam('linksets', 0) == 1);
|
||||
}
|
||||
|
||||
protected function GetSampleData($oObj, $sAttCode)
|
||||
@@ -135,6 +140,12 @@ class XMLBulkExport extends BulkExport
|
||||
}
|
||||
foreach(MetaModel::ListAttributeDefs($sClassName) as $sAttCode=>$oAttDef)
|
||||
{
|
||||
if ($oAttDef->IsLinkSet() && !$this->aStatusInfo['linksets'])
|
||||
{
|
||||
// Skip link sets
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_null($oObj))
|
||||
{
|
||||
$sData .= "<$sAttCode>null</$sAttCode>\n";
|
||||
|
||||
@@ -2478,6 +2478,7 @@ Operators:<br/>
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)~~',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
|
||||
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
|
||||
|
||||
@@ -590,6 +590,7 @@ Operatoren:<br/>
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML (*.html)',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet-Optionen',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Werte von Aufzählungsfeldern nicht lokalisieren',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition der zu exportierenden Objekte',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL-Abfrage',
|
||||
'Core:BulkExportLabelPhrasebookEntry' => 'Query-Bibliotheks-Eintrag:',
|
||||
|
||||
@@ -842,6 +842,7 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:',
|
||||
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:',
|
||||
|
||||
@@ -836,6 +836,7 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)~~',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
|
||||
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
|
||||
|
||||
@@ -700,6 +700,7 @@ Opérateurs :<br/>
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Format HTML pour Excel (*.html)',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Options du format HTML pour Excel',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Ne pas traduire les valeurs (pour les champs de type "Enum")',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Inclure les objets liés',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Définition des objets à exporter',
|
||||
'Core:BulkExportLabelOQLExpression' => 'Requête OQL:',
|
||||
'Core:BulkExportLabelPhrasebookEntry' => 'Entrée du livre des requêtes:',
|
||||
|
||||
@@ -593,6 +593,7 @@ Operators:<br/>
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)~~',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
|
||||
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
|
||||
|
||||
@@ -825,6 +825,7 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)~~',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
|
||||
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
|
||||
|
||||
@@ -614,6 +614,7 @@ Operators:<br/>
|
||||
'Core:BulkExport:XMLOptions' => 'XML Options~~',
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)~~',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
|
||||
|
||||
@@ -844,6 +844,7 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'Core:BulkExport:XMLOptions' => 'XML Options~~',
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)~~',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
|
||||
|
||||
@@ -837,6 +837,7 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Core:BulkExport:XMLOptions' => 'XML Options~~',
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)~~',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
|
||||
|
||||
@@ -832,6 +832,7 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Core:BulkExport:XMLOptions' => 'XML Options~~',
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)~~',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
|
||||
|
||||
@@ -764,6 +764,7 @@ Operators:<br/>
|
||||
'Core:BulkExport:XMLOptions' => 'XML Options~~',
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)~~',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
|
||||
|
||||
@@ -763,6 +763,7 @@ Operators:<br/>
|
||||
'Core:BulkExport:XMLOptions' => 'XML Options~~',
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)~~',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
|
||||
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
|
||||
|
||||
Reference in New Issue
Block a user