From 8b8ab97498fbbd872306cc1319a414d0a27fdc51 Mon Sep 17 00:00:00 2001
From: Katrin Fischer <katrin.fischer.83@web.de>
Date: Tue, 14 Apr 2020 13:14:37 +0000
Subject: [PATCH] Bug 21211: Add patron toolbar to suggestions, discharges and
 ill requests tabs

When paging through the patron account in staff, using the tabs on
the right, you notice that some pages are missing the patron toolbar
on top and that the headings, where they exist, vary in size.

This patch adds the patron toolbar to 3 more tabs and changes headings
to h1 to be consistent with older tabs. It has also been suggested on
another tab that this is preferrable for screen readers.

Note: Modification log was left out for now, as this is also used in tools.

To test:
- Activate ILL (ILLModule pref)
- Activate discharges (UseDischarge pref)
- Go to any patron account, tab through the tabs...
- Verify that discharge, purchase suggestions and ill requests are
  missing the toolbar
- Apply patch
- Verify that the toolbar now appears on these pages and works
  correctly
- Also veriy that the headings are now consistently h1 on all pages
---
 koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt        | 6 ++++--
 koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt     | 5 ++++-
 .../intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt   | 3 ++-
 koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt       | 2 +-
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt
index b832fdf597..692e4942f4 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt
@@ -23,11 +23,13 @@
         <div class="col-sm-10 col-sm-push-2">
             <main>
 
-<h3>Discharge</h3>
+[% INCLUDE 'members-toolbar.inc' %]
+
+<h1>Discharge</h1>
 [% FOR message IN messages %]
     <div class="dialog [% message.type | html %]">
     [% IF message.code == "unable_to_generate_pdf" %]
-        An error occurs when generating the pdf file.
+        An error occurs when generating the PDF file.
         Please contact the administrator to resolve this problem.
     [% END %]
     </div>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt
index 79529841d8..4a97d4570e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt
@@ -27,7 +27,8 @@
     <div class="row">
         <div class="col-sm-10 col-sm-push-2">
             <main>
-                <h2>ILL requests history</h2>
+                [% INCLUDE 'members-toolbar.inc' %]
+                <h1>ILL requests history</h1>
                 [% INCLUDE 'ill-list-table.inc' %]
             </main>
         </div> <!-- .col-sm-10.col-sm-push-2 -->
@@ -40,6 +41,8 @@
     </div> <!-- .row -->
 
     [% MACRO jsinclude BLOCK %]
+        [% INCLUDE 'str/members-menu.inc' %]
+        [% Asset.js("js/members-menu.js") | $raw %]
         [% INCLUDE 'datatables.inc' %]
         [% INCLUDE 'columns_settings.inc' %]
         [% INCLUDE 'calendar.inc' %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt
index e5f203c8f3..132f5dccd0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt
@@ -25,7 +25,8 @@
         <div class="col-sm-10 col-sm-push-2">
             <main>
 
-                <h2>Purchase suggestions</h2>
+                [% INCLUDE 'members-toolbar.inc' %]
+                <h1>Purchase suggestions</h1>
 
                 <div id="toolbar" class="btn-toolbar">
                     <a class="btn btn-default" id="newsuggestion" href="/cgi-bin/koha/suggestion/suggestion.pl?op=add&amp;suggestedby=[% patron.borrowernumber | html %]&amp;redirect=purchase_suggestions&amp;borrowernumber=[% patron.borrowernumber | html %]"><i class="fa fa-plus"></i> New purchase suggestion</a>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt
index 248714b01c..c53a0ae07a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt
@@ -30,7 +30,7 @@
 
         [% INCLUDE 'members-toolbar.inc' %]
 
-            <h3>Statistics for [% INCLUDE 'patron-title.inc' %]</h3>
+            <h1>Statistics for [% INCLUDE 'patron-title.inc' %]</h1>
             [% IF ( datas.size ) %]
                 <table id="statistics">
                 <thead>
-- 
2.11.0