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" style="display:none;"></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" style="cursor:pointer;">
42 <a class="SelectAll"><i class="fa fa-check"></i> Select all</a>
43 | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
44 | <a class="HideSeen"><i class="fa fa-minus-square"></i> Hide seen</a>
45 | <a class="ShowAll"><i class="fa fa-bars"></i> Show all</a>
48 <form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl">
50 <fieldset class="action">
51 <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>
52 <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>
55 <table id="notestable">
68 [% FOREACH note IN notes %]
70 <td><input type="checkbox" name="issue_ids" value="[% note.issue_id %]"></td>
71 <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>
72 <td>[% note.note | html %]</td>
73 <td>[% note.notedate | $KohaDates %]</td>
74 <td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td>
75 <td class="seen[% note.noteseen %]">
76 [% IF ( note.noteseen == 0 ) %]
77 <span id="status_[% note.issue_id %]">Not seen</span>
78 [% ELSIF ( note.noteseen == 1 ) %]
79 <span id="status_[% note.issue_id %]">Seen</span>
83 [% IF ( note.noteseen == 1 ) %]
84 <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>
85 [% ELSIF ( note.noteseen == 0 ) %]
86 <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>
97 <span>There are currently no checkout notes.</span>
98 [% END %] <!-- notes -->
100 </div> <!-- yui-main -->
102 [% IF Koha.Preference('CircSidebar') %]
105 <div class="yui-b noprint">
106 [% INCLUDE 'circ-nav.inc' %]
113 [% MACRO jsinclude BLOCK %]
114 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
115 [% INCLUDE 'calendar.inc' %]
116 [% INCLUDE 'datatables.inc' %]
117 <script type="text/javascript">
119 $(document).ready(function(){
120 $("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, {
122 { "aTargets": [ 0, -1 ], "bSearchable": false, "bSortable": false },
124 "sPaginationType": "four_button"
127 $(".SelectAll").on("click", function(){
128 $("input[name='issue_ids'][type='checkbox']").prop("checked", true);
129 $(".btn-sm").prop("disabled", false);
132 $(".ClearAll").on("click", function(){
133 $("input[name='issue_ids'][type='checkbox']").prop("checked", false);
134 $(".btn-sm").prop("disabled", true);
137 $(".HideSeen").on("click", function(){
138 $(".seen1").parent().hide();
141 $(".ShowAll").on("click", function(){
147 $("input[type='checkbox']").click(function(event){
148 if ( $("input[type='checkbox']").is(":checked") ) {
149 $(".btn-sm").prop("disabled", false);
151 $(".btn-sm").prop("disabled", true);
155 $("button.seen, button.notseen").click(function(event){
156 event.preventDefault(); // prevent form submission
157 var $action = $(this).attr("name");
158 var $issue_id = $(this).data('issue_id');
161 'issue_id': $issue_id,
165 url: '/cgi-bin/koha/svc/checkout_notes/',
171 .done(function(data){
172 if (data.status == 'success'){
173 if ( $action == 'notseen' ){
174 $("#status_" + $issue_id).text(_("Not seen"));
175 $(event.target).parent().siblings(".seen1").removeClass("seen1").addClass("seen0");
176 $(event.target).siblings(".seen").prop("disabled", false);
177 $(event.target).prop("disabled", true);
179 $("#status_" + $issue_id).text(_("Seen"));
180 $(event.target).parent().siblings(".seen0").removeClass("seen0").addClass("seen1");
181 $(event.target).siblings(".notseen").prop("disabled", false);
182 $(event.target).prop("disabled", true);
185 $("#error").text(_("Unable to change status of note."));
195 [% INCLUDE 'intranet-bottom.inc' %]