LP1906855 Show Covers in My Account
authorTerran McCanna <tmccanna@georgialibraries.org>
Mon, 4 Jan 2021 19:14:13 +0000 (14:14 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 5 Jan 2021 12:25:56 +0000 (07:25 -0500)
Adds covers to current circs, circ history, current holds,
holds history tables.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Garry Collum <gcollum@gmail.com>
Open-ILS/src/templates-bootstrap/opac/css/mediaQuery.css.tt2
Open-ILS/src/templates-bootstrap/opac/myopac/circ_history.tt2
Open-ILS/src/templates-bootstrap/opac/myopac/circs.tt2
Open-ILS/src/templates-bootstrap/opac/myopac/hold_history.tt2
Open-ILS/src/templates-bootstrap/opac/myopac/holds.tt2

index 66439e7..45f39e3 100644 (file)
@@ -99,19 +99,21 @@ only screen and (max-width: 650px)  {
     .chargesMainTable td:nth-of-type(7):before { content: "Returned/Renewed"; display: flex;}
 
     .activeHoldstable td:nth-of-type(1):before { content: "Select"; display: flex; }
-    .activeHoldstable td:nth-of-type(2):before { content: "Title"; display: flex; }
-    .activeHoldstable td:nth-of-type(3):before { content: "Author"; display: flex;}
-    .activeHoldstable td:nth-of-type(4):before { content: "Format"; display: flex;}
-    .activeHoldstable td:nth-of-type(5):before { content: "Pickup Location"; display: flex;}
-    .activeHoldstable td:nth-of-type(6):before { content: "Cancel If Not Filled By"; display: flex;}
-    .activeHoldstable td:nth-of-type(7):before { content: "Status"; display: flex;}
-    .activeHoldstable td:nth-of-type(8):before { content: "Notes"; display: flex;}
-
-    .holdHistoryTable td:nth-of-type(1):before { content: "Title"; display: flex; }
-    .holdHistoryTable td:nth-of-type(2):before { content: "Author"; display: flex; }
-    .holdHistoryTable td:nth-of-type(3):before { content: "Format"; display: flex; }
-    .holdHistoryTable td:nth-of-type(4):before { content: "Pickup Location"; display: flex; }
-    .holdHistoryTable td:nth-of-type(5):before { content: "Status"; display: flex; }
+    .activeHoldstable td:nth-of-type(2):before { content: "Cover"; display: flex; }
+    .activeHoldstable td:nth-of-type(3):before { content: "Title"; display: flex; }
+    .activeHoldstable td:nth-of-type(4):before { content: "Author"; display: flex;}
+    .activeHoldstable td:nth-of-type(5):before { content: "Format"; display: flex;}
+    .activeHoldstable td:nth-of-type(6):before { content: "Pickup Location"; display: flex;}
+    .activeHoldstable td:nth-of-type(7):before { content: "Cancel If Not Filled By"; display: flex;}
+    .activeHoldstable td:nth-of-type(8):before { content: "Status"; display: flex;}
+    .activeHoldstable td:nth-of-type(9):before { content: "Notes"; display: flex;}
+
+    .holdHistoryTable td:nth-of-type(1):before { content: "Cover"; display: flex; }
+    .holdHistoryTable td:nth-of-type(2):before { content: "Title"; display: flex; }
+    .holdHistoryTable td:nth-of-type(3):before { content: "Author"; display: flex; }
+    .holdHistoryTable td:nth-of-type(4):before { content: "Format"; display: flex; }
+    .holdHistoryTable td:nth-of-type(5):before { content: "Pickup Location"; display: flex; }
+    .holdHistoryTable td:nth-of-type(6):before { content: "Status"; display: flex; }
 
     .paymentTable td:nth-of-type(1):before { content: "Payment Date"; display: flex; }
     .paymentTable td:nth-of-type(2):before { content: "Payment For"; display: flex; }
@@ -125,21 +127,23 @@ only screen and (max-width: 650px)  {
     .messagesTable td:nth-of-type(5):before { content: ""; display: flex; }
 
     .circTable td:nth-of-type(1):before { content: "Select"; display: flex; }
-    .circTable td:nth-of-type(2):before { content: "Title"; display: flex; }
-    .circTable td:nth-of-type(3):before { content: "Author"; display: flex; }
-    .circTable td:nth-of-type(4):before { content: "Renewals Left"; display: flex; }
-    .circTable td:nth-of-type(5):before { content: "Due Date"; display: flex; }
-    .circTable td:nth-of-type(6):before { content: "Barcode"; display: flex; }
-    .circTable td:nth-of-type(7):before { content: "Call Number"; display: flex; }
+    .circTable td:nth-of-type(2):before { content: "Cover TEST"; display: flex; }
+    .circTable td:nth-of-type(3):before { content: "Title"; display: flex; }
+    .circTable td:nth-of-type(4):before { content: "Author"; display: flex; }
+    .circTable td:nth-of-type(5):before { content: "Renewals Left"; display: flex; }
+    .circTable td:nth-of-type(6):before { content: "Due Date"; display: flex; }
+    .circTable td:nth-of-type(7):before { content: "Barcode"; display: flex; }
+    .circTable td:nth-of-type(8):before { content: "Call Number"; display: flex; }
 
     .circHistTable td:nth-of-type(1):before { content: "Select"; display: flex; }
-    .circHistTable td:nth-of-type(2):before { content: "Title"; display: flex; }
-    .circHistTable td:nth-of-type(3):before { content: "Author"; display: flex; }
-    .circHistTable td:nth-of-type(4):before { content: "Checkout Date"; display: flex; }
-    .circHistTable td:nth-of-type(5):before { content: "Due Date"; display: flex; }
-    .circHistTable td:nth-of-type(6):before { content: "Date Returned"; display: flex; }
-    .circHistTable td:nth-of-type(7):before { content: "Barcode"; display: flex; }
-    .circHistTable td:nth-of-type(8):before { content: "Call Number"; display: flex; }
+    .circHistTable td:nth-of-type(2):before { content: "Cover"; display: flex; }
+    .circHistTable td:nth-of-type(3):before { content: "Title"; display: flex; }
+    .circHistTable td:nth-of-type(4):before { content: "Author"; display: flex; }
+    .circHistTable td:nth-of-type(5):before { content: "Checkout Date"; display: flex; }
+    .circHistTable td:nth-of-type(6):before { content: "Due Date"; display: flex; }
+    .circHistTable td:nth-of-type(7):before { content: "Date Returned"; display: flex; }
+    .circHistTable td:nth-of-type(8):before { content: "Barcode"; display: flex; }
+    .circHistTable td:nth-of-type(9):before { content: "Call Number"; display: flex; }
 
     .bookbagTable td:nth-of-type(1):before { content: ""; display: flex; }
     .bookbagTable td:nth-of-type(2):before { content: "Title"; display: flex; }
index 7b6946c..0898bb3 100755 (executable)
@@ -53,6 +53,7 @@
                     <td class="checkCell">
                         <input type="checkbox" onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'circ_id' && !inputs[i].disabled) inputs[i].checked = this.checked;}" aria-label="[% l('Click to (un)select all items') %]"/>
                     </td>
+                    <th>[% l("Cover") %]</th>
                     <th>[% sort_head("sort_title", l("Title")) %]</th>
                     <th>[% sort_head("author", l("Author")) %]</th>
                     <th>[% sort_head("callnum", l("Call Number")) %]</th>
             <td class="checkbox_column">
                 <input type="checkbox" name="circ_id" value="[% circ.circ.id %]" aria-label="Select Item"/>
             </td>
+                                                <td>
+                        [% IF circ.circ.target_copy.call_number.id != -1; %]
+                            <span class="sr-only">[% l('Cover Image') %]</span>
+                            [% IF obalkyknih_cz.enabled == 'true' %]
+                                [%-
+                                isbnissn = '';
+                                IF circ.ATTRS.isbns.0;
+                                isbnissn = circ.ATTRS.isbns.0;
+                                IF (matches = isbnissn.match('^(.+?)(\s.+)$'));
+                                isbnissn = matches.0;
+                                END;
+                                END;
+                                IF circ.ATTRS.issns.0;
+                                isbnissn=circ.ATTRS.issns.0;
+                                END;
+                                %]
+                                <a href='http://obalkyknih.cz/view?isbn=[% isbnissn %]'>
+                                    <img alt="[% circ.ATTRS.title _ ' Cover Image' %]" class='my-2' style="max-width:70px;"
+                                        src='[% ctx.media_prefix %]/opac/extras/ac/medium/[% record.summary.jacket_size %]/r/[% circ.circ.target_copy.call_number.record.id | uri %]' />
+                                </a>
+                            [% ELSE %]
+                                <a href='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/r/[% circ.circ.target_copy.call_number.record.id | uri %]'><img
+                                        alt="[% circ.ATTRS.title _ ' Cover Image' %]" class='my-2' style="max-width:70px;"
+                                        src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/r/[% circ.circ.target_copy.call_number.record.id | uri %]' />
+                                </a>
+                            [% END %]
+                        [% END %]
+                        </td>
+
                         <td>
                             <a href="[% mkurl(ctx.opac_root _ '/record/' _
                                 circ.circ.target_copy.call_number.record.id, {}, 1) %]">
