From fe2c59d242a8cf14d0bba8d46e41fb9499b08813 Mon Sep 17 00:00:00 2001
From: Robert Lange <robert.lange@uni-leipzig.de>
Date: Fri, 10 Jan 2020 16:46:55 +0100
Subject: [PATCH] refs #16676 [fid_adlr] change labels in result list

* for in_collection and published_in
* in detail for Source and Set_Multipart
* change separator for authors from comma to semicolon
** in result list
** in detail template
* separate title_sub from title_short
* fine tuning of font size / placement in result and detail view
---
 fid_adlr/languages/de.ini                     |  8 +++++++-
 fid_adlr/languages/en.ini                     |  9 ++++++++-
 themes/fid_adlr/scss/_customVariables.scss    |  2 ++
 themes/fid_adlr/scss/compiled.scss            | 20 ++++++++++++++-----
 .../RecordDriver/DefaultRecord/core.phtml     |  6 ++++--
 .../DefaultRecord/result-list.phtml           |  4 ++--
 .../templates/RecordDriver/SolrAI/core.phtml  |  5 ++++-
 .../RecordDriver/SolrAI/result-list.phtml     |  4 ++--
 .../RecordDriver/SolrMarc/core.phtml          |  6 ++++--
 9 files changed, 48 insertions(+), 16 deletions(-)

diff --git a/fid_adlr/languages/de.ini b/fid_adlr/languages/de.ini
index 4519e8dabc8..6ec5bdc1c8a 100644
--- a/fid_adlr/languages/de.ini
+++ b/fid_adlr/languages/de.ini
@@ -126,4 +126,10 @@ hierarchy_tree = "Zugehörige Bände"
 #16605
 You must be logged in first = "Bitte loggen Sie sich zuerst ein."
 history_recent_searches = "Ihre aktuellen Suchen
-email_success = Ihre Nachricht wurde gesendet."
\ No newline at end of file
+email_success = Ihre Nachricht wurde gesendet."
+
+#16676
+in_collection_label = "Teil von"
+Published in = "veröffentlicht in"
+Set Multipart = "Teil von"
+Source = "Kollektion"
\ No newline at end of file
diff --git a/fid_adlr/languages/en.ini b/fid_adlr/languages/en.ini
index 5095c9be351..0cdc771794c 100644
--- a/fid_adlr/languages/en.ini
+++ b/fid_adlr/languages/en.ini
@@ -123,4 +123,11 @@ hierarchy_tree = "Associated Volumes"
 
 #16605
 You must be logged in first = "Please log in first."
-email_success =  "Your message has been sent."
\ No newline at end of file
+email_success =  "Your message has been sent."
+
+
+#16676
+in_collection_label = "Part of"
+Published in = "published in"
+Set Multipart = "Part of"
+Source = "Collection"
\ No newline at end of file
diff --git a/themes/fid_adlr/scss/_customVariables.scss b/themes/fid_adlr/scss/_customVariables.scss
index 0d3fef14a72..91f3926cf96 100644
--- a/themes/fid_adlr/scss/_customVariables.scss
+++ b/themes/fid_adlr/scss/_customVariables.scss
@@ -150,6 +150,8 @@ $font-size-menu-default: 23px;
 $font-size-menu-xs: $font-size-menu-default !default;
 $font-size-menu-sm: 40px !default;
 $font-size-menu-lg: 25px !default;
