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' %]
18 [% WRAPPER 'sub-header.inc' %]
19 [% WRAPPER breadcrumbs %]
20 [% WRAPPER breadcrumb_item %]
21 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
23 [% WRAPPER breadcrumb_item bc_active= 1 %]
24 <span>Checkout notes</span>
26 [% END #/ WRAPPER breadcrumbs %]
27 [% END #/ WRAPPER sub-header.inc %]
29 <div class="main container-fluid">
31 <div class="col-sm-12">
35 [% IF Koha.Preference('CircSidebar') %]
36 <div class="col-sm-10 col-sm-push-2">
38 <div class="col-md-12 col-lg-10 col-lg-offset-1">
41 <h1>Checkout notes</h1>
43 <div class="dialog alert" id="error" style="display:none;"></div>
45 [% IF ( selected_count ) %]
46 <div class="dialog message">
47 [% IF ( action == 'seen' ) %]
48 <span>[% selected_count | html %] note(s) marked as seen.</span>
49 [% ELSIF ( action == 'notseen' ) %]
50 <span>[% selected_count | html %] note(s) marked as not seen.</span>
52 <span>Failed to change the status of [% selected_count | html %] item(s).</span>
57 [% IF ( notes.count ) %]
58 <form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl">
59 <div id="toolbar" class="btn-toolbar">
60 <button type="submit" class="btn btn-default markseen" name="mark_selected-seen" value="seen" disabled="disabled"><i class="fa-solid fa-eye"></i> Mark seen</button>
61 <button type="submit" class="btn btn-default markseen" name="mark_selected-notseen" value="notseen" disabled="disabled"><i class="fa-solid fa-eye-slash"></i> Mark not seen</button>
64 <div class="btn-toolbar selections-toolbar">
65 <a class="SelectAll"><i class="fa fa-check"></i> Select all</a>
66 | <a class="ClearAll"><i class="fa fa-times"></i> Clear all</a>
67 | <a class="HideSeen"><i class="fa fa-minus-square"></i> Hide seen</a>
68 | <a class="ShowAll"><i class="fa fa-bars"></i> Show all</a>
71 <div class="page-section">
72 <table id="notestable">
75 <th class="NoSort"> </th>
76 <th class="anti-the">Title</th>
81 <th class="NoSort noExport">Actions</th>
85 [% FOREACH note IN notes %]
87 <td><input type="checkbox" name="issue_ids" value="[% note.issue_id | html %]"></td>
88 <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>
89 <td>[% note.note | html %]</td>
90 <td data-order="[% note.notedate | html %]">[% note.notedate | $KohaDates %]</td>
91 <td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td>
92 <td class="seen[% note.noteseen | html %]">
93 [% IF ( note.noteseen == 0 ) %]
94 <span id="status_[% note.issue_id | html %]">Not seen</span>
95 [% ELSIF ( note.noteseen == 1 ) %]
96 <span id="status_[% note.issue_id | html %]">Seen</span>
100 [% IF ( note.noteseen == 1 ) %]
101 <button name="seen" data-issue_id="[% note.issue_id | html %]" class="seen btn btn-default btn-xs" disabled="disabled"><i class="fa-solid 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-solid fa-eye-slash"></i> Mark not seen</button>
102 [% ELSIF ( note.noteseen == 0 ) %]
103 <button name="seen" data-issue_id="[% note.issue_id | html %]" class="seen btn btn-default btn-xs"><i class="fa-solid 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-solid fa-eye-slash"></i> Mark not seen</button>
114 <div class="dialog message">There are currently no checkout notes.</div>
115 [% END %] <!-- notes -->
117 [% IF Koha.Preference('CircSidebar') %]
118 </div> <!-- /.col-sm-10.col-sm-push-2 -->
119 <div class="col-sm-2 col-sm-pull-10">
121 [% INCLUDE 'circ-nav.inc' %]
123 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
125 </div> <!-- .col-md-12.col-lg-10.col-lg-offset-1 -->
128 </div> <!-- /.row -->
130 </div> <!-- /.col-sm-12 -->
131 </div> <!-- /.row -->
133 [% MACRO jsinclude BLOCK %]
134 [% INCLUDE 'calendar.inc' %]
135 [% INCLUDE 'datatables.inc' %]
137 $(document).ready(function(){
138 $("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, {
139 "order": [[ 1, "asc" ]],
141 { "orderable": false, "searchable": false, 'targets': [ 'NoSort' ] },
142 { "type": "anti-the", "targets": [ "anti-the" ] }
147 $(".SelectAll").on("click", function(){
148 $("input[name='issue_ids'][type='checkbox']").prop("checked", true);
149 $(".markseen").prop("disabled", false);
152 $(".ClearAll").on("click", function(){
153 $("input[name='issue_ids'][type='checkbox']").prop("checked", false);
154 $(".markseen").prop("disabled", true);
157 $(".HideSeen").on("click", function(){
158 $(".seen1").parent().hide();
161 $(".ShowAll").on("click", function(){
167 $("#notestable").on("change", "input[type='checkbox']", function(){
168 if ( $("input[type='checkbox']").is(":checked") ) {
169 $(".markseen").prop("disabled", false);
171 $(".markseen").prop("disabled", true);
175 $("#notestable").on("click", "button.seen, button.notseen", function(event){
176 event.preventDefault(); // prevent form submission
177 var $action = $(this).attr("name");
178 var $issue_id = $(this).data('issue_id');
181 'issue_id': $issue_id,
185 url: '/cgi-bin/koha/svc/checkout_notes/',
191 .done(function(data){
192 if (data.status == 'success'){
193 if ( $action == 'notseen' ){
194 $("#status_" + $issue_id).text(_("Not seen"));
195 $(event.target).parent().siblings(".seen1").removeClass("seen1").addClass("seen0");
196 $(event.target).siblings(".seen").prop("disabled", false);
197 $(event.target).prop("disabled", true);
199 $("#status_" + $issue_id).text(_("Seen"));
200 $(event.target).parent().siblings(".seen0").removeClass("seen0").addClass("seen1");
201 $(event.target).siblings(".notseen").prop("disabled", false);
202 $(event.target).prop("disabled", true);
205 $("#error").text(_("Unable to change status of note."));
209 .error(function(data){
210 $("#error").text(_("Unable to change status of note."));
218 [% INCLUDE 'intranet-bottom.inc' %]