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 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'circ-search.inc' %]
17 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
20 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
23 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
26 <a href="#" aria-current="page">
33 <div class="main container-fluid">
35 <div class="col-sm-12">
39 [% IF Koha.Preference('CircSidebar') %]
40 <div class="col-sm-10 col-sm-push-2">
42 <div class="col-md-12 col-lg-10 col-lg-offset-1">
45 <h1>Checkout notes</h1>
47 <div class="dialog alert" id="error" style="display:none;"></div>
49 [% IF ( selected_count ) %]
50 <div class="dialog message">
51 [% IF ( action == 'seen' ) %]
52 <span>[% selected_count | html %] note(s) marked as seen.</span>
53 [% ELSIF ( action == 'notseen' ) %]
54 <span>[% selected_count | html %] note(s) marked as not seen.</span>
56 <span>Failed to change the status of [% selected_count | html %] item(s).</span>
61 [% IF ( notes.count ) %]
62 <form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl">
63 <div id="toolbar" class="btn-toolbar">
64 <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>
65 <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>
68 <fieldset class="action" style="cursor:pointer;">
69 <a class="SelectAll"><i class="fa fa-check"></i> Select all</a>
70 | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
71 | <a class="HideSeen"><i class="fa fa-minus-square"></i> Hide seen</a>
72 | <a class="ShowAll"><i class="fa fa-bars"></i> Show all</a>
75 <table id="notestable">
78 <th class="NoSort"> </th>
79 <th class="anti-the">Title</th>
84 <th class="NoSort noExport">Actions</th>
88 [% FOREACH note IN notes %]
90 <td><input type="checkbox" name="issue_ids" value="[% note.issue_id | html %]"></td>
91 <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>
92 <td>[% note.note | html %]</td>
93 <td data-order="[% note.notedate | html %]">[% note.notedate | $KohaDates %]</td>
94 <td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td>
95 <td class="seen[% note.noteseen | html %]">
96 [% IF ( note.noteseen == 0 ) %]
97 <span id="status_[% note.issue_id | html %]">Not seen</span>
98 [% ELSIF ( note.noteseen == 1 ) %]
99 <span id="status_[% note.issue_id | html %]">Seen</span>
103 [% IF ( note.noteseen == 1 ) %]
104 <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>
105 [% ELSIF ( note.noteseen == 0 ) %]
106 <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>
117 <div class="dialog message">There are currently no checkout notes.</div>
118 [% END %] <!-- notes -->
120 [% IF Koha.Preference('CircSidebar') %]
121 </div> <!-- /.col-sm-10.col-sm-push-2 -->
122 <div class="col-sm-2 col-sm-pull-10">
124 [% INCLUDE 'circ-nav.inc' %]
126 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
128 </div> <!-- .col-md-12.col-lg-10.col-lg-offset-1 -->
131 </div> <!-- /.row -->
133 </div> <!-- /.col-sm-12 -->
134 </div> <!-- /.row -->
136 [% MACRO jsinclude BLOCK %]
137 [% INCLUDE 'calendar.inc' %]
138 [% INCLUDE 'datatables.inc' %]
140 $(document).ready(function(){
141 $("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, {
142 "order": [[ 1, "asc" ]],
144 { "orderable": false, "searchable": false, 'targets': [ 'NoSort' ] },
145 { "type": "anti-the", "targets": [ "anti-the" ] }
150 $(".SelectAll").on("click", function(){
151 $("input[name='issue_ids'][type='checkbox']").prop("checked", true);
152 $(".markseen").prop("disabled", false);
155 $(".ClearAll").on("click", function(){
156 $("input[name='issue_ids'][type='checkbox']").prop("checked", false);
157 $(".markseen").prop("disabled", true);
160 $(".HideSeen").on("click", function(){
161 $(".seen1").parent().hide();
164 $(".ShowAll").on("click", function(){
170 $("#notestable").on("change", "input[type='checkbox']", function(){
171 if ( $("input[type='checkbox']").is(":checked") ) {
172 $(".markseen").prop("disabled", false);
174 $(".markseen").prop("disabled", true);
178 $("#notestable").on("click", "button.seen, button.notseen", function(event){
179 event.preventDefault(); // prevent form submission
180 var $action = $(this).attr("name");
181 var $issue_id = $(this).data('issue_id');
184 'issue_id': $issue_id,
188 url: '/cgi-bin/koha/svc/checkout_notes/',
194 .done(function(data){
195 if (data.status == 'success'){
196 if ( $action == 'notseen' ){
197 $("#status_" + $issue_id).text(_("Not seen"));
198 $(event.target).parent().siblings(".seen1").removeClass("seen1").addClass("seen0");
199 $(event.target).siblings(".seen").prop("disabled", false);
200 $(event.target).prop("disabled", true);
202 $("#status_" + $issue_id).text(_("Seen"));
203 $(event.target).parent().siblings(".seen0").removeClass("seen0").addClass("seen1");
204 $(event.target).siblings(".notseen").prop("disabled", false);
205 $(event.target).prop("disabled", true);
208 $("#error").text(_("Unable to change status of note."));
212 .error(function(data){
213 $("#error").text(_("Unable to change status of note."));
221 [% INCLUDE 'intranet-bottom.inc' %]