+$font-size-title: 24px !default;
+$font-size-title-sub: calc(#{$font-size-title} * 0.85);
 //// We use these to define default font stacks
 $font-family-sans-serif: 'Open Sans', Helvetica, Roboto, Arial, sans-serif !default;
 // $font-family-serif: Georgia, Cambria, 'Times New Roman', Times, serif !default;
diff --git a/themes/fid_adlr/scss/compiled.scss b/themes/fid_adlr/scss/compiled.scss
index 54c71b6e42d..b4b3a68ef8f 100644
--- a/themes/fid_adlr/scss/compiled.scss
+++ b/themes/fid_adlr/scss/compiled.scss
@@ -116,9 +116,9 @@ h2 {
 
 // ++ h3
 h3 {
-  font-size: em(24px);
+  font-size: em($font-size-title);
   font-weight: 700;
-  line-height: em(24px);
+  line-height: em($font-size-title);
 
   @media (min-width: $screen-sm-min) and (max-width: $screen-md-max) {
     font-size: em(28px);
@@ -131,7 +131,12 @@ h3 {
   }
 
   .title-toolbar & {
-    font-size: 24px;
+    font-size: $font-size-title;
+  }
+
+  .sub {
+    font-size: $font-size-title-sub;
+    line-height: 1.35em;
   }
 }
 
@@ -237,7 +242,7 @@ form input:invalid, form textarea:invalid {
   }
 }
 
-.margin-btm {
+.margin-btm-xl {
   margin-bottom: 85px;
 }
 
@@ -1636,6 +1641,7 @@ input.searchForm_lookfor {
   .format {
     background-color: $white;
     color: $asphalt;
+    padding-left: 0;
   }
 
   @media screen and (max-width: $screen-xs-max) {
@@ -1646,8 +1652,12 @@ input.searchForm_lookfor {
 
   .title {
     font-family: $font-family-monospace;
-    font-size: 24px;
+    font-size: 22px;
     font-weight: 700;
+
+    &.getFull {
+      line-height: 1.35em;
+    }
   }
 
   @media screen and (min-width: $screen-sm-min) {
diff --git a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/core.phtml b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/core.phtml
index 2d357eb2f66..62a57b7e884 100644
--- a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/core.phtml
+++ b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/core.phtml
@@ -46,8 +46,10 @@
        */
           ?>
           <?php /* finc: add schema tags for title #13850 - VE */ ?>
-        <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3>
-
+          <?php /* #16676 separate title_sub from title_short- RL */ ?>
+          <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle(), 100)))?>
+            <p class="sub"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 125)))?></p>
+          </h3>
           <?php /* fid_adlr: Remove summary refs #15650 - GG */ ?>
 
           <?php if ($this->userlist()->getMode() !== 'disabled'): ?>
diff --git a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml
index 18d38f01ffd..12ae7ab2823 100644
--- a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml
+++ b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml
@@ -31,7 +31,7 @@ if ($cover):
   <?php endif ?>
   <div class="media-body">
     <div class="result-body">
-      <div>
+      <div class="margin-btm">
         <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>">
           <?=$this->record($this->driver)->getTitleHtml()?>
         </a>
@@ -46,7 +46,7 @@ if ($cover):
             <?=$this->transEsc('by')?>
             <?php $authorCount = count($summAuthors);
             foreach ($summAuthors as $i => $summAuthor): ?>
-              <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ',' : ''?>
+              <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ';' : ''?>
             <?php endforeach; ?>
           <?php endif; ?>
           <?php
diff --git a/themes/fid_adlr/templates/RecordDriver/SolrAI/core.phtml b/themes/fid_adlr/templates/RecordDriver/SolrAI/core.phtml
index 0535452a341..e651e7d0605 100644
--- a/themes/fid_adlr/templates/RecordDriver/SolrAI/core.phtml
+++ b/themes/fid_adlr/templates/RecordDriver/SolrAI/core.phtml
@@ -48,7 +48,10 @@
          */
             ?>
             <?php /* finc: add schema tags for title #13850 - VE */ ?>
-          <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3>
+            <?php /* #16676 separate title_sub from title_short- RL */ ?>
+            <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle(), 100)))?>
+              <p class="sub"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 125)))?></p>
+            </h3>
 
             <?php /* fid_adlr: Remove summary refs #15650 - GG */ ?>
 
diff --git a/themes/fid_adlr/templates/RecordDriver/SolrAI/result-list.phtml b/themes/fid_adlr/templates/RecordDriver/SolrAI/result-list.phtml
index ad4829ffe35..2f2b27d7b45 100644
--- a/themes/fid_adlr/templates/RecordDriver/SolrAI/result-list.phtml
+++ b/themes/fid_adlr/templates/RecordDriver/SolrAI/result-list.phtml
@@ -30,7 +30,7 @@ if ($cover):
   <?php endif ?>
   <div class="media-body">
     <div class="result-body">
-      <div>
+      <div class="margin-btm">
         <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>">
           <?=$this->record($this->driver)->getTitleHtml()?>
         </a>
@@ -44,7 +44,7 @@ if ($cover):
             <?=$this->transEsc('by')?>
             <?php $authorCount = count($summAuthors);
             foreach ($summAuthors as $i => $summAuthor): ?>
-              <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ',' : ''?>
+              <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ';' : ''?>
             <?php endforeach; ?>
           <?php endif; ?>
           <?php /* finc-specific from here - 04.16 - CK */ ?>
diff --git a/themes/fid_adlr/templates/RecordDriver/SolrMarc/core.phtml b/themes/fid_adlr/templates/RecordDriver/SolrMarc/core.phtml
index 62ae05e2d96..e2e43d8b62e 100644
--- a/themes/fid_adlr/templates/RecordDriver/SolrMarc/core.phtml
+++ b/themes/fid_adlr/templates/RecordDriver/SolrMarc/core.phtml
@@ -48,8 +48,10 @@
          */
             ?>
             <?php /* finc: add schema tags for title #13850 - VE */ ?>
-          <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3>
-
+            <?php /* #16676 separate title_sub from title_short- RL */ ?>
+            <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle(), 100)))?>
+              <p class="sub"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 125)))?></p>
+            </h3>
             <?php /* fid_adlr: Remove summary refs #15650 - GG */ ?>
 
             <?php if ($this->userlist()->getMode() !== 'disabled'): ?>
-- 
GitLab