1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Comments on [% title |html %]</title>
3 <style type="text/css">
4 #custom-doc { width:37.08em;*width:36.16em;min-width:485px; margin:1em auto; text-align:left; }
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% BLOCK cssinclude %][% END %]
9 [% INCLUDE 'bodytag.inc' bodyid='comment' bodyclass='popup' %]
11 <div class="container-fluid">
12 <div class="row-fluid">
15 [% IF ( cgi_debug ) %]
16 <div class="debug">CGI debug is on.</div>
20 [% FOREACH ERROR IN ERRORS %]
21 [% IF ( ERROR.scrubbed ) %]
22 <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>
25 [% IF ( ERROR.scrubbed_all ) %]
26 <p>Error! Your comment was entirely illegal markup code. It has NOT been added.</p>
29 [% IF ( ERROR.empty ) %]
30 <p>Error! You cannot add an empty comment. Please add content or cancel.</p>
32 [% END # / FOREACH ERROR %]
33 [% IF ( WINDOW_CLOSE ) %]
34 Note: this window will close automatically in 5 seconds.
39 <h1>Comments on <i>[% title |html %] [% subtitle %]</i></h1>
40 [% IF ( author ) %]<h3>[% author |html %]</h3>[% END %]
41 <form id="reviewf" action="/cgi-bin/koha/opac-review.pl[% IF ( cgi_debug ) %]?debug=1[% END %]" method="post">
42 <input type="hidden" name="biblionumber" value="[% biblionumber | html%]" />
43 [% IF ( reviewid ) %]<input type="hidden" name="reviewid" value="[% reviewid | html%]" />[% END %]
45 <textarea id="review" name="review" cols="60" rows="8">[% review %]</textarea>
47 <p>Note: Your comment must be approved by a librarian. </p>
48 <fieldset class="action">
49 <input type="submit" class="btn" value="Submit and close this window" />
50 <a class="cancel close" href="#">Cancel</a>
53 </div> <!-- / #usersendshelfform -->
54 </div> <!-- / .span12 -->
55 </div> <!-- / .row-fluid -->
56 </div> <!-- / .container-fluid -->
57 </div> <!-- / .main -->
59 [% INCLUDE 'opac-bottom.inc' is_popup=1 %]
61 <script type="text/javascript">
63 $(document).ready(function() {
64 var inject_old = function(comment) {
66 [% IF ( cgi_debug ) %]alert(_("injecting OLD comment: ")+comment);[% END %]
67 parent.opener.$('#c[% reviewid %] p').prev("small").prev("h5").html(_("Your edited comment (preview, pending approval)"));
68 parent.opener.$('#c[% reviewid %] p').html(comment);
69 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>");
73 var inject_new = function(comment) {
74 [% IF ( cgi_debug ) %]alert(_("injecting NEW comment: ") +comment);[% END %]
75 parent.opener.$('#newcomment').attr("class","yours");
76 parent.opener.$('#newcomment').html(
77 "<h5>" + _("Your comment (preview, pending approval)") + "<\/h5>" +
78 "<p>"+comment+"<\/p>" +
79 "<a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber |uri%]\');\">"+_("Edit")+"<\/a><\/p>"
81 parent.opener.$("#addcomment").prev("p").remove();
82 parent.opener.$("#addcomment").remove();
84 [% IF ( clean_review ) %]
85 var clean_review = "[% clean_review |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"; // TMPL var must not contain " quotes.
87 inject_old(clean_review);
89 inject_new(clean_review);
92 [% IF ( WINDOW_CLOSE ) %]
94 // flash this page, then close. Change warning in template if you change this value.
95 setTimeout("window.close()",5000);