From b9600f2bbddbf2a26654588a5fcce692ba63d454 Mon Sep 17 00:00:00 2001
From: Eric Bremner <ebremner@uwaterloo.ca>
Date: Wed, 18 Jan 2023 13:09:40 -0500
Subject: [PATCH] ISTWCMS-6062: modifying admin label to include publications
 on reference blocks when in layout builder

---
 uw_fdsu_theme_resp.theme | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/uw_fdsu_theme_resp.theme b/uw_fdsu_theme_resp.theme
index 6d5f425a..659bf07e 100644
--- a/uw_fdsu_theme_resp.theme
+++ b/uw_fdsu_theme_resp.theme
@@ -575,6 +575,17 @@ function uw_fdsu_theme_resp_preprocess_block(&$variables) {
     // to the template variables and set the class to be used
     // to display the admin label.
     if (!in_array($admin_label, $admin_labels_to_exclude)) {
+
+      // ISTWCMS-6062, add publication to reference block admin
+      // labels when in layout builder.
+      if ($admin_label == 'Reference search') {
+        $admin_label = 'Publication reference search';
+      }
+
+      if ($admin_label == 'Reference teaser') {
+        $admin_label = 'Publication reference teaser';
+      }
+
       $variables['admin_label'] = $admin_label;
       $variables['attributes']['class'][] = 'in-layout-builder';
     }
-- 
GitLab