|
Lines 2-11
Link Here
|
| 2 |
[% USE KohaDates %] |
2 |
[% USE KohaDates %] |
| 3 |
[% USE Branches %] |
3 |
[% USE Branches %] |
| 4 |
[% INCLUDE 'doc-head-open.inc' %] |
4 |
[% INCLUDE 'doc-head-open.inc' %] |
| 5 |
<title>Home › Circulation › Issue Notes › Review Issue Notes</title> |
5 |
<title>Home › Circulation › Issue Notes</title> |
| 6 |
[% INCLUDE 'doc-head-close.inc' %] |
6 |
[% INCLUDE 'doc-head-close.inc' %] |
| 7 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
7 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
| 8 |
[% INCLUDE 'datatables.inc' %] |
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 |
}); |
| 22 |
|
| 23 |
$(".ClearAll").on("click", function(){ |
| 24 |
$("input[name='issue_ids'][type='checkbox']").prop("checked", false); |
| 25 |
}); |
| 26 |
|
| 27 |
$("#error").hide(); |
| 28 |
|
| 29 |
$(".btn-mini").click(function(event){ |
| 30 |
event.preventDefault(); // prevent form submission |
| 31 |
var $action = $(this).attr("name"); |
| 32 |
var $issue_id = $(this).data('issue_id'); |
| 33 |
var ajaxData = { |
| 34 |
'action': $action, |
| 35 |
'issue_id': $issue_id, |
| 36 |
}; |
| 37 |
|
| 38 |
$.ajax({ |
| 39 |
url: '/cgi-bin/koha/svc/issue_notes/', |
| 40 |
type: 'POST', |
| 41 |
dataType: 'json', |
| 42 |
data: ajaxData, |
| 43 |
}) |
| 44 |
|
| 45 |
.done(function(data){ |
| 46 |
if (data.status == 'success'){ |
| 47 |
if ( $action == 'notseen' ){ |
| 48 |
$("#status_" + $issue_id).text("Not seen"); |
| 49 |
$(event.target).siblings(".seen").prop("disabled", false); |
| 50 |
$(event.target).prop("disabled", true); |
| 51 |
} else { |
| 52 |
$("#status_" + $issue_id).text("Seen"); |
| 53 |
$(event.target).siblings(".notseen").prop("disabled", false); |
| 54 |
$(event.target).prop("disabled", true); |
| 55 |
} |
| 56 |
} else { |
| 57 |
$("#error").text("Unable to change status of note."); |
| 58 |
$("#error").show(); |
| 59 |
} |
| 60 |
}); |
| 61 |
}); |
| 62 |
}); |
| 63 |
//]]> |
| 64 |
</script> |
| 9 |
[% INCLUDE 'calendar.inc' %] |
65 |
[% INCLUDE 'calendar.inc' %] |
| 10 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
66 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
| 11 |
</head> |
67 |
</head> |
|
Lines 14-54
Link Here
|
| 14 |
<div id="breadcrumbs"> |
70 |
<div id="breadcrumbs"> |
| 15 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
71 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
| 16 |
<a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> › |
72 |
<a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> › |
| 17 |
<a href="/cgi-bin/koha/issue_notes/issue-notes.pl">Issue notes</a> › Issue notes management |
73 |
Issue notes |
| 18 |
</div> |
74 |
</div> |
| 19 |
|
75 |
|
| 20 |
<div id="doc3" class="yui-t7"> <!-- <div id="doc3" class="yui-t2" --> |
76 |
<div id="doc" class="yui-t7"> <!-- <div id="doc3" class="yui-t2" --> |
| 21 |
<div id="bd"> |
77 |
<div id="bd"> |
| 22 |
<div id="yui-main"> |
78 |
<div id="yui-main"> |
| 23 |
|
79 |
|
| 24 |
<h1>Issue notes</h1> |
80 |
<h1>Issue notes</h1> |
| 25 |
|
81 |
|
|
|
82 |
<div class="dialog alert" id="error"></div> |
| 83 |
|
| 84 |
[% IF ( selected_count ) %] |
| 85 |
<div class="dialog message"> |
| 86 |
[% IF ( action == 'seen' ) %] |
| 87 |
[% selected_count %] note(s) marked as seen. |
| 88 |
[% ELSIF ( action == 'notseen' ) %] |
| 89 |
[% selected_count %] note(s) marked as not seen. |
| 90 |
[% ELSE %] |
| 91 |
Failed to change the status of [% selected_count %] item(s). |
| 92 |
[% END %] |
| 93 |
</div> |
| 94 |
<a href="/cgi-bin/koha/issue_notes/issue-notes.pl" class="btn btn-small"><i class="fa fa-left"></i> Back to issue notes</a> |
| 95 |
[% ELSE %] |
| 96 |
|
| 26 |
[% IF ( notes ) %] |
97 |
[% IF ( notes ) %] |
|
|
98 |
|
| 99 |
<fieldset class="action"> |
| 100 |
<a class="SelectAll"><i class="fa fa-check"></i> Select all</a> | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a> |
| 101 |
</fieldset> |
| 102 |
|
| 103 |
<form id="mark_selected" method="post" action="/cgi-bin/koha/issue_notes/issue-notes.pl"> |
| 104 |
|
| 27 |
<table id="notestable"> |
105 |
<table id="notestable"> |
| 28 |
<thead> |
106 |
<thead> |
| 29 |
<tr> |
107 |
<tr> |
|
|
108 |
<th> </th> |
| 30 |
<th>Note</th> |
109 |
<th>Note</th> |
|
|
110 |
<th>Status</th> |
| 31 |
<th>Title</th> |
111 |
<th>Title</th> |
| 32 |
<th>Barcode</th> |
|
|
| 33 |
<th>Date</th> |
112 |
<th>Date</th> |
| 34 |
<th>Set by</th> |
113 |
<th>Set by</th> |
| 35 |
<th>Seen</th> |
114 |
<th>Actions</th> |
| 36 |
</tr> |
115 |
</tr> |
| 37 |
</thead> |
116 |
</thead> |
| 38 |
<tbody> |
117 |
<tbody> |
| 39 |
[% FOREACH note in notes %] |
118 |
[% FOREACH note IN notes %] |
| 40 |
<tr> |
119 |
<tr> |
|
|
120 |
<td><input type="checkbox" name="issue_ids" value="[% note.issue_id %]"></td> |
| 41 |
<td>[% note.note %]</td> |
121 |
<td>[% note.note %]</td> |
| 42 |
<td>[% note.title %]</td> |
122 |
<td>[% IF ( note.noteseen == 0 ) %] |
| 43 |
<td>[% note.barcode %]</td> |
123 |
<span id="status_[% note.issue_id %]">Not seen</span> |
| 44 |
<td>[% note.date %]</td> |
124 |
[% ELSIF ( note.noteseen == 1 ) %] |
| 45 |
<td>[% note.firstname %] [% note.surname %] ([% note.borrowernumber %])</td> |
125 |
<span id="status_[% note.issue_id %]">Seen</span> |
| 46 |
<td>[% IF ( pending ) %]<button class="btn btn-mini">Not seen</button>[% ELSE %]<button class="btn btn-mini">Seen</button>[% END %]</td> |
126 |
[% END %]</td> |
|
|
127 |
<td>[% note.item.biblionumber.title %] - [% note.item.biblionumber.author %] (<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% note.item.biblionumber.biblionumber %]">[% note.item.barcode %]</a>)</td> |
| 128 |
<td>[% note.notedate | $KohaDates %]</td> |
| 129 |
<td>[% note.borrower.firstname %] [% note.borrower.surname %] (<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% note.borrower.borrowernumber %]">[% note.borrower.cardnumber %]</a>)</td> |
| 130 |
<td class="actions">[% IF ( note.noteseen == 1 ) %] |
| 131 |
<button name="seen" data-issue_id="[% note.issue_id %]" class="seen btn btn-mini" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id %]" class="notseen btn btn-mini"><i class="fa fa-eye-slash"></i> Mark not seen</button> |
| 132 |
[% ELSIF ( note.noteseen == 0 ) %] |
| 133 |
<button name="seen" data-issue_id="[% note.issue_id %]" class="seen btn btn-mini"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id %]" class="notseen btn btn-mini" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button> |
| 134 |
[% END %]</td> |
| 47 |
</tr> |
135 |
</tr> |
| 48 |
[% END %] |
136 |
[% END %] |
| 49 |
</tbody> |
137 |
</tbody> |
| 50 |
</table> |
138 |
</table> |
| 51 |
[% END %] |
139 |
|
|
|
140 |
<fieldset class="action"> |
| 141 |
<button type="submit" class="btn btn-small" name="mark_selected-seen" value="seen"><i class="fa fa-eye"></i> Mark seen</button> |
| 142 |
<button type="submit" class="btn btn-small" name="mark_selected-notseen" value="notseen"><i class="fa fa-eye-slash"></i> Mark not seen</button> |
| 143 |
</fieldset> |
| 144 |
|
| 145 |
</form> |
| 146 |
|
| 147 |
[% END %] <!-- notes --> |
| 148 |
|
| 149 |
[% END %] <!-- selected_count --> |
| 52 |
|
150 |
|
| 53 |
</div> <!-- yui-main --> |
151 |
</div> <!-- yui-main --> |
| 54 |
</div> <!-- bd --> |
152 |
</div> <!-- bd --> |