From 23a9c470588ca13f14adb0603c4550735cc92a64 Mon Sep 17 00:00:00 2001
From: Robert Lange <robert.lange@uni-leipzig.de>
Date: Mon, 22 Mar 2021 15:08:41 +0100
Subject: [PATCH] refs #17594 [fid_bbi] separate imprint from
 publicationDetails for Solr Default Core

* remove special treatment for strings in bbi data-publicationDetails
* use imprint instead of publicationDetails with new finc data-imprint.phtml
---
 .../fid_bbi/View/Helper/Root/RecordDataFormatterFactory.php | 4 ++--
 .../DefaultRecord/data-publicationDetails.phtml             | 6 ------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/module/fid_bbi/src/fid_bbi/View/Helper/Root/RecordDataFormatterFactory.php b/module/fid_bbi/src/fid_bbi/View/Helper/Root/RecordDataFormatterFactory.php
index 39f87ea365e..04e22f7a1d0 100644
--- a/module/fid_bbi/src/fid_bbi/View/Helper/Root/RecordDataFormatterFactory.php
+++ b/module/fid_bbi/src/fid_bbi/View/Helper/Root/RecordDataFormatterFactory.php
@@ -292,8 +292,8 @@ class RecordDataFormatterFactory extends \fid\View\Helper\Root\RecordDataFormatt
         );
         $spec->setTemplateLine(
             'Published',
-            'getPublicationDetails',
-            'data-publicationDetails.phtml'
+            'getImprint',
+            'data-imprint.phtml'
         );
         $spec->setTemplateLine(
             'Set Multipart',
diff --git a/themes/fid_bbi/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml b/themes/fid_bbi/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml
index d67d1cb2c12..554814de51a 100644
--- a/themes/fid_bbi/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml
+++ b/themes/fid_bbi/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml
@@ -1,10 +1,6 @@
 <!-- fid_bbi: RecordDriver - DefaultRecord - data-publicationDetails -->
-<? if (!empty($data)): ?>
 <div itemscope itemtype="http://schema.org/publisher">
     <? foreach ((array)$data as $field): ?>
-    <?php if(is_string($data)): ?>
-    <?=$this->escapeHtml($data)?>
-    <?php else: ?>
     <span property="publisher" typeof="Organization">
         <? $pubPlace = $field->getPlace(); if (!empty($pubPlace)): ?>
           <span property="location" typeof="Place">
@@ -22,9 +18,7 @@
         --><?=!empty($pubPlace) || !empty($pubName) ? ', ' :''?><?=$this->escapeHtml($pubDate)?>
     <? /*else: ?>
         <?=$this->escapeHtml($pubDateSort)*/?></span>
-    <? endif; ?>
     </span><?php endif; ?><br/>
     <? endforeach; ?>
 </div>
-<? endif ?>
 <!-- fid_bbi: RecordDriver - DefaultRecord - data-publicationDetails - END -->
-- 
GitLab