From 1eed9a6a0d2d4ee2247622b843fa6dc3f790d789 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Mon, 4 Jan 2021 14:14:13 -0500 Subject: [PATCH] LP1906855 Show Covers in My Account Adds covers to current circs, circ history, current holds, holds history tables. Signed-off-by: Terran McCanna Signed-off-by: Garry Collum --- .../opac/css/mediaQuery.css.tt2 | 56 ++++++++++++---------- .../opac/myopac/circ_history.tt2 | 30 ++++++++++++ .../src/templates-bootstrap/opac/myopac/circs.tt2 | 29 +++++++++++ .../opac/myopac/hold_history.tt2 | 26 ++++++++++ .../src/templates-bootstrap/opac/myopac/holds.tt2 | 27 +++++++++++ 5 files changed, 142 insertions(+), 26 deletions(-) diff --git a/Open-ILS/src/templates-bootstrap/opac/css/mediaQuery.css.tt2 b/Open-ILS/src/templates-bootstrap/opac/css/mediaQuery.css.tt2 index 66439e7a1b..45f39e3ae5 100644 --- a/Open-ILS/src/templates-bootstrap/opac/css/mediaQuery.css.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/css/mediaQuery.css.tt2 @@ -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; } diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/circ_history.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/circ_history.tt2 index 7b6946c683..0898bb3db8 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/circ_history.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/circ_history.tt2 @@ -53,6 +53,7 @@ + [% l("Cover") %] [% sort_head("sort_title", l("Title")) %] [% sort_head("author", l("Author")) %] [% sort_head("callnum", l("Call Number")) %] @@ -129,6 +130,35 @@ + + [% IF circ.circ.target_copy.call_number.id != -1; %] + [% l('Cover Image') %] + [% 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; + %] + + [% circ.ATTRS.title _ ' Cover Image' %] + + [% ELSE %] + [% circ.ATTRS.title _ ' Cover Image' %] + + [% END %] + [% END %] + + diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/circs.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/circs.tt2 index e4b7bf6dc3..2b08e77ebf 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/circs.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/circs.tt2 @@ -45,6 +45,7 @@ onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'circ' && !inputs[i].disabled) inputs[i].checked = this.checked;}" /> + [% l("Cover") %] [% sort_head("sort_title", l("Title")) %] [% sort_head("author", l("Author")) %] [% sort_head("renews", l("Renewals Left")) %] @@ -125,6 +126,34 @@ value="[% circ.circ.id %]" /> + [% IF circ.circ.target_copy.call_number.id != -1; %] + [% l('Cover Image') %] + [% 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; + %] + + [% circ.ATTRS.title _ ' Cover Image' %] + + [% ELSE %] + [% circ.ATTRS.title _ ' Cover Image' %] + + [% END %] + [% END %] + + Title [% IF circ.circ.target_copy.call_number.id == -1 %] [% circ.circ.target_copy.dummy_title | html %] diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/hold_history.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/hold_history.tt2 index 7b08a355b6..e54c8dc0ac 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/hold_history.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/hold_history.tt2 @@ -51,6 +51,7 @@ + @@ -65,6 +66,31 @@ ahr = hold.hold.hold %] + + @@ -156,6 +157,32 @@ [% html_text_attr('title', l('Select hold [_1]', attrs.title)) %]/> +
[% l('Cover') %] [% l('Title') %] [% l('Author') %] [% l('Format') %]
+ [% l('Cover Image') %] + [%- 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; + %] + + [% attrs.title _ ' Cover Image' %] + + [% ELSE %] + + [% attrs.title _ ' Cover Image' %] + + [%- END %] + Title diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/holds.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/holds.tt2 index 2670646c63..08be278f5b 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/holds.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/holds.tt2 @@ -81,6 +81,7 @@ [% l('Cover') %] [% sort_head("sort_title", l('Title')) %] [% sort_head("author", l('Author')) %] [% sort_head("format", l('Format')) %] + [% l('Cover Image') %] + [%- 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; + %] + + [% hold.ATTRS.title _ ' Cover Image' %] + + [% ELSE %] + [% hold.ATTRS.title _ ' Cover Image' %] + + [%- END %] + Title
[% title = hold.ATTRS.title; -- 2.11.0