From bb27d7b6c47aac9de0f86c5a3e177945356f966a Mon Sep 17 00:00:00 2001 From: buttle Date: Mon, 31 May 2021 10:43:40 +0200 Subject: [PATCH] adds texts blocks. adds logo to pdf --- config/module.config.php | 21 +++++++++++++++++++++ src/Form/TechDocumentBlockForm.php | 22 ++++++++++++++++++++++ src/Site/BlockLayout/TechDocument.php | 9 ++++++++- 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/config/module.config.php b/config/module.config.php index c580f2c..4a59f89 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -49,12 +49,14 @@ Transport: (movable or fixed) Status: (stable, unstable, living, dead(fixed or decaying), inert) Lifespan: Life cycle:', + 'digitization' => 'Digitization status: (2D picture, 2D drawing, 2D + video, 2D + multispectral, 3D photogrammetry, 3D structured light, other) Digitization Protocols: Creators of digitization files: Contributors for the digitization: Rights: Tags:', + 'storage' => 'What are the inert parts of the work: How to box them and what care needs to happen to maintain the materials in good condition: What are the living organisms that form the work: (what kingdom, order etc. - @@ -67,6 +69,7 @@ How do they interact: Documentation on the work ( video, photos, texts, etc.) History of exhibitions + documentation: ( video, photos, texts, etc.) Publications of the work: (articles, catalogues, etc.)', + 'installation' => 'Assemblage requirements: Dimensions: Light requirements: (natural light, artificial light, grow light, light cycles, ambient light or spotlight) @@ -82,6 +85,24 @@ Audiovisual equipment requirements: (projectors, screens, players, speakers, PA, Can it be shown as in a documentary form (video, images, text): specify Can it be shown as a posthumous display: Can it be shown as a living installation:', + + 'shipping' => 'Shipping requirements for inert parts: +Crate number: +Crate(s) dimensions: (Length, Breadth, Height) +Crate(s) weight: +Crate(s) volume: (in cm3) + +Shipping requirements for living materials: +Live material source: (international company, home laboratory, specific laboratory, local, wild): +Does it need special packaging and/or temperature requirements:', + + 'longtermcare' => 'Live material source: (international company, home laboratory, specific laboratory, local, wild): +Does it need special packaging and/or temperature requirements: +Bio-safety level requirements: (touch friendly, safety distance required, double containment required, triple containment required, specific licenses required, reports or declarations required) +Time frame limitations: (days, weeks, months, years) +What can be done to replace the living organisms: +Does it need a hardware update/maintenance: +Does it need software update/maintenance:', ] ] ]; diff --git a/src/Form/TechDocumentBlockForm.php b/src/Form/TechDocumentBlockForm.php index 7f39148..89b59fd 100644 --- a/src/Form/TechDocumentBlockForm.php +++ b/src/Form/TechDocumentBlockForm.php @@ -49,6 +49,28 @@ class TechDocumentBlockForm extends Form 'options' => [ 'label' => 'Installation', 'info' => 'https://www.markdownguide.org/cheat-sheet', + ], + 'attributes' => [ + 'rows' => '10', + ], + ]); + $this->add([ + 'name' => 'o:block[__blockIndex__][o:data][shipping]', + 'type' => Element\Textarea::class, + 'options' => [ + 'label' => 'Shipping', + 'info' => 'https://www.markdownguide.org/cheat-sheet', + ], + 'attributes' => [ + 'rows' => '10', + ], + ]); + $this->add([ + 'name' => 'o:block[__blockIndex__][o:data][longtermcare]', + 'type' => Element\Textarea::class, + 'options' => [ + 'label' => 'Long-term care', + 'info' => 'https://www.markdownguide.org/cheat-sheet', ], 'attributes' => [ 'rows' => '10', diff --git a/src/Site/BlockLayout/TechDocument.php b/src/Site/BlockLayout/TechDocument.php index ae6d2f6..b80d1f1 100644 --- a/src/Site/BlockLayout/TechDocument.php +++ b/src/Site/BlockLayout/TechDocument.php @@ -61,7 +61,8 @@ class TechDocument extends AbstractBlockLayout $parsedown = new Parsedown(); # logo -> link to site page - $text = "# ".$site_title." ".$dir."\n"; + $text = "\n"; + $text .= "\n# ".$site_title." ".$dir."\n"; $text .= "## Technical documentation\n"; $text .= "### Characteristics\n"; $text .= $data['characteristics']; @@ -71,6 +72,10 @@ class TechDocument extends AbstractBlockLayout $text .= $data['storage']; $text .= "\n\n### Installation\n"; $text .= $data['installation']; + $text .= "\n\n### Shipping it\n"; + $text .= $data['shipping']; + $text .= "\n\n### Long-term Care: (in storage and on display)\n"; + $text .= $data['longtermcare']; $html = $parsedown->setBreaksEnabled(true)->text($text); $mpdf = new \Mpdf\Mpdf(); @@ -92,6 +97,8 @@ class TechDocument extends AbstractBlockLayout 'o:block[__blockIndex__][o:data][digitization]' => $data['digitization'], 'o:block[__blockIndex__][o:data][storage]' => $data['storage'], 'o:block[__blockIndex__][o:data][installation]' => $data['installation'], + 'o:block[__blockIndex__][o:data][shipping]' => $data['shipping'], + 'o:block[__blockIndex__][o:data][longtermcare]' => $data['longtermcare'], ]); $form->prepare();