|
Lines 103-165
Link Here
|
| 103 |
</div> |
103 |
</div> |
| 104 |
<!-- /#modify_holds_search --> |
104 |
<!-- /#modify_holds_search --> |
| 105 |
[% ELSIF view == "report" %] |
105 |
[% ELSIF view == "report" %] |
| 106 |
<h1>Modified holds</h1> |
106 |
<h1>Modified holds report</h1> |
| 107 |
<div id="modified_holds_results-wrapper"> |
107 |
[% IF updated_holds_obj %] |
| 108 |
<div id="modified_holds_results" class="page-section"> |
108 |
<div id="modified_holds_results-wrapper"> |
| 109 |
<table id="modified_holds"> |
109 |
<div id="modified_holds_results" class="page-section"> |
| 110 |
<thead> |
110 |
<h2>Updated holds ([% total_updated | html %])</h2> |
| 111 |
<tr> |
111 |
<table id="modified_holds"> |
| 112 |
<th>Title</th> |
112 |
<thead> |
| 113 |
<th>Patron</th> |
|
|
| 114 |
<th>Pickup location</th> |
| 115 |
<th>Priority</th> |
| 116 |
<th>Expiration date</th> |
| 117 |
<th>Status</th> |
| 118 |
<th>Suspended</th> |
| 119 |
<th>Suspended until</th> |
| 120 |
<th>Notes</th> |
| 121 |
<!-- Add other columns as needed --> |
| 122 |
</tr> |
| 123 |
</thead> |
| 124 |
<tbody> |
| 125 |
[% FOREACH hold IN updated_holds_obj %] |
| 126 |
<tr> |
113 |
<tr> |
| 127 |
<td>[% INCLUDE 'biblio-title.inc' biblio=hold.biblio link = 1 %]</td> |
114 |
<th>Title</th> |
| 128 |
<td>[% INCLUDE 'patron-title.inc' invert_name=1 patron=hold.borrower hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]</td> |
115 |
<th>Patron</th> |
| 129 |
<td>[% hold.branch.branchname | html %]</td> |
116 |
<th>Pickup location</th> |
| 130 |
<td>[% hold.priority | html %]</td> |
117 |
<th>Priority</th> |
| 131 |
<td>[% hold.expirationdate | $KohaDates %]</td> |
118 |
<th>Expiration date</th> |
| 132 |
<td> |
119 |
<th>Status</th> |
| 133 |
[% IF hold.found == 'F' %] |
120 |
<th>Suspended</th> |
| 134 |
<span>Fulfilled</span> |
121 |
<th>Suspended until</th> |
| 135 |
[% ELSIF hold.cancellationdate %] |
122 |
<th>Notes</th> |
| 136 |
<span>Cancelled</span> |
123 |
<th>Result</th> |
| 137 |
[% ELSIF hold.found == 'W' %] |
124 |
<!-- Add other columns as needed --> |
| 138 |
[% IF hold.cancellation_requests.count == 0 %] |
125 |
</tr> |
| 139 |
<span>Waiting</span> |
126 |
</thead> |
| 140 |
[% ELSE %] |
127 |
<tbody> |
|
|
128 |
[% FOREACH hold IN updated_holds_obj %] |
| 129 |
<tr> |
| 130 |
<td>[% INCLUDE 'biblio-title.inc' biblio=hold.biblio link = 1 %]</td> |
| 131 |
<td>[% INCLUDE 'patron-title.inc' invert_name=1 patron=hold.borrower hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]</td> |
| 132 |
<td>[% hold.branch.branchname | html %]</td> |
| 133 |
<td>[% hold.priority | html %]</td> |
| 134 |
<td>[% hold.expirationdate | $KohaDates %]</td> |
| 135 |
<td> |
| 136 |
[% IF hold.found == 'F' %] |
| 137 |
<span>Fulfilled</span> |
| 138 |
[% ELSIF hold.cancellationdate %] |
| 141 |
<span>Cancelled</span> |
139 |
<span>Cancelled</span> |
|
|
140 |
[% ELSIF hold.found == 'W' %] |
| 141 |
[% IF hold.cancellation_requests.count == 0 %] |
| 142 |
<span>Waiting</span> |
| 143 |
[% ELSE %] |
| 144 |
<span>Cancelled</span> |
| 145 |
[% END %] |
| 146 |
[% ELSIF hold.found == 'T' %] |
| 147 |
<span>In transit</span> |
| 148 |
[% ELSE %] |
| 149 |
<span>Pending</span> |
| 142 |
[% END %] |
150 |
[% END %] |
| 143 |
[% ELSIF hold.found == 'T' %] |
151 |
</td> |
| 144 |
<span>In transit</span> |
152 |
<td>[% IF hold.suspend %]Yes[% ELSE %]No[% END %]</td> |
| 145 |
[% ELSE %] |
153 |
<td>[% IF hold.suspend_until %][% hold.suspend_until | $KohaDates %][% ELSE %]-[% END %]</td> |
| 146 |
<span>Pending</span> |
154 |
<td>[% hold.reservenotes | html %]</td> |
| 147 |
[% END %] |
155 |
<td><span class="badge rounded-pill bg-success">Success</span></td> |
| 148 |
</td> |
156 |
</tr> |
| 149 |
<td>[% IF hold.suspend %]Yes[% ELSE %]No[% END %]</td> |
157 |
[% END %] |
| 150 |
<td>[% IF hold.suspend_until %][% hold.suspend_until | $KohaDates %][% ELSE %]-[% END %]</td> |
158 |
</tbody> |
| 151 |
<td>[% hold.reservenotes | html %]</td> |
159 |
</table> |
|
|
160 |
</div> |
| 161 |
<!-- /#modified_holds_results --> |
| 162 |
</div> |
| 163 |
<!-- /#modified_holds_results-wrapper --> |
| 164 |
[% END %] |
| 165 |
[% IF failed_holds_obj %] |
| 166 |
<div id="failed_holds_results-wrapper"> |
| 167 |
<div id="failed_holds_results" class="page-section"> |
| 168 |
<h2>Failed holds ([% total_failed | html %])</h2> |
| 169 |
<div class="alert alert-warning">Important: The following holds were not modified.</div> |
| 170 |
<table id="failed_holds"> |
| 171 |
<thead> |
| 172 |
<tr> |
| 173 |
<th>Title</th> |
| 174 |
<th>Patron</th> |
| 175 |
<th>Pickup location</th> |
| 176 |
<th>Priority</th> |
| 177 |
<th>Expiration date</th> |
| 178 |
<th>Status</th> |
| 179 |
<th>Suspended</th> |
| 180 |
<th>Suspended until</th> |
| 181 |
<th>Notes</th> |
| 182 |
<th>Result</th> |
| 183 |
<!-- Add other columns as needed --> |
| 152 |
</tr> |
184 |
</tr> |
| 153 |
[% END %] |
185 |
</thead> |
| 154 |
</tbody> |
186 |
<tbody> |
| 155 |
</table> |
187 |
[% FOREACH failure IN failed_holds_obj %] |
|
|
188 |
[% SET hold = failure.hold %] |
| 189 |
<tr> |
| 190 |
<td>[% INCLUDE 'biblio-title.inc' biblio=hold.biblio link = 1 %]</td> |
| 191 |
<td>[% INCLUDE 'patron-title.inc' invert_name=1 patron=hold.borrower hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]</td> |
| 192 |
<td>[% hold.branch.branchname | html %]</td> |
| 193 |
<td>[% hold.priority | html %]</td> |
| 194 |
<td>[% hold.expirationdate | $KohaDates %]</td> |
| 195 |
<td> |
| 196 |
[% IF hold.found == 'F' %] |
| 197 |
<span>Fulfilled</span> |
| 198 |
[% ELSIF hold.cancellationdate %] |
| 199 |
<span>Cancelled</span> |
| 200 |
[% ELSIF hold.found == 'W' %] |
| 201 |
[% IF hold.cancellation_requests.count == 0 %] |
| 202 |
<span>Waiting</span> |
| 203 |
[% ELSE %] |
| 204 |
<span>Cancelled</span> |
| 205 |
[% END %] |
| 206 |
[% ELSIF hold.found == 'T' %] |
| 207 |
<span>In transit</span> |
| 208 |
[% ELSE %] |
| 209 |
<span>Pending</span> |
| 210 |
[% END %] |
| 211 |
</td> |
| 212 |
<td>[% IF hold.suspend %]Yes[% ELSE %]No[% END %]</td> |
| 213 |
<td>[% IF hold.suspend_until %][% hold.suspend_until | $KohaDates %][% ELSE %]-[% END %]</td> |
| 214 |
<td>[% hold.reservenotes | html %]</td> |
| 215 |
<td> |
| 216 |
<span class="badge rounded-pill bg-warning text-dark">Failed</span> |
| 217 |
[% IF failure.reason == 'pickupLocationNotAllowed' %] |
| 218 |
New pickup location is invalid |
| 219 |
[% END %] |
| 220 |
</td> |
| 221 |
</tr> |
| 222 |
[% END %] |
| 223 |
</tbody> |
| 224 |
</table> |
| 225 |
</div> |
| 226 |
<!-- /#failed_holds_results --> |
| 156 |
</div> |
227 |
</div> |
| 157 |
<!-- /#modified_holds_results --> |
228 |
<!-- /#failed_holds_results-wrapper --> |
| 158 |
<fieldset class="action"> |
229 |
[% END %] |
| 159 |
<a href="/cgi-bin/koha/tools/batch_modify_holds.pl">Return to batch hold modification</a> |
230 |
<fieldset class="action"> |
| 160 |
</fieldset> |
231 |
<a href="/cgi-bin/koha/tools/batch_modify_holds.pl">Return to batch hold modification</a> |
| 161 |
</div> |
232 |
</fieldset> |
| 162 |
<!-- /#modified_holds_results-wrapper --> |
|
|
| 163 |
[% END %] |
233 |
[% END %] |
| 164 |
<div id="modify_holds_results-wrapper" style="display:none;"> |
234 |
<div id="modify_holds_results-wrapper" style="display:none;"> |
| 165 |
<div id="toolbar" class="btn-toolbar"> |
235 |
<div id="toolbar" class="btn-toolbar"> |
|
Lines 642-653
Link Here
|
| 642 |
return true; |
712 |
return true; |
| 643 |
}); |
713 |
}); |
| 644 |
|
714 |
|
| 645 |
//Modified holds table |
715 |
//Modified holds table and failed holds table share table settings |
| 646 |
var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'modified_holds', 'json' ) | $raw %]; |
716 |
var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'modified_holds', 'json' ) | $raw %]; |
| 647 |
$("#modified_holds").kohaTable({ |
717 |
[% IF updated_holds_obj %] |
| 648 |
pagingType: "full", |
718 |
$("#modified_holds").kohaTable({ |
| 649 |
autoWidth: false |
719 |
pagingType: "full", |
| 650 |
}, table_settings); |
720 |
autoWidth: false |
|
|
721 |
}, table_settings); |
| 722 |
[% END %] |
| 723 |
[% IF failed_holds_obj %] |
| 724 |
$("#failed_holds").kohaTable({ |
| 725 |
pagingType: "full", |
| 726 |
autoWidth: false |
| 727 |
}, table_settings); |
| 728 |
[% END %] |
| 651 |
|
729 |
|
| 652 |
}); |
730 |
}); |
| 653 |
</script> |
731 |
</script> |