6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Home › Circulation › Checkout notes</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% Asset.css("css/datatables.css") %]
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'circ-search.inc' %]
13 <div id="breadcrumbs">
14 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
15 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> ›
19 [% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
22 [% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
24 <h1>Checkout notes</h1>
26 <div class="dialog alert" id="error"></div>
28 [% IF ( selected_count ) %]
29 <div class="dialog message">
30 [% IF ( action == 'seen' ) %]
31 <span>[% selected_count %] note(s) marked as seen.</span>
32 [% ELSIF ( action == 'notseen' ) %]
33 <span>[% selected_count %] note(s) marked as not seen.</span>
35 <span>Failed to change the status of [% selected_count %] item(s).</span>
40 [% IF ( notes.count ) %]
41 <fieldset class="action">
42 <a class="SelectAll"><i class="fa fa-check"></i> Select all</a> | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
45 <form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl">
47 <table id="notestable">
60 [% FOREACH note IN notes %]
62 <td><input type="checkbox" name="issue_ids" value="[% note.issue_id %]"></td>
63 <td>[% note.item.biblio.title %] - [% note.item.biblio.author %] (<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% note.item.biblionumber %]">[% note.item.barcode %]</a>)</td>
64 <td>[% note.note | html %]</td>
65 <td>[% note.notedate | $KohaDates %]</td>
66 <td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td>
68 [% IF ( note.noteseen == 0 ) %]
69 <span id="status_[% note.issue_id %]">Not seen</span>
70 [% ELSIF ( note.noteseen == 1 ) %]
71 <span id="status_[% note.issue_id %]">Seen</span>
75 [% IF ( note.noteseen == 1 ) %]
76 <button name="seen" data-issue_id="[% note.issue_id %]" 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 %]" class="notseen btn btn-default btn-xs"><i class="fa fa-eye-slash"></i> Mark not seen</button>
77 [% ELSIF ( note.noteseen == 0 ) %]
78 <button name="seen" data-issue_id="[% note.issue_id %]" 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 %]" class="notseen btn btn-default btn-xs" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button>
86 <fieldset class="action">
87 <button type="submit" class="btn btn-default btn-sm" name="mark_selected-seen" value="seen" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button>
88 <button type="submit" class="btn btn-default btn-sm" name="mark_selected-notseen" value="notseen" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button>
94 <span>There are currently no checkout notes.</span>
95 [% END %] <!-- notes -->
97 </div> <!-- yui-main -->
99 [% IF Koha.Preference('CircSidebar') %]
102 <div class="yui-b noprint">
103 [% INCLUDE 'circ-nav.inc' %]
110 [% MACRO jsinclude BLOCK %]
111 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
112 [% INCLUDE 'calendar.inc' %]
113 [% INCLUDE 'datatables.inc' %]
114 <script type="text/javascript">
116 $(document).ready(function(){
117 $("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, {
119 { "aTargets": [ 0, -1 ], "bSearchable": false, "bSortable": false },
121 "sPaginationType": "four_button"
124 $(".SelectAll").on("click", function(){
125 $("input[name='issue_ids'][type='checkbox']").prop("checked", true);
126 $(".btn-sm").prop("disabled", false);
129 $(".ClearAll").on("click", function(){
130 $("input[name='issue_ids'][type='checkbox']").prop("checked", false);
131 $(".btn-sm").prop("disabled", true);
136 $("input[type='checkbox']").click(function(event){
137 if ( $("input[type='checkbox']").is(":checked") ) {
138 $(".btn-sm").prop("disabled", false);
140 $(".btn-sm").prop("disabled", true);
144 $(".btn-xs").click(function(event){
145 event.preventDefault(); // prevent form submission
146 var $action = $(this).attr("name");
147 var $issue_id = $(this).data('issue_id');
150 'issue_id': $issue_id,
154 url: '/cgi-bin/koha/svc/checkout_notes/',
160 .done(function(data){
161 if (data.status == 'success'){
162 if ( $action == 'notseen' ){
163 $("#status_" + $issue_id).text(_("Not seen"));
164 $(event.target).siblings(".seen").prop("disabled", false);
165 $(event.target).prop("disabled", true);
167 $("#status_" + $issue_id).text(_("Seen"));
168 $(event.target).siblings(".notseen").prop("disabled", false);
169 $(event.target).prop("disabled", true);
172 $("#error").text(_("Unable to change status of note."));
182 [% INCLUDE 'intranet-bottom.inc' %]