index e4b7bf6..2b08e77 100755 (executable)
@@ -45,6 +45,7 @@
                         onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'circ' &amp;&amp; !inputs[i].disabled) inputs[i].checked = this.checked;}"
                     />
                 </td>
+                <th>[% l("Cover") %]</th>
                 <th>[% sort_head("sort_title", l("Title")) %]</th>
                 <th>[% sort_head("author", l("Author")) %]</th>
                 <th>[% sort_head("renews", l("Renewals Left")) %] <a href="#" title="" data-toggle="tooltip" data-original-title="[% l('You will be unable to renew items if other patrons have holds on them, if your account is expired, or if you have more than $10.00 in fines and fees.') %]"><i class="fas fa-question-circle" aria-hidden="true"></i></a></th>
                                 value="[% circ.circ.id %]" />
                         </td>
                         <td>
+                        [% IF circ.circ.target_copy.call_number.id != -1; %]
+                            <span class="sr-only">[% l('Cover Image') %]</span>
+                            [% IF obalkyknih_cz.enabled == 'true' %]
+                                [%-
+                                isbnissn = '';
+                                IF circ.ATTRS.isbns.0;
+                                isbnissn = circ.ATTRS.isbns.0;
+                                IF (matches = isbnissn.match('^(.+?)(\s.+)$'));
+                                isbnissn = matches.0;
+                                END;
+                                END;
+                                IF circ.ATTRS.issns.0;
+                                isbnissn=circ.ATTRS.issns.0;
+                                END;
+                                %]
+                                <a href='http://obalkyknih.cz/view?isbn=[% isbnissn %]'>
+                                    <img alt="[% circ.ATTRS.title _ ' Cover Image' %]" class='my-2' style="max-width:70px;"
+                                        src='[% ctx.media_prefix %]/opac/extras/ac/medium/[% record.summary.jacket_size %]/r/[% circ.circ.target_copy.call_number.record.id | uri %]' />
+                                </a>
+                            [% ELSE %]
+                                <a href='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/r/[% circ.circ.target_copy.call_number.record.id | uri %]'><img
+                                        alt="[% circ.ATTRS.title _ ' Cover Image' %]" class='my-2' style="max-width:70px;"
+                                        src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/r/[% circ.circ.target_copy.call_number.record.id | uri %]' />
+                                </a>
+                            [% END %]
+                        [% END %]
+                        </td>
+                        <td>
                             <span class="sr-only">Title</span>
                             [% IF circ.circ.target_copy.call_number.id == -1 %]
                                 [% circ.circ.target_copy.dummy_title | html %]
