From 2a8dafba2f48dd01372a3cedf1c353f0b76d477b Mon Sep 17 00:00:00 2001
From: Gregor Gawol <gawol@ub.uni-leipzig.de>
Date: Thu, 9 Jul 2020 13:29:21 +0200
Subject: [PATCH] refs #17930 [master] missing solrai template
 data-jTitle.phtml * added template

---
 .../RecordDriver/SolrAI/data-jTitle.phtml     | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml

diff --git a/themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml b/themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml
new file mode 100644
index 00000000000..3d22ec4d5be
--- /dev/null
+++ b/themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml
@@ -0,0 +1,35 @@
+<!-- finc: RecordDriver - SolrAI - data-jTitle -->
+<?php $jtitle = []; ?>
+<?php if (!(empty($data))): ?>
+  <?php $issns = $this->driver->tryMethod('getISSNs'); ?>
+  <?php ob_start(); ?>
+  <?php if (!empty($issns)): ?>
+    <a href="<?=$this->record($this->driver)->getLink('isn', $issns)?>">
+      <?=$this->escapeHtml($data)?>
+    </a>
+  <?php else: ?>
+    <?=$this->escapeHtml($data)?>
+  <?php endif; ?>
+  <?php
+  $jtitle[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents()));
+  ob_end_clean();
+  ?>
+<?php endif; ?>
+<?php
+// please note: direction of iteration will be displayed
+$methods = ['getVolume', 'getPublishDateSort', 'getIssues', 'getPages'];
+foreach ($methods as $method) {
+  if (!(empty($retval = $this->driver->tryMethod($method)))) {
+    $jtitle[] = ($method == 'getPages')
+      ? $this->transEsc('p.') . ' ' . $this->escapeHtml($retval)
+      : $this->escapeHtml($retval);
+  }
+}
+?>
+<?php /* finc: add schema tags for parent publication #13850 - VE */ ?>
+<span property="isPartOf" typeof="Periodical" resource="#periodical">
+  <span property="name">
+    <?=implode(', ', $jtitle)?>
+  </span>
+</span>
+<!-- finc: RecordDriver - SolrAi - data-jTitle - END -->
-- 
GitLab