1 [% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog › Comments on [% title |html %]
2 <style type="text/css">
3 #custom-doc { width:37.08em;*width:36.16em;min-width:485px; margin:1em auto; text-align:left; }
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% BLOCK cssinclude %][% END %]
8 <body id="comment" class="popup">
10 <div class="container-fluid">
11 <div class="row-fluid">
14 [% IF ( cgi_debug ) %]
15 <div class="debug">CGI debug is on.</div>
19 [% FOREACH ERROR IN ERRORS %]
20 [% IF ( ERROR.scrubbed ) %]
21 <p>Note: your comment contained illegal markup code. It has been saved with the markup removed, as below. You can edit the comment further, or cancel to retain the comment as is.</p>
24 [% IF ( ERROR.scrubbed_all ) %]
25 <p>Error! Your comment was entirely illegal markup code. It has NOT been added.</p>
28 [% IF ( ERROR.empty ) %]
29 <p>Error! You cannot add an empty comment. Please add content or cancel.</p>
31 [% END # / FOREACH ERROR %]
32 [% IF ( WINDOW_CLOSE ) %]
33 Note: this window will close automatically in 5 seconds.
38 <h1>Comments on <i>[% title |html %] [% subtitle %]</i></h1>
39 [% IF ( author ) %]<h3>[% author |html %]</h3>[% END %]
40 <form id="reviewf" action="/cgi-bin/koha/opac-review.pl[% IF ( cgi_debug ) %]?debug=1[% END %]" method="post">
41 <input type="hidden" name="biblionumber" value="[% biblionumber | html%]" />
42 [% IF ( reviewid ) %]<input type="hidden" name="reviewid" value="[% reviewid | html%]" />[% END %]
44 <textarea id="review" name="review" cols="60" rows="8">[% review %]</textarea>
46 <p>Note: Your comment must be approved by a librarian. </p>
47 <fieldset class="action">
48 <input type="submit" class="btn" value="Submit and close this window" />
49 <a class="cancel close" href="#">Cancel</a>
52 </div> <!-- / #usersendshelfform -->
53 </div> <!-- / .span12 -->
54 </div> <!-- / .row-fluid -->
55 </div> <!-- / .container-fluid -->
56 </div> <!-- / .main -->
58 [% INCLUDE 'opac-bottom.inc' is_popup=1 %]
60 <script type="text/javascript">
62 $(document).ready(function() {
63 var inject_old = function(comment) {
65 [% IF ( cgi_debug ) %]alert(_("injecting OLD comment: ")+comment);[% END %]
66 parent.opener.$('#c[% reviewid %] p').prev("small").prev("h5").html(_("Your edited comment (preview, pending approval)"));
67 parent.opener.$('#c[% reviewid %] p').html(comment);
68 parent.opener.$('#c[% reviewid %] p').append(" <a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber | uri %]&reviewid=[% reviewid | uri%]\');\">"+_("Edit")+"<\/a>");
72 var inject_new = function(comment) {
73 [% IF ( cgi_debug ) %]alert(_("injecting NEW comment: ") +comment);[% END %]
74 parent.opener.$('#newcomment').attr("class","yours");
75 parent.opener.$('#newcomment').html(
76 "<h5>" + _("Your comment (preview, pending approval)") + "<\/h5>" +
77 "<p>"+comment+"<\/p>" +
78 "<a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber |uri%]\');\">"+_("Edit")+"<\/a><\/p>"
80 parent.opener.$("#addcomment").prev("p").remove();
81 parent.opener.$("#addcomment").remove();
83 [% IF ( clean_review ) %]
84 var clean_review = "[% clean_review |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"; // TMPL var must not contain " quotes.
86 inject_old(clean_review);
88 inject_new(clean_review);
91 [% IF ( WINDOW_CLOSE ) %]
93 // flash this page, then close. Change warning in template if you change this value.
94 setTimeout("window.close()",5000);