From 7de4283188f631774ed9b055422f84d9814fdfc1 Mon Sep 17 00:00:00 2001 From: Stefan Rohde-Enslin Date: Wed, 28 Aug 2019 15:45:13 +0200 Subject: [PATCH] Extend new array for all fields --- values/availableFields.php | 72 ++++++++++++++++++++++++++++++++++---- 1 file changed, 65 insertions(+), 7 deletions(-) diff --git a/values/availableFields.php b/values/availableFields.php index 9ed9053..a5c3258 100644 --- a/values/availableFields.php +++ b/values/availableFields.php @@ -7,8 +7,10 @@ 4: dependent fields 5: remarks */ +require __DIR__ . "/../translation-importer/$lang/csvxml-overview.php"; require __DIR__ . "/langfiles/$lang/object_basis.php"; +require __DIR__ . "/langfiles/$lang/object.php"; require __DIR__ . "/langfiles/$lang/quality.php"; require __DIR__ . "/langfiles/$lang/museum.php"; @@ -17,7 +19,7 @@ require __DIR__ . "/langfiles/$lang/settings.php"; $availableFields = [ - "basic" => [ + $csvxml_overview['object_base_data'] => [ "inventory_number" => [ "required" => true, "format" => 'text/utf8', @@ -45,6 +47,42 @@ $availableFields = [ "name_human_readable" => $object_basis['object_name'], "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: material_separate and technique_separate', + "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: separate dimensions', + "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" => [ "required" => false, "format" => 'text/utf8', @@ -57,6 +95,7 @@ $availableFields = [ ] ]; + /* * Repeat fields */ @@ -65,7 +104,7 @@ $availableFields = [ for ($i = 1; $i <= 2; $i++) { - $availableFields["basic"]["collection_name{$i}"] = [ + $availableFields[$csvxml_overview['object_base_data']]["collection_name{$i}"] = [ "category" => "basic", "required" => false, "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 object_other_title is used. It has to be specified where this alternative title is used. Specification should be done within the field: object_other_title_kind_of', + "name_human_readable" => 'Weitere Objektbezeichnung', + "explica" => '', + ], + "object_other_title_kind_of" => [ + "required" => false, + "format" => 'text/utf8', + "allowedValues" => 'de: "Wissenschaft", "Alltagssprache", "Umgangssprache", "Dialekt"
hu: "Tudományos", "Köznyelvi", "Nyelvjárás"', + "dependsOn" => 'object_other_title', + "remark" => 'This field has to be used togehter with object_other_title', + "name_human_readable" => 'Weitere Objektbezeichnung, in: ', + "explica" => '', + ], + ] +]; + return; $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: material_separate and technique_separate'), -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: separate dimensions'), -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 object_other_title is used. It has to be specified where this alternative title is used. Specification should be done within the field: object_other_title_kind_of'), array ('object_other_title_kind_of','n','text/utf8','de: "Wissenschaft", "Alltagssprache", "Umgangssprache", "Dialekt"
hu: "Tudományos", "Köznyelvi", "Nyelvjárás"', 'object_other_title', 'This field has to be used togehter with object_other_title'), array ('detailed_description','n','text/utf8','freetext','detailed_description_md and detailed_description_extern','If detailed_desription is made available for an object, detailed_description_md and detailed_description_extern have to have values too'),