|
Lines 1-79
Link Here
|
| 1 |
[% USE Koha %] |
1 |
[% USE Koha %] |
| 2 |
[% USE KohaDates %] |
2 |
[% USE KohaDates %] |
| 3 |
[% USE Branches %] |
3 |
[% USE Branches %] |
|
|
4 |
[% SET footerjs = 1 %] |
| 4 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
| 5 |
<title>Home › Circulation › Checkout Notes</title> |
6 |
<title>Home › Circulation › Checkout notes</title> |
| 6 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
| 7 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
8 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
| 8 |
[% INCLUDE 'datatables.inc' %] |
|
|
| 9 |
<script type="text/javascript"> |
| 10 |
//<![CDATA[ |
| 11 |
$(document).ready(function(){ |
| 12 |
$("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 13 |
"aoColumnDefs": [ |
| 14 |
{ "aTargets": [ 0, -1 ], "bSearchable": false, "bSortable": false }, |
| 15 |
], |
| 16 |
"sPaginationType": "four_button" |
| 17 |
})); |
| 18 |
|
| 19 |
$(".SelectAll").on("click", function(){ |
| 20 |
$("input[name='issue_ids'][type='checkbox']").prop("checked", true); |
| 21 |
$(".btn-sm").prop("disabled", false); |
| 22 |
}); |
| 23 |
|
| 24 |
$(".ClearAll").on("click", function(){ |
| 25 |
$("input[name='issue_ids'][type='checkbox']").prop("checked", false); |
| 26 |
$(".btn-sm").prop("disabled", true); |
| 27 |
}); |
| 28 |
|
| 29 |
$("#error").hide(); |
| 30 |
|
| 31 |
$("input[type='checkbox']").click(function(event){ |
| 32 |
if ( $("input[type='checkbox']").is(":checked") ) { |
| 33 |
$(".btn-sm").prop("disabled", false); |
| 34 |
} else { |
| 35 |
$(".btn-sm").prop("disabled", true); |
| 36 |
} |
| 37 |
}); |
| 38 |
|
| 39 |
$(".btn-xs").click(function(event){ |
| 40 |
event.preventDefault(); // prevent form submission |
| 41 |
var $action = $(this).attr("name"); |
| 42 |
var $issue_id = $(this).data('issue_id'); |
| 43 |
var ajaxData = { |
| 44 |
'action': $action, |
| 45 |
'issue_id': $issue_id, |
| 46 |
}; |
| 47 |
|
| 48 |
$.ajax({ |
| 49 |
url: '/cgi-bin/koha/svc/checkout_notes/', |
| 50 |
type: 'POST', |
| 51 |
dataType: 'json', |
| 52 |
data: ajaxData, |
| 53 |
}) |
| 54 |
|
| 55 |
.done(function(data){ |
| 56 |
if (data.status == 'success'){ |
| 57 |
if ( $action == 'notseen' ){ |
| 58 |
$("#status_" + $issue_id).text("Not seen"); |
| 59 |
$(event.target).siblings(".seen").prop("disabled", false); |
| 60 |
$(event.target).prop("disabled", true); |
| 61 |
} else { |
| 62 |
$("#status_" + $issue_id).text("Seen"); |
| 63 |
$(event.target).siblings(".notseen").prop("disabled", false); |
| 64 |
$(event.target).prop("disabled", true); |
| 65 |
} |
| 66 |
} else { |
| 67 |
$("#error").text(_("Unable to change status of note.")); |
| 68 |
$("#error").show(); |
| 69 |
} |
| 70 |
}); |
| 71 |
}); |
| 72 |
}); |
| 73 |
//]]> |
| 74 |
</script> |
| 75 |
[% INCLUDE 'calendar.inc' %] |
| 76 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
| 77 |
</head> |
9 |
</head> |
| 78 |
[% INCLUDE 'header.inc' %] |
10 |
[% INCLUDE 'header.inc' %] |
| 79 |
[% INCLUDE 'circ-search.inc' %] |
11 |
[% INCLUDE 'circ-search.inc' %] |
|
Lines 131-137
Link Here
|
| 131 |
<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> |
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> |
| 132 |
<td>[% note.note %]</td> |
64 |
<td>[% note.note %]</td> |
| 133 |
<td>[% note.notedate | $KohaDates %]</td> |
65 |
<td>[% note.notedate | $KohaDates %]</td> |
| 134 |
<td>[% IF note.patron.title %][% note.patron.title [% END %][% note.patron.firstname %] [% note.patron.surname %] (<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% note.patron.borrowernumber %]">[% note.patron.cardnumber %]</a>)</td> |
66 |
<td>[% IF note.patron.title %][% note.patron.title %][% END %][% note.patron.firstname %] [% note.patron.surname %] (<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% note.patron.borrowernumber %]">[% note.patron.cardnumber %]</a>)</td> |
| 135 |
<td> |
67 |
<td> |
| 136 |
[% IF ( note.noteseen == 0 ) %] |
68 |
[% IF ( note.noteseen == 0 ) %] |
| 137 |
<span id="status_[% note.issue_id %]">Not seen</span> |
69 |
<span id="status_[% note.issue_id %]">Not seen</span> |
|
Lines 175-178
Link Here
|
| 175 |
</div> <!-- bd --> |
107 |
</div> <!-- bd --> |
| 176 |
</div> <!-- doc3 --> |
108 |
</div> <!-- doc3 --> |
| 177 |
|
109 |
|
|
|
110 |
[% MACRO jsinclude BLOCK %] |
| 111 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script> |
| 112 |
[% INCLUDE 'calendar.inc' %] |
| 113 |
[% INCLUDE 'datatables.inc' %] |
| 114 |
<script type="text/javascript"> |
| 115 |
//<![CDATA[ |
| 116 |
$(document).ready(function(){ |
| 117 |
$("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 118 |
"aoColumnDefs": [ |
| 119 |
{ "aTargets": [ 0, -1 ], "bSearchable": false, "bSortable": false }, |
| 120 |
], |
| 121 |
"sPaginationType": "four_button" |
| 122 |
})); |
| 123 |
|
| 124 |
$(".SelectAll").on("click", function(){ |
| 125 |
$("input[name='issue_ids'][type='checkbox']").prop("checked", true); |
| 126 |
$(".btn-sm").prop("disabled", false); |
| 127 |
}); |
| 128 |
|
| 129 |
$(".ClearAll").on("click", function(){ |
| 130 |
$("input[name='issue_ids'][type='checkbox']").prop("checked", false); |
| 131 |
$(".btn-sm").prop("disabled", true); |
| 132 |
}); |
| 133 |
|
| 134 |
$("#error").hide(); |
| 135 |
|
| 136 |
$("input[type='checkbox']").click(function(event){ |
| 137 |
if ( $("input[type='checkbox']").is(":checked") ) { |
| 138 |
$(".btn-sm").prop("disabled", false); |
| 139 |
} else { |
| 140 |
$(".btn-sm").prop("disabled", true); |
| 141 |
} |
| 142 |
}); |
| 143 |
|
| 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'); |
| 148 |
var ajaxData = { |
| 149 |
'action': $action, |
| 150 |
'issue_id': $issue_id, |
| 151 |
}; |
| 152 |
|
| 153 |
$.ajax({ |
| 154 |
url: '/cgi-bin/koha/svc/checkout_notes/', |
| 155 |
type: 'POST', |
| 156 |
dataType: 'json', |
| 157 |
data: ajaxData, |
| 158 |
}) |
| 159 |
|
| 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); |
| 166 |
} else { |
| 167 |
$("#status_" + $issue_id).text(_("Seen")); |
| 168 |
$(event.target).siblings(".notseen").prop("disabled", false); |
| 169 |
$(event.target).prop("disabled", true); |
| 170 |
} |
| 171 |
} else { |
| 172 |
$("#error").text(_("Unable to change status of note.")); |
| 173 |
$("#error").show(); |
| 174 |
} |
| 175 |
}); |
| 176 |
}); |
| 177 |
}); |
| 178 |
//]]> |
| 179 |
</script> |
| 180 |
[% END %] |
| 181 |
|
| 178 |
[% INCLUDE 'intranet-bottom.inc' %] |
182 |
[% INCLUDE 'intranet-bottom.inc' %] |