7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Checkout notes › Circulation › Koha</title>
9 [% INCLUDE 'doc-head-close.inc' %]
12 <body id="circ_checkout-notes" class="circ">
14 [% WRAPPER 'header.inc' %]
15 [% INCLUDE 'circ-search.inc' %]
19 [% WRAPPER 'sub-header.inc' %]
20 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
23 <a href="/cgi-bin/koha/mainpage.pl"><i class="fa fa-home"></i></a>
26 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
29 <a href="#" aria-current="page">
37 <div class="main container-fluid">
39 <div class="col-sm-12">
43 [% IF Koha.Preference('CircSidebar') %]
44 <div class="col-sm-10 col-sm-push-2">
46 <div class="col-md-12 col-lg-10 col-lg-offset-1">
49 <h1>Checkout notes</h1>
51 <div class="dialog alert" id="error" style="display:none;"></div>
53 [% IF ( selected_count ) %]
54 <div class="dialog message">
55 [% IF ( action == 'seen' ) %]
56 <span>[% selected_count | html %] note(s) marked as seen.</span>
57 [% ELSIF ( action == 'notseen' ) %]
58 <span>[% selected_count | html %] note(s) marked as not seen.</span>
60 <span>Failed to change the status of [% selected_count | html %] item(s).</span>
65 [% IF ( notes.count ) %]
66 <form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl">
67 <div id="toolbar" class="btn-toolbar">
68 <button type="submit" class="btn btn-default markseen" name="mark_selected-seen" value="seen" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button>
69 <button type="submit" class="btn btn-default markseen" name="mark_selected-notseen" value="notseen" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button>
72 <fieldset class="action" style="cursor:pointer;">
73 <a class="SelectAll"><i class="fa fa-check"></i> Select all</a>
74 | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
75 | <a class="HideSeen"><i class="fa fa-minus-square"></i> Hide seen</a>
76 | <a class="ShowAll"><i class="fa fa-bars"></i> Show all</a>
79 <table id="notestable">
82 <th class="NoSort"> </th>
83 <th class="anti-the">Title</th>
88 <th class="NoSort noExport">Actions</th>
92 [% FOREACH note IN notes %]
94 <td><input type="checkbox" name="issue_ids" value="[% note.issue_id | html %]"></td>
95 <td>[% note.item.biblio.title | html %] - [% note.item.biblio.author | html %] (<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% note.item.biblionumber | uri %]">[% note.item.barcode | html %]</a>)</td>
96 <td>[% note.note | html %]</td>
97 <td data-order="[% note.notedate | html %]">[% note.notedate | $KohaDates %]</td>
98 <td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td>
99 <td class="seen[% note.noteseen | html %]">
100 [% IF ( note.noteseen == 0 ) %]
101 <span id="status_[% note.issue_id | html %]">Not seen</span>
102 [% ELSIF ( note.noteseen == 1 ) %]
103 <span id="status_[% note.issue_id | html %]">Seen</span>
107 [% IF ( note.noteseen == 1 ) %]
108 <button name="seen" data-issue_id="[% note.issue_id | html %]" class="seen btn btn-default btn-xs" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id | html %]" class="notseen btn btn-default btn-xs"><i class="fa fa-eye-slash"></i> Mark not seen</button>
109 [% ELSIF ( note.noteseen == 0 ) %]
110 <button name="seen" data-issue_id="[% note.issue_id | html %]" class="seen btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id | html %]" class="notseen btn btn-default btn-xs" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button>
121 <div class="dialog message">There are currently no checkout notes.</div>
122 [% END %] <!-- notes -->
124 [% IF Koha.Preference('CircSidebar') %]
125 </div> <!-- /.col-sm-10.col-sm-push-2 -->
126 <div class="col-sm-2 col-sm-pull-10">
128 [% INCLUDE 'circ-nav.inc' %]
130 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
132 </div> <!-- .col-md-12.col-lg-10.col-lg-offset-1 -->
135 </div> <!-- /.row -->
137 </div> <!-- /.col-sm-12 -->
138 </div> <!-- /.row -->
140 [% MACRO jsinclude BLOCK %]
141 [% INCLUDE 'calendar.inc' %]
142 [% INCLUDE 'datatables.inc' %]
144 $(document).ready(function(){
145 $("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, {
146 "order": [[ 1, "asc" ]],
148 { "orderable": false, "searchable": false, 'targets': [ 'NoSort' ] },
149 { "type": "anti-the", "targets": [ "anti-the" ] }
154 $(".SelectAll").on("click", function(){
155 $("input[name='issue_ids'][type='checkbox']").prop("checked", true);
156 $(".markseen").prop("disabled", false);
159 $(".ClearAll").on("click", function(){
160 $("input[name='issue_ids'][type='checkbox']").prop("checked", false);
161 $(".markseen").prop("disabled", true);
164 $(".HideSeen").on("click", function(){
165 $(".seen1").parent().hide();
168 $(".ShowAll").on("click", function(){
174 $("#notestable").on("change", "input[type='checkbox']", function(){
175 if ( $("input[type='checkbox']").is(":checked") ) {
176 $(".markseen").prop("disabled", false);
178 $(".markseen").prop("disabled", true);
182 $("#notestable").on("click", "button.seen, button.notseen", function(event){
183 event.preventDefault(); // prevent form submission
184 var $action = $(this).attr("name");
185 var $issue_id = $(this).data('issue_id');
188 'issue_id': $issue_id,
192 url: '/cgi-bin/koha/svc/checkout_notes/',
198 .done(function(data){
199 if (data.status == 'success'){
200 if ( $action == 'notseen' ){
201 $("#status_" + $issue_id).text(_("Not seen"));
202 $(event.target).parent().siblings(".seen1").removeClass("seen1").addClass("seen0");
203 $(event.target).siblings(".seen").prop("disabled", false);
204 $(event.target).prop("disabled", true);
206 $("#status_" + $issue_id).text(_("Seen"));
207 $(event.target).parent().siblings(".seen0").removeClass("seen0").addClass("seen1");
208 $(event.target).siblings(".notseen").prop("disabled", false);
209 $(event.target).prop("disabled", true);
212 $("#error").text(_("Unable to change status of note."));
216 .error(function(data){
217 $("#error").text(_("Unable to change status of note."));
225 [% INCLUDE 'intranet-bottom.inc' %]