Skip to content

Commit 20ba986

Browse files
committed
LP#2107599: (follow-up) use the show_cover parameters correctly
The "show_cover" Template Toolkit block requires that the bib ID be passed as "row_rec_id"; otherwise, the link from the cover image will be broken in (e.g.) the OPAC My Account holds table. This patch also adds comments documenting show_cover's parameters. Signed-off-by: Galen Charlton <[email protected]>
1 parent 9d8d91a commit 20ba986

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,11 @@
942942
[% END -%]
943943
[% END -%]
944944

945+
# Displays a cover image with a link to the bib record. Parameters are
946+
#
947+
# * row_isbnissn (ISBN/ISSN; needed only if using Obalkyknih)
948+
# * row_rec_id (bib ID of the title; mandatory)
949+
#
945950
[%- BLOCK show_cover -%]
946951
<td role="cell">
947952
[% IF obalkyknih_cz.enabled == 'true' %]
@@ -950,8 +955,7 @@
950955
END %]
951956
<a href='http://obalkyknih.cz/view?isbn=[% row_isbnissn %]'>
952957
[% ELSE %]
953-
<a href="[% mkurl(ctx.opac_root _ '/record/' _
954-
circ.circ.target_copy.call_number.record.id, {}, 1) %]">
958+
<a href="[% mkurl(ctx.opac_root _ '/record/' _ row_rec_id, {}, 1) %]">
955959
[% END %]
956960
<img alt="" class='my-2' style="max-width:70px;"
957961
src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/r/[% row_rec_id | uri %]'/>

0 commit comments

Comments
 (0)