From 83a3e819b49625059a05de3f1265433fdd3abd04 Mon Sep 17 00:00:00 2001
From: Alexander Purr <purr@ub.uni-leipzig.de>
Date: Fri, 25 Oct 2019 17:29:44 +0200
Subject: [PATCH] refs #16190 [fid_adlr] offcanvas-toggler styling & templates

* use and adjust styles from facet offcanvas-toggler
* edit back button in menu.phtml
* add icon to offcanvas-toggler-myresearch.phtml
* add translations
---
 themes/fid_adlr/languages/de.ini                  |  1 +
 themes/fid_adlr/languages/en.ini                  |  1 +
 themes/fid_adlr/scss/compiled.scss                | 15 +++++++++++----
 .../offcanvas-toggler-myresearch.phtml            |  9 +++++++++
 themes/fid_adlr/templates/myresearch/menu.phtml   |  3 ++-
 .../fid_adlr/templates/myresearch/profile.phtml   |  2 ++
 6 files changed, 26 insertions(+), 5 deletions(-)
 create mode 100644 themes/fid_adlr/templates/RecordDriver/DefaultRecord/offcanvas-toggler-myresearch.phtml

diff --git a/themes/fid_adlr/languages/de.ini b/themes/fid_adlr/languages/de.ini
index bfe56449f12..a32d0ae784f 100644
--- a/themes/fid_adlr/languages/de.ini
+++ b/themes/fid_adlr/languages/de.ini
@@ -2,6 +2,7 @@ Your Profile = Mein Nutzerkonto
 Forgot Password = Passwort vergessen?
 Services for subject specialists = Service für Fachreferate
 Username = E-Mail-Adresse
+offcanvas-toggler-myresearch = "Profilmenü einblenden"
 
 ; Branding for Source Ids (result list)
 Branding Facet Free = Open Access
diff --git a/themes/fid_adlr/languages/en.ini b/themes/fid_adlr/languages/en.ini
index 853104c2de2..80b66993a54 100644
--- a/themes/fid_adlr/languages/en.ini
+++ b/themes/fid_adlr/languages/en.ini
@@ -2,6 +2,7 @@ Your Profile = My account
 Forgot Password = Forgot your password?
 Services for subject specialists = Services for Subject Specialists
 Username = Email address
+offcanvas-toggler-myresearch = "Show profile options"
 
 ; Branding for Source Ids (result list)
 Branding Facet Free = Open Access
diff --git a/themes/fid_adlr/scss/compiled.scss b/themes/fid_adlr/scss/compiled.scss
index 47ba8e3c038..38bb8e5bae5 100644
--- a/themes/fid_adlr/scss/compiled.scss
+++ b/themes/fid_adlr/scss/compiled.scss
@@ -1374,10 +1374,9 @@ input.searchForm_lookfor {
   width: $search-panel-width-xs-md;
 }
 
-.search-stats {
-  .offcanvas-toogler {
-    float: none;
-  }
+.offcanvas-toggler {
+  float: none;
+
   .search-filter-toggle {
     @include result-list-border($black);
     background-color: $white;
@@ -1389,10 +1388,18 @@ input.searchForm_lookfor {
       content: none;
     }
 
+    &:hover {
+      background-color: $white;
+    }
+
     i {
       margin: 5px;
     }
   }
+
+  .btn-primary {
+    color: $black;
+  }
 }
 
 .search-controls {
diff --git a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/offcanvas-toggler-myresearch.phtml b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/offcanvas-toggler-myresearch.phtml
new file mode 100644
index 00000000000..28c67511209
--- /dev/null
+++ b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/offcanvas-toggler-myresearch.phtml
@@ -0,0 +1,9 @@
+<!-- fid_adlr: RecordDriver - DefaultRecord - offcanvas-toggler-myresearch -->
+<?php ?>
+<span class="offcanvas-toggler">
+  <button class="search-filter-toggle btn btn-primary visible-xs" href="#search-sidebar" data-toggle="offcanvas" title="<?=$this->transEsc('sidebar_expand')?>">
+    <?=$this->transEsc('offcanvas-toggler-myresearch')?>
+    <i class="icon icon-plus right" aria-hidden="true"></i>
+  </button>
+</span>
+<!-- fid_adlr: RecordDriver - DefaultRecord - offcanvas-toggler-myresearch - END -->
diff --git a/themes/fid_adlr/templates/myresearch/menu.phtml b/themes/fid_adlr/templates/myresearch/menu.phtml
index 30b2667c0da..8d8c0d258e2 100644
--- a/themes/fid_adlr/templates/myresearch/menu.phtml
+++ b/themes/fid_adlr/templates/myresearch/menu.phtml
@@ -15,7 +15,8 @@
   $user = $this->auth()->isLoggedIn();
 ?>
 <?php /* Offcanvas closing button missing in BS3! CK*/ ?>
-<button class="close-offcanvas btn btn-link" data-toggle="offcanvas"><?=$this->transEsc('navigate_back') ?></button>
+<button class="close-offcanvas btn btn-link right" data-toggle="offcanvas"><i class="icon icon-close icon-2x"></i></button>
+<div class="clearfix"></div>
 
 <?php if (!empty($user)): ?>
   <h4><?=$this->transEsc('Your Account')?></h4>
diff --git a/themes/fid_adlr/templates/myresearch/profile.phtml b/themes/fid_adlr/templates/myresearch/profile.phtml
index b6365decbd8..c3d386e5fb8 100644
--- a/themes/fid_adlr/templates/myresearch/profile.phtml
+++ b/themes/fid_adlr/templates/myresearch/profile.phtml
@@ -21,6 +21,8 @@ if (is_array($profile)) {
 ?>
 
 <div class="<?=$this->layoutClass('mainbody')?>">
+  <?php /* finc V5: adds offcanvas-toggler missing in VF5, compare with finc/fid themes during update - CK */ ?>
+  <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler-myresearch'); ?>
   <h2><?=$this->transEsc('Your Profile')?></h2>
   <?=$this->flashmessages();?>
   <?php if (is_array($this->profile)): ?>
-- 
GitLab