7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Home › Circulation › Checkout notes</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% Asset.css("css/datatables.css") | $raw %]
13 <body id="circ_checkout-notes" class="circ">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'circ-search.inc' %]
17 <div id="breadcrumbs">
18 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
19 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> ›
23 [% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
26 [% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
28 <h1>Checkout notes</h1>
30 <div class="dialog alert" id="error" style="display:none;"></div>
32 [% IF ( selected_count ) %]
33 <div class="dialog message">
34 [% IF ( action == 'seen' ) %]
35 <span>[% selected_count | html %] note(s) marked as seen.</span>
36 [% ELSIF ( action == 'notseen' ) %]
37 <span>[% selected_count | html %] note(s) marked as not seen.</span>
39 <span>Failed to change the status of [% selected_count | html %] item(s).</span>
44 [% IF ( notes.count ) %]
45 <fieldset class="action" style="cursor:pointer;">
46 <a class="SelectAll"><i class="fa fa-check"></i> Select all</a>
47 | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
48 | <a class="HideSeen"><i class="fa fa-minus-square"></i> Hide seen</a>
49 | <a class="ShowAll"><i class="fa fa-bars"></i> Show all</a>
52 <form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl">
54 <fieldset class="action">
55 <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>
56 <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>
59 <table id="notestable">
65 <th class="title-string">Date</th>
72 [% FOREACH note IN notes %]
74 <td><input type="checkbox" name="issue_ids" value="[% note.issue_id | html %]"></td>
75 <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>
76 <td>[% note.note | html %]</td>
77 <td><span title="[% note.notedate | html %]">[% note.notedate | $KohaDates %]</span></td>
78 <td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td>
79 <td class="seen[% note.noteseen | html %]">
80 [% IF ( note.noteseen == 0 ) %]
81 <span id="status_[% note.issue_id | html %]">Not seen</span>
82 [% ELSIF ( note.noteseen == 1 ) %]
83 <span id="status_[% note.issue_id | html %]">Seen</span>
87 [% IF ( note.noteseen == 1 ) %]
88 <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>
89 [% ELSIF ( note.noteseen == 0 ) %]
90 <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>
101 <span>There are currently no checkout notes.</span>
102 [% END %] <!-- notes -->
104 </div> <!-- yui-main -->
106 [% IF Koha.Preference('CircSidebar') %]
109 <div class="yui-b noprint">
110 [% INCLUDE 'circ-nav.inc' %]
117 [% MACRO jsinclude BLOCK %]
118 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
119 [% INCLUDE 'calendar.inc' %]
120 [% INCLUDE 'datatables.inc' %]
122 $(document).ready(function(){
123 $("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, {
125 { "aTargets": [ 0, -1 ], "bSearchable": false, "bSortable": false },
126 { "sType": "title-string", "aTargets" : [ "title-string" ] },
128 "sPaginationType": "four_button"
131 $(".SelectAll").on("click", function(){
132 $("input[name='issue_ids'][type='checkbox']").prop("checked", true);
133 $(".btn-sm").prop("disabled", false);
136 $(".ClearAll").on("click", function(){
137 $("input[name='issue_ids'][type='checkbox']").prop("checked", false);
138 $(".btn-sm").prop("disabled", true);
141 $(".HideSeen").on("click", function(){
142 $(".seen1").parent().hide();
145 $(".ShowAll").on("click", function(){
151 $("input[type='checkbox']").click(function(event){
152 if ( $("input[type='checkbox']").is(":checked") ) {
153 $(".btn-sm").prop("disabled", false);
155 $(".btn-sm").prop("disabled", true);
159 $("button.seen, button.notseen").click(function(event){
160 event.preventDefault(); // prevent form submission
161 var $action = $(this).attr("name");
162 var $issue_id = $(this).data('issue_id');
165 'issue_id': $issue_id,
169 url: '/cgi-bin/koha/svc/checkout_notes/',
175 .done(function(data){
176 if (data.status == 'success'){
177 if ( $action == 'notseen' ){
178 $("#status_" + $issue_id).text(_("Not seen"));
179 $(event.target).parent().siblings(".seen1").removeClass("seen1").addClass("seen0");
180 $(event.target).siblings(".seen").prop("disabled", false);
181 $(event.target).prop("disabled", true);
183 $("#status_" + $issue_id).text(_("Seen"));
184 $(event.target).parent().siblings(".seen0").removeClass("seen0").addClass("seen1");
185 $(event.target).siblings(".notseen").prop("disabled", false);
186 $(event.target).prop("disabled", true);
189 $("#error").text(_("Unable to change status of note."));
193 .error(function(data){
194 $("#error").text(_("Unable to change status of note."));
202 [% INCLUDE 'intranet-bottom.inc' %]