MT 1587 : CSV export for cart and shelves, with the ability to define different expor...
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-review.tmpl
1 <!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryNameTitle" DEFAULT="Koha Online" --> Catalog &rsaquo; Comments on <!--TMPL_VAR NAME="title" -->
2 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3 <style type="text/css"> 
4   #custom-doc { width:37.08em;*width:36.16em;min-width:485px; margin:1em auto; text-align:left; } 
5 </style> 
6 <script type="text/JavaScript" language="JavaScript">
7 //<![CDATA[
8          $(document).ready(function() {
9                 var inject_old = function(comment) {
10                         <!-- TMPL_IF NAME="reviewid" -->
11                         <!-- TMPL_IF NAME="cgi_debug" -->alert("injecting OLD comment: " +comment);<!-- /TMPL_IF -->
12                         parent.opener.$('#c<!-- TMPL_VAR NAME="reviewid" --> p').prev("small").prev("h5").html("Your Edited Comment (preview, pending approval)");
13                         parent.opener.$('#c<!-- TMPL_VAR NAME="reviewid" --> p').html(comment);
14                         parent.opener.$('#c<!-- TMPL_VAR NAME="reviewid" --> p').append(" <a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->&amp;reviewid=<!-- TMPL_VAR NAME="reviewid" -->\');\">Edit<\/a>");
15                         <!-- /TMPL_IF -->
16                         return 1;
17                 };
18                 var inject_new = function(comment) {
19                         <!-- TMPL_IF NAME="cgi_debug" -->alert("injecting NEW comment: " +comment);<!-- /TMPL_IF -->
20                         parent.opener.$('#newcomment').attr("class","yours");
21                         parent.opener.$('#newcomment').html(
22                                 "<h5>Your Comment (preview, pending approval)<\/h5>" +
23                                 "<p>"+comment+"<\/p>" +
24                                 "<a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->\');\">Edit<\/a><\/p>"
25                         );
26                         parent.opener.$("#addcomment").prev("p").remove();
27                         parent.opener.$("#addcomment").remove();
28                 };
29                 <!-- TMPL_IF NAME="clean_review" -->
30                         var clean_review = "<!-- TMPL_VAR NAME="clean_review" ESCAPE=JS -->";           // TMPL var must not contain " quotes.
31                         <!-- TMPL_IF NAME="reviewid" -->
32                         inject_old(clean_review);
33                         <!-- TMPL_ELSE -->
34                         inject_new(clean_review);
35                         <!-- /TMPL_IF -->
36                 <!-- /TMPL_IF -->
37                 <!-- TMPL_IF NAME="WINDOW_CLOSE" -->
38                         <!-- TMPL_IF NAME="ERRORS" -->
39                                 setTimeout("window.close()",5000);      // flash this page, then close.  Change warning in template if you change this value.
40                         <!-- TMPL_ELSE -->
41                                 window.close();
42                         <!-- /TMPL_IF -->
43                 <!-- /TMPL_IF -->
44                 // $('#reviewf').submit(function() {});
45         }); 
46 //]]>
47 </script>
48 </head> 
49 <body id="comment"> 
50 <div id="custom-doc" class="yui-t7"> 
51 <div class="container">
52 <!-- TMPL_IF NAME="cgi_debug" --><div class="debug">CGI debug is on.</div><!-- /TMPL_IF -->
53 <!-- TMPL_IF NAME="ERRORS" -->
54         <div class="error">
55         <!-- TMPL_LOOP NAME="ERRORS" -->
56                 <p>
57                 <!-- TMPL_IF NAME="scrubbed"     -->Note: your comment contained illegal markup code.
58                         It has been saved with the markup removed, as below.
59                         You can edit the comment further, or cancel to retain the comment as is.
60                 <!-- /TMPL_IF -->
61                 <!-- TMPL_IF NAME="scrubbed_all" -->Error!  Your comment was entirely illegal markup code.  It has NOT been added.<!-- /TMPL_IF -->
62                 <!-- TMPL_IF NAME="empty"        -->Error!  You cannot add an empty comment.  Please add content or cancel.<!-- /TMPL_IF -->
63                 </p>
64         <!-- /TMPL_LOOP -->
65         <!-- TMPL_IF NAME="WINDOW_CLOSE" -->Note: this window will close automatically in 5 seconds<!-- /TMPL_IF -->
66         </div>
67 <!-- /TMPL_IF -->
68 <form id="reviewf" action="/cgi-bin/koha/opac-review.pl<!-- TMPL_IF NAME="cgi_debug" -->?debug=1<!-- /TMPL_IF -->" method="post"> 
69     <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
70         <fieldset class="brief">
71         <legend>Comments on <i><!--TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></i><!-- TMPL_IF NAME="author" -->by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></legend>
72             <ol><li><textarea id="review" name="review" cols="60" rows="8"><!--TMPL_VAR NAME="review"--></textarea></li></ol>
73                 </fieldset>
74     <p>Note: Your comment must be approved by a librarian. </p>
75                 <fieldset class="action"> <input type="submit" value="Submit and close this window" /> <a class="cancel close" href="#">Cancel</a></fieldset>
76 </form></div>
77 </div>
78 </body>
79 </html>