index 7b08a35..e54c8dc 100755 (executable)
@@ -51,6 +51,7 @@
         <table id='acct_holds_hist_header' class='table table-hover table-bordered miniTable holdHistoryTable' title="[% l('History of items on hold') %]">
             <thead>
                 <tr>
+                    <th>[% l('Cover') %]</th>
                     <th><span>[% l('Title') %]</span></th>
                     <th><span>[% l('Author') %]</span></th>
                     <th> <span>[% l('Format') %]</span></th>
                     ahr = hold.hold.hold %]
 
                 <tr>
+                    <td>
+                        <span class="sr-only">[% l('Cover Image') %]</span>
+                        [%- IF obalkyknih_cz.enabled == 'true' %]
+                            [%- isbnissn = '';
+                            IF attrs.isbns.0;
+                                isbnissn = attrs.isbns.0;
+                                IF (matches = isbnissn.match('^(.+?)(\s.+)$'));
+                                isbnissn = matches.0;
+                                END;
+                            END;
+                            IF attrs.issns.0;
+                                isbnissn=attrs.issns.0;
+                            END;
+                            %]
+                            <a href='http://obalkyknih.cz/view?isbn=[% isbnissn %]'>
+                                <img alt="[% attrs.title _ ' Cover Image' %]" class='my-2' style="max-width:70px;"
+                                src='[% ctx.media_prefix %]/opac/extras/ac/medium/[% record.summary.jacket_size %]/r/[% hold.hold.bre_id | uri %]' />
+                            </a>
+                        [% ELSE %]
+                            <a href='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/r/[% hold.hold.bre_id | uri %]'>
+                                <img alt="[% attrs.title _ ' Cover Image' %]" class='my-2' style="max-width:70px;"
+                                src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/r/[% hold.hold.bre_id | uri %]' />
+                            </a>
+                        [%- END %]
+                    </td>
 
                     <td>
                     <span class="sr-only">Title</span>
