From 8431c8e840b8cdac5febab11cee17519684671c7 Mon Sep 17 00:00:00 2001
From: Owen Leonard <oleonard@myacpl.org>
Date: Wed, 10 Apr 2019 11:30:47 +0000
Subject: [PATCH] Bug 23286: Improve style of hold confirmation modal

This patch makes minor changes to the hold confirmation modal in the
check-in template and adds some additional style. The goal is to make
the information a little more readable.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Check in items with the following hold statuses:

 - On hold for a patron at your library
 - On hold for a patron at another library
 - On hold and already marked 'Waiting'

Confirm that the hold confirmation modal is clear and well-styled.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
---
 .../prog/css/src/staff-global.scss            | 29 ++++++++++++++++++-
 .../prog/en/modules/circ/returns.tt           | 28 +++++++++++-------
 2 files changed, 45 insertions(+), 12 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
index cef9e874c1..afabd93ec9 100644
--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
@@ -371,7 +371,34 @@ form {
 
     &.confirm {
         display: block;
-        text-align: center;
+        font-size: 110%;
+        line-height: 130%;
+
+        ul {
+            padding: 1em 0;
+
+            li {
+                list-style-type: none;
+            }
+        }
+
+        .notification_method {
+            background-color: #FFE;
+            border: 1px solid #CCC;
+            border-radius: 5px;
+            display: inline-block;
+            margin: .5em 0;
+            padding: .1em .3em;
+
+            &.none {
+                background-color: #EEE;
+            }
+        }
+
+        .hold-found-barcode {
+            display: inline-block;
+            font-size: 90%;
+        }
     }
 }
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
index 510d4b911a..bbad11b15c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
@@ -10,7 +10,7 @@
 [% SET footerjs = 1 %]
 [% BLOCK display_bormessagepref %]
     [% IF ( bormessagepref ) %]
-        <li>Patron notification:
+        <li class="notification_method">Patron notification:
             [% FOREACH mtt IN bormessagepref.keys %]
                 [%~ IF ( mtt == 'email' ) %] Email[% END ~%]
                 [%~ IF ( mtt == 'phone' ) %] Phone[% END ~%]
@@ -19,7 +19,7 @@
             [% END %]
         </li>
            [% ELSE %]
-        <li>Patron is not notified.</li>
+        <li class="notification_method none">Patron is not notified.</li>
     [% END %]
 [% END %]
 
@@ -268,9 +268,10 @@
                     <h3>
                         Hold found (item is already waiting):
                         <br/>
-                        <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
-                            [% itembarcode | html %]: [% title | html %]
-                        </a>
+                        <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% title | html %]</a>
+                        <div class="hold-found-barcode">
+                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]">[% itembarcode | html %]</a>
+                        </div>
                     </h3>
                 </div>
 
@@ -481,18 +482,23 @@
                     <h3>
                         Hold found:
                         <br/>
-                        <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
-                            [% itembarcode | html %]: [% title | html %]
-                        </a>
+                        <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% title | html %]</a>
+                        <div class="hold-found-barcode">
+                            (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | html %]">[% itembarcode | html %]</a>)
+                        </div>
+                    </h3>
                 </div>
 
                 <div class="modal-body">
                     [% IF ( reservenotes ) %]
-                        <h4>Notes: [% reservenotes | html %]</h4>
+                        <h4>Notes:</h4>
+                        <p>[% reservenotes | html %]</p>
+                        <hr />
                     [% END %]
                     <h5>Hold for:</h5>
+                        <ul>
                         <li>
-                            <td>[% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]</td>
+                            [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]
                             <span class="patron-category"> - [% patron.category.description | html %]</span>
                         </li>
 
@@ -523,7 +529,7 @@
                         [% IF ( patron.gonenoaddress ) %]
                             <li class="error">Patron's address is in doubt</li>
                         [% END %]
-
+                        </ul>
                     [% IF ( transfertodo ) %]
                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
                     [% ELSE %]
-- 
2.20.1 (Apple Git-117)