From 61fadb961621699a8cb31ff045b49b2c5ae1a464 Mon Sep 17 00:00:00 2001
From: Robert Lange <robert.lange@uni-leipzig.de>
Date: Mon, 20 Jul 2020 17:45:31 +0200
Subject: [PATCH] refs #17948 [fid_bbi] BARF rollback * basic BARF rollback **
 reorder header ** set colors and borders ** unset outline ** keep button
 color white when disabled ** set shards in same line like button for advanced
 search * fix notice in data-series.phtml ** check for unset title or volume *
 fix missing id in result-list of AI ** needed for evaluating ajax response,
 which item is already saved in list

---
 themes/fid_bbi/scss/compiled.scss             | 107 +++++++++++++++++-
 .../DefaultRecord/data-series.phtml           |   4 +-
 .../RecordDriver/SolrAI/result-list.phtml     |   2 +-
 .../fid_bbi/templates/search/searchbox.phtml  |  34 +++---
 4 files changed, 125 insertions(+), 22 deletions(-)

diff --git a/themes/fid_bbi/scss/compiled.scss b/themes/fid_bbi/scss/compiled.scss
index bcb508139d8..8f41ebe2c6b 100644
--- a/themes/fid_bbi/scss/compiled.scss
+++ b/themes/fid_bbi/scss/compiled.scss
@@ -193,6 +193,7 @@ body {
 
 .searchbox-tools {
   max-width: $searchboxWidth;
+  padding-bottom: 15px;
 }
 
 // Search Box on home page
@@ -321,7 +322,7 @@ input.searchFormKeepFilters {
 
 // Breadcrumbs
 .breadcrumb {
-  padding-top: 23px;
+  padding-top: 20px;
 
   > li + li::before {
     color: $white;
@@ -754,4 +755,106 @@ tr.hline {
   margin-top: 4rem;
 }
 
-// BROWSE items display - END
\ No newline at end of file
+// BROWSE items display - END
+
+// Temporary Reset of finc hover/focus states
+.btn-primary:hover,
+.btn-primary:focus {
+  background-color: #012020;
+  color: #fff;
+}
+
+select:hover {
+  outline: none;
+}
+
+input[type="checkbox"]:focus,
+input[type="checkbox"]:hover,
+input[type="radio"]:focus,
+input[type="radio"]:hover {
+  outline: none;
+}
+
+header input[type="text"]:hover,
+#searchForm input[type="text"]:hover {
+  box-shadow: none;
+  outline: none;
+}
+
+#searchForm input:hover,
+#searchForm input:focus {
+  border: 0;
+  outline: none;
+}
+
+input[type="text"]:hover {
+  outline: none;
+}
+
+.facet-group:not(.active-filters) .title:hover,
+.facet-group:not(.active-filters) .title:focus {
+  outline: none;
+  background-color: transparent;
+}
+
+.language .dropdown-menu li a,
+.language .dropdown-menu-parent li a {
+  color: #333;
+}
+.banner.navbar {
+  h1 {
+    display: contents;
+  }
+}
+
+.template-name-results .breadcrumbs {
+  margin-top: 15px;
+
+  @media screen and (min-width: $screen-sm-min) {
+    margin-top: 15px;
+  }
+
+  @media screen and (min-width: $screen-lg-min) {
+    margin-top: 20px;
+  }
+}
+
+.template-name-advanced .breadcrumbs {
+  margin-top: -38px;
+
+  @media screen and (min-width: $screen-sm-min) {
+    margin-top: 30px;
+  }
+}
+
+.template-name-results {
+  .navbar-form {
+    margin-bottom: 15px;
+
+    @media screen and (min-width: $screen-lg-min) {
+      margin-bottom: 20px;
+    }
+  }
+}
+
+input[type='text'] header, #searchForm input[type='text'] {
+  border: 1px solid $btn-default-border;
+}
+
+.btn-primary[disabled="disabled"],
+.nav a[disabled="disabled"].btn.btn-primary:hover,
+.nav .channel [disabled="disabled"].btn.btn-primary.channel-record.is-selected,
+.channel .nav [disabled="disabled"].btn.btn-primary.channel-record.is-selected,
+.nav .channel [disabled="disabled"].btn-primary.channel-record.is-selected.search-filter-toggle,
+.channel .nav [disabled="disabled"].btn-primary.channel-record.is-selected.search-filter-toggle,
+.nav a[disabled="disabled"].btn-primary.search-filter-toggle:hover, .btn-primary.active[disabled="disabled"],
+.nav a.active[disabled="disabled"].btn.btn-primary:hover,
+.nav .channel .active[disabled="disabled"].btn.btn-primary.channel-record.is-selected,
+.channel .nav .active[disabled="disabled"].btn.btn-primary.channel-record.is-selected,
+.nav .channel .active[disabled="disabled"].btn-primary.channel-record.is-selected.search-filter-toggle,
+.channel .nav .active[disabled="disabled"].btn-primary.channel-record.is-selected.search-filter-toggle,
+.nav a.active[disabled="disabled"].btn-primary.search-filter-toggle:hover {
+  color: $white;
+}
+
+// Temporary Reset of finc hover/focus states - END
\ No newline at end of file
diff --git a/themes/fid_bbi/templates/RecordDriver/DefaultRecord/data-series.phtml b/themes/fid_bbi/templates/RecordDriver/DefaultRecord/data-series.phtml
index 30e692f056c..2da1a596649 100644
--- a/themes/fid_bbi/templates/RecordDriver/DefaultRecord/data-series.phtml
+++ b/themes/fid_bbi/templates/RecordDriver/DefaultRecord/data-series.phtml
@@ -1,5 +1,5 @@
 <!-- fid_bbi: RecordDriver - DefaultRecord - data-series -->
-<?php if (!empty($array = $data['title'])): ?>
+<?php if (!empty($array = $data['title'] ?? [])): ?>
 <a href="<?=$this->record($this->driver)->getLink('series', $v = array_shift($array))?>"><?=$this->escapeHtml($v)?></a>
 <?php foreach ($array as $v): ?>
   <?php /* Depending on the record driver, $field may either be an array with
@@ -8,7 +8,7 @@
   <?=" : "?><a href="<?=$this->record($this->driver)->getLink('series', $v)?>"><?=$this->escapeHtml($v)?></a>
 <?php endforeach; ?>
 <?php endif; ?>
-<?php if(!empty($data['volume'])): ?>
+<?php if (!empty($data['volume'] ?? [])): ?>
 <?=' ; ' . $data['volume']?>
 <?php endif; ?>
 <!-- fid_bbi: RecordDriver - DefaultRecord - data-series - END -->
diff --git a/themes/fid_bbi/templates/RecordDriver/SolrAI/result-list.phtml b/themes/fid_bbi/templates/RecordDriver/SolrAI/result-list.phtml
index df0f7d06409..d59a424a63b 100644
--- a/themes/fid_bbi/templates/RecordDriver/SolrAI/result-list.phtml
+++ b/themes/fid_bbi/templates/RecordDriver/SolrAI/result-list.phtml
@@ -241,7 +241,7 @@ if ($cover):
         <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?>
         <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>"
            title="<?=$this->transEsc('Add to favorites')?>">
-          <i class="result-link-icon fa fa-fw fa-star fa-2x" aria-hidden="true"></i> <span class="sr-only"> <?=$this->transEsc('Add to favorites')?></span>
+          <i id="fav-icon<?=$this->driver->getUniqueId()?>" class="result-link-icon fa fa-fw fa-star fa-2x" aria-hidden="true"></i> <span class="sr-only"> <?=$this->transEsc('Add to favorites')?></span>
         </a><br/>
       <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?>
         <?=$block?>
diff --git a/themes/fid_bbi/templates/search/searchbox.phtml b/themes/fid_bbi/templates/search/searchbox.phtml
index 68354b4b977..3f76b21c989 100644
--- a/themes/fid_bbi/templates/search/searchbox.phtml
+++ b/themes/fid_bbi/templates/search/searchbox.phtml
@@ -112,24 +112,24 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s
               <a href="<?=$this->url($advSearch) . ((isset($this->searchId) && $this->searchId) ? '?edit=' . $this->escapeHtmlAttr($this->searchId) : $hiddenFilterParams)?>" class="btn btn-primary" role="button" rel="nofollow"><i class="fa fa-cog"></i> <span class="hidden-xs hidden-sm hidden-md"><?=$this->transEsc("Advanced")?></span></a>
           </div>
       <?php endif; ?>
+        <?php /* finc: We hide this for small and keep the solution using labels, same below - CK */ ?>
+        <div class="flex-checkbox hidden-xs">
+          <?php $shards = $options->getShards();
+            if ($options->showShardCheckboxes() && !empty($shards)): ?>
+              <?php
+              $selectedShards = isset($this->selectedShards)
+                ? $this->selectedShards : $options->getDefaultSelectedShards();
+              ?>
+              <?php foreach ($shards as $shard => $val): ?>
+                <?php $isSelected = empty($selectedShards) || in_array($shard, $selectedShards); ?>
+                <label for="checkbox_<?=$this->escapeHtmlAttr($shard)?>"><?=$this->transEsc($shard)?>
+                  <input type="checkbox" <?=$isSelected ? 'checked="checked" ' : ''?>name="shard[]" value='<?=$this->escapeHtmlAttr($shard)?>' id='checkbox_<?=$this->escapeHtmlAttr($shard)?>'
+                         class="shards-checkbox"/>
+                </label>
+              <?php endforeach; ?>
+            <?php endif; ?>
+        </div>
       </div>
-    <?php /* finc: We hide this for small and keep the solution using labels, same below - CK */ ?>
-    <div class="flex-checkbox hidden-xs">
-      <?php $shards = $options->getShards();
-      if ($options->showShardCheckboxes() && !empty($shards)): ?>
-        <?php
-        $selectedShards = isset($this->selectedShards)
-          ? $this->selectedShards : $options->getDefaultSelectedShards();
-        ?>
-        <?php foreach ($shards as $shard => $val): ?>
-          <?php $isSelected = empty($selectedShards) || in_array($shard, $selectedShards); ?>
-          <label for="checkbox_<?=$this->escapeHtmlAttr($shard)?>"><?=$this->transEsc($shard)?>
-            <input type="checkbox" <?=$isSelected ? 'checked="checked" ' : ''?>name="shard[]" value='<?=$this->escapeHtmlAttr($shard)?>' id='checkbox_<?=$this->escapeHtmlAttr($shard)?>'
-                   class="shards-checkbox"/>
-          </label>
-        <?php endforeach; ?>
-      <?php endif; ?>
-    </div>
     <?php
     /* Show hidden field for active search class when in combined handler mode. */
     if ($this->searchbox()->combinedHandlersActive()) {
-- 
GitLab