Bug 29939: Use the REST API for ratings
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-review.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Comments on [% INCLUDE 'biblio-title-head.inc' %] &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% BLOCK cssinclude %][% END %]
5 </head>
6 [% INCLUDE 'bodytag.inc' bodyid='comment' bodyclass='popup' %]
7     <div class="main">
8         <div class="container-fluid">
9             <div class="row">
10                 <div class="col order-first order-md-first order-lg-2">
11                     <div id="userreview" class="maincontent">
12                         <h1>Reviews</h1>
13                         [% IF ( ERRORS ) %]
14                             <div class="alert alert-warning">
15                                 [% FOREACH ERROR IN ERRORS %]
16                                     [% IF ( ERROR.nobiblio ) %]
17                                         <p>Error: we cannot find this bibliographic record.</p>
18                                     [% END %]
19                                     [% IF ( ERROR.unauthorized ) %]
20                                         <p>Sorry, only the creator of this comment is allowed to change it.</p>
21                                     [% END %]
22                                     [% IF ( ERROR.scrubbed ) %]
23                                         <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                                     [% END %]
25
26                                     [% IF ( ERROR.scrubbed_all ) %]
27                                         <p>Error!  Your comment was entirely illegal markup code.  It has NOT been added.</p>
28                                     [% END %]
29
30                                     [% IF ( ERROR.empty ) %]
31                                         <p>Error!  You cannot add an empty comment.  Please add content or cancel.</p>
32                                     [% END %]
33                                 [% END # / FOREACH ERROR %]
34                                 [% IF ( WINDOW_CLOSE ) %]
35                                     Note: this window will close automatically in 5 seconds.
36                                 [% END %]
37                             </div>
38                         [% END # / ERRORs %]
39
40                         <h2>Comments on <em>[% INCLUDE 'biblio-title.inc' %]</em></h2>
41                         [% IF ( biblio.author ) %]<h3>[% biblio.author | html %]</h3>[% END %]
42                         <form id="reviewf" action="/cgi-bin/koha/opac-review.pl" method="post">
43                             <legend class="sr-only">Comments</legend>
44                             <input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />
45                             [% IF ( reviewid ) %]<input type="hidden" name="reviewid" value="[% reviewid | html %]" />[% END %]
46                             <fieldset>
47                                 <textarea id="review" name="review" cols="60" rows="8">[% review | html %]</textarea>
48                             </fieldset>
49                             <p>Note: Your comment must be approved by a librarian. </p>
50                             <fieldset class="action">
51                                 <input type="submit" class="btn btn-primary" value="Submit and close this window" />
52                                 <a class="cancel close" href="#">Cancel</a>
53                             </fieldset>
54                         </form>
55                     </div> <!-- / #usersendshelfform -->
56                 </div> <!-- / .span12 -->
57             </div> <!-- / .row -->
58         </div> <!-- / .container-fluid -->
59     </div> <!-- / .main -->
60
61 [% INCLUDE 'opac-bottom.inc' is_popup=1 %]
62 [% BLOCK jsinclude %]
63 <script>
64
65          $(document).ready(function() {
66             [% IF WINDOW_CLOSE %]
67                 opener.location.reload();
68                 window.close();
69             [% END %]
70         });
71
72 </script>
73 [% END %]