Finishing adding additional markup for increased flexibility in stylesheet customizat...
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-review.tmpl
1 <!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo; Library Home for  <!-- TMPL_LOOP name="BORROWER_INFO" --><!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --><!-- /TMPL_LOOP -->
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         </head> 
7         <body id="comment"> 
8         <div id="custom-doc" class="yui-t7"> 
9 <div class="container">
10 <form id="reviewf" action="/cgi-bin/koha/opac-review.pl" method="post"> 
11     <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
12     <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
13         <fieldset class="brief">
14         <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>
15             <ol><li><textarea id="review" name="review" cols="60" rows="8"><!--TMPL_VAR NAME="review"--></textarea></li></ol>
16                 </fieldset>
17     <p>Note: Your comment must be approved by a librarian. </p>
18                 <fieldset class="action"> <input type="submit" value="Submit and close this window" /> <a class="cancel close" href="#">Cancel</a></fieldset>
19 </form></div>
20 <script type="text/JavaScript" language="JavaScript">
21 //<![CDATA[
22          $(document).ready(function() {
23                 $('#reviewf').submit( function() {
24                         <!-- TMPL_IF NAME="reviewid" -->
25                         parent.opener.$('#c<!-- TMPL_VAR NAME="reviewid" --> p').prev("small").prev("h5").html("Your Edited Comment (preview, pending approval)");
26                         parent.opener.$('#c<!-- TMPL_VAR NAME="reviewid" --> p').html($("#review").val().replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'));
27                         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>");
28                         window.close();
29                         <!-- TMPL_ELSE -->
30                         parent.opener.$('#newcomment').attr("class","yours");
31                         parent.opener.$('#newcomment').html("<h5>Your Comment (preview, pending approval)</h5>");
32                         parent.opener.$('#newcomment').append("<p>"+$("#review").val().replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'));
33                         parent.opener.$('#newcomment 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></p>");
34                         parent.opener.$("#addcomment").prev("p").remove();
35                         parent.opener.$("#addcomment").remove();
36                         window.close();
37                         <!-- /TMPL_IF -->
38                 });
39         }); 
40 //]]>
41 </script>
42 </div>
43
44 </body>
45 </html>
46