Bug 25340: Pass biblio object to OPAC comments template
This patch modifies the OPAC comments system so that the biblio object is passed to the template. This allows the biblio-title include to properly access the title and subtitle information. Unrelated change: Remove some custom CSS from the page which was obsolete. To test, apply the patch and make sure the "reviewson" preference is enabled. - Log in to the OPAC and open a bibliographic record's detail page. - Under the "Comments" tab, click the "Post your comments" link to trigger the pop-up window. - In the pop-up window, verify that the item's title is correct in the page title and the heading. Author should display correctly, if present. - Test submitting a comment and editing a comment. Everything should work correctly. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
1f00c2a9a9
commit
9776d591ec
2 changed files with 5 additions and 9 deletions
|
@ -1,8 +1,5 @@
|
|||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Comments on [% title | html %]</title>
|
||||
<style>
|
||||
#custom-doc { width:37.08em;*width:36.16em;min-width:485px; margin:1em auto; text-align:left; }
|
||||
</style>
|
||||
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Comments on [% INCLUDE 'biblio-title-head.inc' %]</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
[% BLOCK cssinclude %][% END %]
|
||||
</head>
|
||||
|
@ -42,10 +39,10 @@
|
|||
</div>
|
||||
[% END # / ERRORs %]
|
||||
|
||||
<h1>Comments on <i>[% INCLUDE 'biblio-title.inc' biblio=Stash.stash() %]</i></h1>
|
||||
[% IF ( author ) %]<h3>[% author | html %]</h3>[% END %]
|
||||
<h1>Comments on <i>[% INCLUDE 'biblio-title.inc' %]</i></h1>
|
||||
[% IF ( biblio.author ) %]<h3>[% biblio.author | html %]</h3>[% END %]
|
||||
<form id="reviewf" action="/cgi-bin/koha/opac-review.pl[% IF ( cgi_debug ) %]?debug=1[% END %]" method="post">
|
||||
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
|
||||
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />
|
||||
[% IF ( reviewid ) %]<input type="hidden" name="reviewid" value="[% reviewid | html %]" />[% END %]
|
||||
<fieldset>
|
||||
<textarea id="review" name="review" cols="60" rows="8">[% review | html %]</textarea>
|
||||
|
|
|
@ -97,11 +97,10 @@ if( !@errors && defined $review ) {
|
|||
$review = $clean;
|
||||
$review ||= $savedreview->review if $savedreview;
|
||||
$template->param(
|
||||
'biblionumber' => $biblionumber,
|
||||
'borrowernumber' => $borrowernumber,
|
||||
'review' => $review,
|
||||
'reviewid' => $reviewid || 0,
|
||||
'title' => $biblio->title,
|
||||
'biblio' => $biblio,
|
||||
);
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
Loading…
Reference in a new issue