Bug 27790: separate earliest hold date into two different columns

Currently "Earliest hold date" and "Pickup place" are displayed
in one single column, but to make filtering possible it is necessary
to split those fields into separate ones.
This patch does exactly that and adds sorting list drop down feature to
the "Pickup place" column.

To reproduce:
    1) Make a few holds and head over to "Circulations->Holds to pull".
    2) Ensure that pickup place and earliest hold date are
in the same column "Earliest hold date"
    3) Apply the patch.
    4) Check "Circulations->Holds to pull list" again, this time
booking date and pickup place should have their own columns.
Ensure that filtering by "pickup location" works fine.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Petro Vashchuk 2021-02-25 12:28:17 +02:00 committed by Jonathan Druart
parent 3181539df6
commit 9abbdf7065

View file

@ -79,6 +79,7 @@
<th class="string-sort">Available locations</th>
<th>Earliest hold date</th>
<th>Reserve notes</th>
<th class="string-sort">Pickup location</th>
<th>Action</th>
</tr>
</thead>
@ -179,6 +180,9 @@
[% hold.reservedate | $KohaDates %] in [% Branches.GetName ( hold.branchcode ) | html %]
</td>
<td>[% hold.reservenotes | html %]</td>
<td>
[% Branches.GetName ( hold.branchcode ) | html %]
</td>
<td>
<form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
<input type="hidden" name="op" value="cancel_reserve" />
@ -239,6 +243,7 @@
<td id="itemtype-filter"></td>
<td id="locationfilter"></td>
<td></td>
<td id="pickup-location"></td>
<td></td>
<td></td>
</tr>
@ -347,6 +352,12 @@
holdst.fnFilter( $(this).val(), 11 );
});
});
$("#pickup-location").each( function () {
$(this).html( createSelect( holdst.fnGetColumnData(13) ) );
$('select', this).change( function () {
holdst.fnFilter( $(this).val(), 13 );
});
});
});
</script>
[% END %]