Extend new array for all fields

This commit is contained in:
Stefan Rohde-Enslin 2019-08-28 15:45:13 +02:00
parent 8e5bf71774
commit 7de4283188

View File

@ -7,8 +7,10 @@
4: dependent fields 4: dependent fields
5: remarks 5: remarks
*/ */
require __DIR__ . "/../translation-importer/$lang/csvxml-overview.php";
require __DIR__ . "/langfiles/$lang/object_basis.php"; require __DIR__ . "/langfiles/$lang/object_basis.php";
require __DIR__ . "/langfiles/$lang/object.php";
require __DIR__ . "/langfiles/$lang/quality.php"; require __DIR__ . "/langfiles/$lang/quality.php";
require __DIR__ . "/langfiles/$lang/museum.php"; require __DIR__ . "/langfiles/$lang/museum.php";
@ -17,7 +19,7 @@ require __DIR__ . "/langfiles/$lang/settings.php";
$availableFields = [ $availableFields = [
"basic" => [ $csvxml_overview['object_base_data'] => [
"inventory_number" => [ "inventory_number" => [
"required" => true, "required" => true,
"format" => 'text/utf8', "format" => 'text/utf8',
@ -45,6 +47,42 @@ $availableFields = [
"name_human_readable" => $object_basis['object_name'], "name_human_readable" => $object_basis['object_name'],
"explica" => $object_basis['oname_explica'], "explica" => $object_basis['oname_explica'],
], ],
"object_description" => [
"required" => true,
"format" => 'text/utf8',
"allowedValues" => 'freetext',
"dependsOn" => [],
"remark" => 'A good description of the objects is fundamental to make the objects searchable in the internet',
"name_human_readable" => $object_basis['description'],
"explica" => $object_basis['obesch_explica'],
],
"object_material_technique" => [
"required" => false,
"format" => 'text/utf8',
"allowedValues" => 'freetext',
"dependsOn" => [],
"remark" => 'This is a cummulative field for material and technique. It is also possible to additionally save the information separate in the fields: <i>material_separate</i> and <i>technique_separate</i>',
"name_human_readable" => $object_basis['mattech'],
"explica" => $object_basis['mattech_explica'],
],
"object_dimensions" => [
"required" => false,
"format" => 'text/utf8',
"allowedValues" => 'freetext',
"dependsOn" => [],
"remark" => 'This is a cummulative field for dimensions (values and units). It is also possible to additionally save the information separate. See the block: <i>separate dimensions</i>',
"name_human_readable" => $object_basis['measurements'],
"explica" => $object_basis['ausmass_explica'],
],
"object_publication" => [
"required" => false,
"format" => 'text/utf8',
"allowedValues" => 'One letter only, y or n',
"dependsOn" => [],
"remark" => 'Shall the object be visible directly after import?',
"name_human_readable" => $objekt['visibility'],
"explica" => '',
],
"institution_name" => [ "institution_name" => [
"required" => false, "required" => false,
"format" => 'text/utf8', "format" => 'text/utf8',
@ -57,6 +95,7 @@ $availableFields = [
] ]
]; ];
/* /*
* Repeat fields * Repeat fields
*/ */
@ -65,7 +104,7 @@ $availableFields = [
for ($i = 1; $i <= 2; $i++) { for ($i = 1; $i <= 2; $i++) {
$availableFields["basic"]["collection_name{$i}"] = [ $availableFields[$csvxml_overview['object_base_data']]["collection_name{$i}"] = [
"category" => "basic", "category" => "basic",
"required" => false, "required" => false,
"format" => 'text/utf8', "format" => 'text/utf8',
@ -78,14 +117,33 @@ for ($i = 1; $i <= 2; $i++) {
} }
$availableFields = [
"other_object_title" => [
"other_object_title" => [
"required" => false,
"format" => 'text/utf8',
"allowedValues" => 'freetext',
"dependsOn" => 'object_other_title_kind_of',
"remark" => 'If the field <i>object_other_title</i> is used. It has to be specified where this alternative title is used. Specification should be done within the field: <i>object_other_title_kind_of</i>',
"name_human_readable" => 'Weitere Objektbezeichnung',
"explica" => '',
],
"object_other_title_kind_of" => [
"required" => false,
"format" => 'text/utf8',
"allowedValues" => 'de: "Wissenschaft", "Alltagssprache", "Umgangssprache", "Dialekt"<br>hu: "Tudományos", "Köznyelvi", "Nyelvjárás"',
"dependsOn" => 'object_other_title',
"remark" => 'This field has to be used togehter with <i>object_other_title</i>',
"name_human_readable" => 'Weitere Objektbezeichnung, in: ',
"explica" => '',
],
]
];
return; return;
$allowed = array( $allowed = array(
array ('object_title','y','text/utf8','freetext','none','Best is not to repeat the title again and again for many objects, e.g. vase, vase, vase ... better: Green vase, Blue vase, Yellow vase, ...'),
array ('object_description','y','text/utf8','freetext','none','A good description of the objects is fundamental to make the objects searchable in the internet'),
array ('object_material_technique','n','text/utf8','freetext','none','This is a cummulative field for material and technique. It is also possible to additionally save the information separate in the fields: <i>material_separate</i> and <i>technique_separate</i>'),
array ('object_dimensions','n','text/utf8','freetext','none','This is a cummulative field for dimensions (values and units). It is also possible to additionally save the information separate. See the block: <i>separate dimensions</i>'),
array ('object_publication','n','One letter only','"y","n"','none','Shall the object be visible directly after import?'),
array ('object_other_title','n','text/utf8','freetext','object_other_title_kind_of','If the field <i>object_other_title</i> is used. It has to be specified where this alternative title is used. Specification should be done within the field: <i>object_other_title_kind_of</i>'), array ('object_other_title','n','text/utf8','freetext','object_other_title_kind_of','If the field <i>object_other_title</i> is used. It has to be specified where this alternative title is used. Specification should be done within the field: <i>object_other_title_kind_of</i>'),
array ('object_other_title_kind_of','n','text/utf8','de: "Wissenschaft", "Alltagssprache", "Umgangssprache", "Dialekt"<br>hu: "Tudományos", "Köznyelvi", "Nyelvjárás"', 'object_other_title', 'This field has to be used togehter with <i>object_other_title</i>'), array ('object_other_title_kind_of','n','text/utf8','de: "Wissenschaft", "Alltagssprache", "Umgangssprache", "Dialekt"<br>hu: "Tudományos", "Köznyelvi", "Nyelvjárás"', 'object_other_title', 'This field has to be used togehter with <i>object_other_title</i>'),
array ('detailed_description','n','text/utf8','freetext','detailed_description_md and detailed_description_extern','If <i>detailed_desription</i> is made available for an object, <i>detailed_description_md</i> and <i>detailed_description_extern</i> have to have values too'), array ('detailed_description','n','text/utf8','freetext','detailed_description_md and detailed_description_extern','If <i>detailed_desription</i> is made available for an object, <i>detailed_description_md</i> and <i>detailed_description_extern</i> have to have values too'),