From b85f15f32e55d3b713d20f504d30c1c304079db3 Mon Sep 17 00:00:00 2001 From: Jeremy McDermott Date: Tue, 5 Dec 2023 13:22:34 -0400 Subject: [PATCH] NBNP-410 Add applicable issue missing pages alert to bottom of page viewer --- .../src/Form/SerialPageViewerForm.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/custom/modules/digital_serial/modules/digital_serial_page/src/Form/SerialPageViewerForm.php b/custom/modules/digital_serial/modules/digital_serial_page/src/Form/SerialPageViewerForm.php index 8f091d6b..b1b30d45 100644 --- a/custom/modules/digital_serial/modules/digital_serial_page/src/Form/SerialPageViewerForm.php +++ b/custom/modules/digital_serial/modules/digital_serial_page/src/Form/SerialPageViewerForm.php @@ -166,6 +166,24 @@ public function buildForm(array $form, FormStateInterface $form_state, SerialTit $form['page_viewer']['metadata'] = $this->getMetadataRenderElement($digital_serial_title, $digital_serial_issue); + if (!empty($issue_missingp_note)) { + $form['page_viewer']['missing_pages_note'] = [ + '#type' => 'container', + 'child' => [ + '#markup' => $this->t("This issue is missing pages: @note.", [ + '@note' => $issue_missingp_note, + ]), + ], + '#attributes' => [ + 'class' => [ + 'alert', + 'alert-info', + ], + ], + '#weight' => 5, + ]; + } + // Determine if we're using DZI or the plain old image. if (file_exists($dzi_path)) { $tile_sources = str_replace(".$image_extension", '.dzi', $image_path);