Test plan:
0) apply the patch
1) enable on shelf hold in administration -> circulation and fines rules
2) create some holds on avalaible items
3) go to administration -> columns settings and confirm there is new holds-to-pull table in circulation section
4) go to circulation -> holds to pull page and confirm that
4a) that the page does work as before
4b) there is ne "Column visibility" button in datatable toolbar
4c) the column configuration does work as expected
4d) there is new column "First patron" with link to patron which is
first in holds queue for given record
4e) sorting works ax expected
4f) filters (in teh bottom of table) work as expected
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works nicely!
https://bugs.koha-community.org/show_bug.cgi?id=18079
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
columnname: date
-
columnname: notes
columnname: date
-
columnname: notes
+
+ holds:
+ holds-to-pull:
+ -
+ columnname: pull_items
+ -
+ columnname: avalaible_items
+ -
+ columnname: patrons
+ -
+ columnname: patron
+ -
+ columnname: title
+ -
+ columnname: libraries
+ -
+ columnname: call_numbers
+ -
+ columnname: copy_numbers
+ -
+ columnname: enumeration
+ -
+ columnname: itemtypes
+ -
+ columnname: locations
+ -
+ columnname: hold_date
biblio.title,
biblio.author,
count(DISTINCT items.itemnumber) as icount,
biblio.title,
biblio.author,
count(DISTINCT items.itemnumber) as icount,
- count(DISTINCT reserves.borrowernumber) as rcount
+ count(DISTINCT reserves.borrowernumber) as rcount,
+ CONCAT_WS(' ', borrowers.firstname, borrowers.surname) as l_patron
FROM reserves
LEFT JOIN items ON items.biblionumber=reserves.biblionumber
LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber
LEFT JOIN branchtransfers ON items.itemnumber=branchtransfers.itemnumber
LEFT JOIN issues ON items.itemnumber=issues.itemnumber
FROM reserves
LEFT JOIN items ON items.biblionumber=reserves.biblionumber
LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber
LEFT JOIN branchtransfers ON items.itemnumber=branchtransfers.itemnumber
LEFT JOIN issues ON items.itemnumber=issues.itemnumber
+ LEFT JOIN borrowers ON reserves.borrowernumber=borrowers.borrowernumber
WHERE
reserves.found IS NULL
$sqldatewhere
WHERE
reserves.found IS NULL
$sqldatewhere
+[% USE ColumnsSettings %]
[% USE AuthorisedValues %]
[%- USE Branches -%]
[%- USE ItemTypes -%]
[% USE AuthorisedValues %]
[%- USE Branches -%]
[%- USE ItemTypes -%]
<!-- Plugin datatables -->
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
<!-- Plugin datatables -->
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
+[% INCLUDE 'columns_settings.inc' %]
<script type="text/JavaScript">
//<![CDATA[
$(document).ready(function() {
<script type="text/JavaScript">
//<![CDATA[
$(document).ready(function() {
- var holdst = $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
+ var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') %];
+ var holdst = KohaTable("#holdst", {
"aoColumnDefs": [
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
{ "sType": "title-string", "aTargets" : [ "title-string" ] },
{ "sType": "string", "aTargets": [ "string-sort" ] } //Target columns that use <br> separators and pull-down menus.
],
"sPaginationType": "full_numbers"
"aoColumnDefs": [
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
{ "sType": "title-string", "aTargets" : [ "title-string" ] },
{ "sType": "string", "aTargets": [ "string-sort" ] } //Target columns that use <br> separators and pull-down menus.
],
"sPaginationType": "full_numbers"
holdst.fnAddFilters("filter");
[%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
function separateData ( ColumnData ){
holdst.fnAddFilters("filter");
[%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
function separateData ( ColumnData ){
return r+'</select>';
}
$("#homebranchfilter").each( function () {
return r+'</select>';
}
$("#homebranchfilter").each( function () {
- $(this).html( createSelect( holdst.fnGetColumnData(4) ) );
+ $(this).html( createSelect( holdst.fnGetColumnData(5) ) );
$('select', this).change( function () {
var filter_value = $(this).val();
$('select', this).change( function () {
var filter_value = $(this).val();
- holdst.fnFilter( filter_value, 4, true );
+ holdst.fnFilter( filter_value, 5, true );
} );
} );
$("#itypefilter").each( function () {
} );
} );
$("#itypefilter").each( function () {
- $(this).html( createSelect( holdst.fnGetColumnData(8) ) );
+ $(this).html( createSelect( holdst.fnGetColumnData(9) ) );
$('select', this).change( function () {
$('select', this).change( function () {
- holdst.fnFilter( $(this).val(), 8 );
+ holdst.fnFilter( $(this).val(), 9 );
} );
} );
$("#locationfilter").each( function () {
} );
} );
$("#locationfilter").each( function () {
- $(this).html( createSelect( holdst.fnGetColumnData(9) ) );
+ $(this).html( createSelect( holdst.fnGetColumnData(10) ) );
$('select', this).change( function () {
$('select', this).change( function () {
- holdst.fnFilter( $(this).val(), 9 );
+ holdst.fnFilter( $(this).val(), 10 );
<th>Pull this many items</th>
<th>Items available</th>
<th>Patrons with holds</th>
<th>Pull this many items</th>
<th>Items available</th>
<th>Patrons with holds</th>
<th class="anti-the">Title</th>
<th class="string-sort">Libraries</th>
<th>Available call numbers</th>
<th class="anti-the">Title</th>
<th class="string-sort">Libraries</th>
<th>Available call numbers</th>
<td><p><b>[% reserveloo.pullcount %]</b></p></td>
<td>[% reserveloo.count %]</td>
<td>[% reserveloo.rcount %]</td>
<td><p><b>[% reserveloo.pullcount %]</b></p></td>
<td>[% reserveloo.count %]</td>
<td>[% reserveloo.rcount %]</td>
+ <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrowernumber %]">[% reserveloo.name %]</a></td>
<td>
<p>
[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
<td>
<p>
[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
<td>"</td>
<td>"</td>
<td>"</td>
<td>"</td>
<td>"</td>
<td>"</td>
[% END %]
<td>
[% FOREACH holdingbranch IN reserveloo.holdingbranches %]
[% END %]
<td>
[% FOREACH holdingbranch IN reserveloo.holdingbranches %]
<td><input type="text" class="filter" data-column_num="0" placeholder="Pull this many items" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="1" placeholder="Items available" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="2" placeholder="Patron holds" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="0" placeholder="Pull this many items" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="1" placeholder="Items available" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="2" placeholder="Patron holds" style="width:95%"/></td>
- <td><input type="text" class="filter" data-column_num="3" placeholder="Title" style="width:95%"/></td>
+ <td><input type="text" class="filter" data-column_num="3" placeholder="Patron name" style="width:95%"/></td>
+ <td><input type="text" class="filter" data-column_num="4" placeholder="Title" style="width:95%"/></td>
<td id="homebranchfilter"></td>
<td id="homebranchfilter"></td>
- <td><input type="text" class="filter" data-column_num="5" placeholder="Call number" style="width:95%"/></td>
- <td><input type="text" class="filter" data-column_num="6" placeholder="Available copy" style="width:95%"/></td>
- <td><input type="text" class="filter" data-column_num="7" placeholder="Available enumeration" style="width:95%"/></td>
+ <td><input type="text" class="filter" data-column_num="6" placeholder="Call number" style="width:95%"/></td>
+ <td><input type="text" class="filter" data-column_num="7" placeholder="Available copy" style="width:95%"/></td>
+ <td><input type="text" class="filter" data-column_num="8" placeholder="Available enumeration" style="width:95%"/></td>
<td id="itypefilter"></td>
<td id="locationfilter"></td>
<td></td>
<td id="itypefilter"></td>
<td id="locationfilter"></td>
<td></td>