Owen Leonard
3bd3ec4805
This patch modifies the biblio-title include so that it can be used to link to the bibliographic record using the default biblio view. On pages where the biblio-title include was wrapped in an anchor tag, a link parameter is added: [% INCLUDE 'biblio-title.inc' link=> 1 %] To test, apply the patch and view the following pages in the OPAC to confirm that titles are displayed correctly and that the link to the bibliographic record is correct: - Log in to the OPAC: On the "your summary" page, check checkouts, overdues, holds, and article requests. - Check the "your holds history" page. - Locate a bibliographic record and click "Save to your lists." In the popup, the title should be displayed correctly without a link. - Place a hold, and check the hold confirmation page. - Check the "Recent comments" page. - Locate a record which has a local cover image attached, and view the image. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
189 lines
13 KiB
Text
189 lines
13 KiB
Text
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% USE AdditionalContents %]
|
|
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
|
|
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Recent comments › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %][% END %]
|
|
<link rel="alternate" type="application/rss+xml" title="[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog recent comments" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-showreviews.pl?format=rss" />
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='opac-showreviews' bodyclass='scrollto' %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div class="main">
|
|
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="/cgi-bin/koha/opac-main.pl">Home</a>
|
|
</li>
|
|
<li class="breadcrumb-item active">
|
|
<a href="#" aria-current="page">Recent comments</a>
|
|
</li>
|
|
</ol>
|
|
</nav> <!-- /#breadcrumbs -->
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
[% IF ( OpacNav || OpacNavBottom ) %]
|
|
<div class="col-lg-2">
|
|
<div id="navigation">
|
|
[% INCLUDE 'navigation.inc' %]
|
|
</div>
|
|
</div>
|
|
<div class="col-10 order-first order-md-first order-lg-2">
|
|
[% ELSE %]
|
|
<div class="col order-first order-md-first order-lg-2">
|
|
[% END %]
|
|
<div id="showreviews" class="searchresults maincontent">
|
|
<h1>Recent comments <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-showreviews.pl?format=rss" class="rsssearchlink" aria-label="Subscribe to recent comments"><i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to recent comments"></i></a></h1>
|
|
<table class="table table-striped">
|
|
<caption class="sr-only">Comments</caption>
|
|
[% FOREACH review IN reviews %]
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
[% INCLUDE 'biblio-title.inc' biblio=review link=> 1 %]
|
|
[% IF ( review.author ) %]
|
|
by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% review.author |url %]" title="Search for works by this author" class="author">[% review.author | html %]</a>
|
|
[% END %]
|
|
</p>
|
|
<p>
|
|
<span class="results_summary">
|
|
<span class="label">Publication:</span>
|
|
[% IF ( review.place ) %][% review.place | html %] [% END %]
|
|
[% IF ( review.publishercode ) %][% review.publishercode | html %][% END %]
|
|
[% IF ( review.publicationyear ) %]
|
|
[% review.publicationyear | html %]
|
|
[% ELSE %]
|
|
[% IF ( review.copyrightdate ) %]
|
|
[% review.copyrightdate | html %]
|
|
[% END %]
|
|
[% END %]
|
|
[% IF ( review.pages ) %]. [% review.pages | html %][% END %]
|
|
[% IF ( review.notes ) %], [% review.notes | html %][% END %]
|
|
[% IF ( review.size ) %] [% review.size | html %][% END %]
|
|
</span>
|
|
[% IF ( review.summary ) %]
|
|
<span class="result_summary">
|
|
[% review.summary | html %]
|
|
</span>
|
|
[% END %]
|
|
[% IF ( review.copyrightdate ) %]
|
|
<span class="results_summary">
|
|
<span class="label">Date:</span>
|
|
[% review.copyrightdate | html %]</span>
|
|
[% END %]
|
|
</p>
|
|
|
|
<p class="commentline[% IF ( review.your_comment ) %] yours[% END %]">
|
|
[% IF ( review.avatarurl ) %]
|
|
<img class="avatar" src="[% review.avatarurl | html %]" height="40" width="40" alt="" />
|
|
[% END %]
|
|
[% FILTER html_break %]
|
|
[% review.review | html %]
|
|
[% END %]
|
|
<span class="commenter">
|
|
[% IF review.your_comment %]
|
|
<span>Added [% review.datereviewed | $KohaDates %] by you</span>
|
|
[% ELSE %]
|
|
[% IF ( review.borrowernumber && ShowReviewer != "none" ) %]
|
|
<span>Added [% review.datereviewed | $KohaDates %] by</span>
|
|
[% SWITCH ShowReviewer %]
|
|
[% CASE 'full' %]
|
|
[% review.borrtitle | html %] [% review.firstname | html %] [% review.surname | html %]
|
|
[% CASE 'first' %]
|
|
[% review.firstname | html %]
|
|
[% CASE 'surname' %]
|
|
[% review.surname | html %]
|
|
[% CASE 'firstandinitial' %]
|
|
[% review.firstname | html %] [% review.surname|truncate(2,'.') | html %]
|
|
[% CASE 'username' %]
|
|
[% review.userid | html %]
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
</span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<a class="title" href="[% PROCESS biblio_a_href biblionumber => review.biblionumber %]" title="View details for this title">
|
|
[% IF ( OPACAmazonCoverImages ) %]
|
|
[% IF ( review.normalized_isbn ) %]
|
|
<img src="https://images-na.ssl-images-amazon.com/images/P/[% review.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />
|
|
[% ELSE %]
|
|
<span class="no-image">No cover image available</span>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
|
|
<img src="https://secure.syndetics.com/index.aspx?isbn=[% review.normalized_isbn | html %]/SC.GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% review.normalized_upc | html %]&oclc=[% review.normalized_oclc | html %]" alt="" class="thumbnail" />
|
|
[% END %]
|
|
|
|
[% IF ( GoogleJackets ) %]
|
|
[% IF ( review.normalized_isbn ) %]
|
|
<div title="[% review.biblionumber |url %]" class="[% review.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
|
|
[% ELSE %]
|
|
<span class="no-image">No cover image available</span>
|
|
[% END %]
|
|
[% END %]
|
|
</a>
|
|
[% bt_id = ( review.normalized_upc || review.normalized_isbn ) %]
|
|
[% IF ( BakerTaylorEnabled ) %]
|
|
[% IF ( bt_id ) %]
|
|
<a href="https://[% review.BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% review.BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
|
|
[% ELSE %]
|
|
<span class="no-image">No cover image available</span>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
|
|
[% SET custom_cover_image_url = review.biblio_object.custom_cover_image_url %]
|
|
[% IF custom_cover_image_url %]
|
|
<a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
</td>
|
|
</tr>
|
|
[% END # / FOREACH review %]
|
|
</table>
|
|
|
|
[% IF ( PAGE_NUMBERS ) %]
|
|
<div class="pages">
|
|
<!-- Row of numbers corresponding to showreviews result pages -->
|
|
[% IF ( previous_page_offset ) %]
|
|
<a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% previous_page_offset | html %]&count=[% results_per_page | html %]"><< Previous</a>
|
|
[% ELSE %]
|
|
[% IF ( previous_page_first ) %]
|
|
<a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=0&count=[% results_per_page | html %]"><< Previous</a>
|
|
[% END %]
|
|
[% END %]
|
|
[% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %]
|
|
[% IF ( PAGE_NUMBER.highlight ) %]
|
|
<span class="currentPage">[% PAGE_NUMBER.pg | html %]</span>
|
|
[% ELSE %]
|
|
<a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% PAGE_NUMBER.offset | html %]&count=[% results_per_page | html %]">[% PAGE_NUMBER.pg | html %]</a>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF ( next_page_offset ) %]
|
|
<a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% next_page_offset | html %]&count=[% results_per_page | html %]">Next >></a>
|
|
[% END %]
|
|
</div>
|
|
[% END # / IF PAGE_NUMBERS %]
|
|
</div> <!-- / #showreviews -->
|
|
</div> <!-- / .col-lg-10/12 -->
|
|
</div> <!-- / .row -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
[% IF ( GoogleJackets ) %]
|
|
<script>
|
|
$(document).ready(function(){
|
|
KOHA.Google.GetCoverFromIsbn();
|
|
});
|
|
</script>
|
|
[% END %]
|
|
[% END %]
|