index 2670646..08be278 100755 (executable)
@@ -81,6 +81,7 @@
                     <input type="checkbox" aria-label="[% l('Select All Holds') %]"
                       onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'hold_id' &amp;&amp; !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
                 </td>
+                <th>[% l('Cover') %]</th>
                 <th>[% sort_head("sort_title", l('Title')) %]</th>
                 <th>[% sort_head("author", l('Author')) %]</th>
                 <th>[% sort_head("format", l('Format')) %]</th>
                             [% html_text_attr('title', l('Select hold [_1]', attrs.title)) %]/>
                     </td>
                     <td>
+                        <span class="sr-only">[% l('Cover Image') %]</span>
+                        [%- IF obalkyknih_cz.enabled == 'true' %]
+                            [%-
+                            isbnissn = '';
+                            IF hold.ATTRS.isbns.0;
+                            isbnissn = hold.ATTRS.isbns.0;
+                            IF (matches = isbnissn.match('^(.+?)(\s.+)$'));
+                            isbnissn = matches.0;
+                            END;
+                            END;
+                            IF hold.ATTRS.issns.0;
+                            isbnissn=hold.ATTRS.issns.0;
+                            END;
+                            %]
+                            <a href='http://obalkyknih.cz/view?isbn=[% isbnissn %]'>
+                                <img alt="[% hold.ATTRS.title _ ' Cover Image' %]" class='my-2' style="max-width:70px;"
+                                    src='[% ctx.media_prefix %]/opac/extras/ac/medium/[% record.summary.jacket_size %]/r/[% hold.hold.bre_id | uri %]' />
+                            </a>
+                        [% ELSE %]
+                            <a href='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/r/[% hold.hold.bre_id | uri %]'><img
+                                    alt="[% hold.ATTRS.title _ ' Cover Image' %]" class='my-2' style="max-width:70px;"
+                                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/r/[% hold.hold.bre_id | uri %]' />
+                            </a>
+                        [%- END %]
+                    </td>
+                    <td>
                     <span class="sr-only">Title</span>
                         <div>
                             [% title = hold.ATTRS.title;