bug 2523: add columns to holds queue report
* added author, ccode, location, and item enumchron * sorted by collection, locatoin, call number, author, title As part of this patch, commented out the JavaScript tablesorter, which could cause the browerer to lock up if the picklist contains more than a couple hundred items to pull. Some sort of pagination is clearly required, but since it is necessary for customers to be able to print out the picklist, there still needs to be an option to see the complete list for a branch. This patch includes the final component of the fix for bug 2331. Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
parent
bb3d3afe6e
commit
7abfefa099
|
|
@ -23,6 +23,7 @@ This script displays items in the tmp_holdsqueue table
|
|||
=cut
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Output;
|
||||
|
|
@ -92,10 +93,20 @@ $template->param( branchloop => \@branchloop,
|
|||
sub GetHoldsQueueItems {
|
||||
my ($branchlimit,$itemtypelimit) = @_;
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $query = "SELECT * FROM tmp_holdsqueue";
|
||||
$query.=" WHERE holdingbranch = \"$branchlimit\"" if $branchlimit;
|
||||
|
||||
my @bind_params = ();
|
||||
my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.location, items.enumchron, items.cn_sort
|
||||
FROM tmp_holdsqueue
|
||||
JOIN biblio USING (biblionumber)
|
||||
LEFT JOIN items USING (itemnumber)
|
||||
/;
|
||||
if ($branchlimit) {
|
||||
$query .=" WHERE holdingbranch = ?";
|
||||
push @bind_params, $branchlimit;
|
||||
}
|
||||
$query .= " ORDER BY ccode, location, cn_sort, author, title, pickbranch, reservedate";
|
||||
my $sth = $dbh->prepare($query);
|
||||
$sth->execute();
|
||||
$sth->execute(@bind_params);
|
||||
my $items = [];
|
||||
while ( my $row = $sth->fetchrow_hashref ){
|
||||
$row->{reservedate} = format_date($row->{reservedate});
|
||||
|
|
|
|||
|
|
@ -4,20 +4,20 @@
|
|||
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/JavaScript" language="JavaScript">
|
||||
//<![CDATA[
|
||||
$.tablesorter.addParser({
|
||||
id: 'articles',
|
||||
is: function(s) {return false; },
|
||||
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
|
||||
type: 'text'
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$.tablesorter.defaults.widgets = ['zebra'];
|
||||
$("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
|
||||
dateFormat: 'uk',<!-- /TMPL_IF -->
|
||||
sortList: [[1,0]],
|
||||
headers: { 0: { sorter: 'articles' }}
|
||||
});
|
||||
});
|
||||
//$.tablesorter.addParser({
|
||||
// id: 'articles',
|
||||
// is: function(s) {return false; },
|
||||
// format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
|
||||
// type: 'text'
|
||||
//});
|
||||
// $(document).ready(function() {
|
||||
// $.tablesorter.defaults.widgets = ['zebra'];
|
||||
// $("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
|
||||
// dateFormat: 'uk',<!-- /TMPL_IF -->
|
||||
// sortList: [[1,0]],
|
||||
// headers: { 0: { sorter: 'articles' }}
|
||||
// });
|
||||
// });
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
|
|
@ -50,22 +50,33 @@ $.tablesorter.addParser({
|
|||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Author</th>
|
||||
<th>Collection</th>
|
||||
<th>Shelving Location</th>
|
||||
<th>Call Number</th>
|
||||
<th>Patron</th>
|
||||
<th>Phone Number</th>
|
||||
<th>Date</th>
|
||||
<th>Barcode</th>
|
||||
<th>Enumeration</th>
|
||||
<th>Send To</th>
|
||||
<th>Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><!-- TMPL_LOOP NAME="itemsloop"-->
|
||||
<tr>
|
||||
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->"><!-- TMPL_VAR NAME="title"--></a> (<!-- TMPL_VAR NAME="barcode" -->)</td>
|
||||
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->"><!-- TMPL_VAR NAME="title"--></a></td>
|
||||
<td><!-- TMPL_VAR NAME="author" --></td>
|
||||
<td><!-- TMPL_VAR NAME="ccode" --></td>
|
||||
<td><!-- TMPL_VAR NAME="location" --></td>
|
||||
<td><!-- TMPL_VAR NAME="itemcallnumber"--></td>
|
||||
<td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber"-->"><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></a> (<!-- TMPL_VAR NAME="cardnumber"-->)</td>
|
||||
|
||||
<td><!-- TMPL_VAR NAME="phone"--></td>
|
||||
<td><!-- TMPL_VAR NAME="reservedate" --></td>
|
||||
<td>
|
||||
<!-- TMPL_IF NAME="item_level_request" -->
|
||||
<!-- TMPL_VAR NAME="barcode" -->
|
||||
<!-- TMPL_ELSE -->
|
||||
<em>Any available copy</em>
|
||||
<!-- /TMPL_IF -->
|
||||
</td>
|
||||
<td><!-- TMPL_VAR NAME="enumchron" --></td>
|
||||
<td><!-- TMPL_VAR NAME="pickbranch" --></td>
|
||||
<td><!-- TMPL_VAR NAME="reservedate" --></td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP --></tbody>
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Reference in New Issue