[Koha-patches] [PATCH] Interface improvements to Holds Queue report and changes to the script provided by jmf
Owen Leonard
oleonard at myacpl.org
Tue May 20 21:27:55 CEST 2008
---
.../prog/en/modules/circ/view_holdsqueue.tmpl | 17 +++++++++--------
misc/cronjobs/holds/build_holds_queue.pl | 13 +++++++------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl
index 9a0d581..1688320 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl
@@ -18,13 +18,13 @@
<!-- TMPL_IF NAME="run_report" -->
-<div class="results">
+
<!-- TMPL_IF NAME="total" -->
- <!-- TMPL_VAR NAME="total" --> items found for <!-- TMPL_VAR NAME="branch" -->
+ <div class="results"><!-- TMPL_VAR NAME="total" --> items found for <!-- TMPL_VAR NAME="branch" --></div>
<!-- TMPL_ELSE-->
- No items found
+ <div class="dialog message">No items found.</div>
<!-- /TMPL_IF -->
-</div>
+
<!-- TMPL_IF NAME="itemsloop" --><table>
<tr>
@@ -53,10 +53,12 @@
<!-- /TMPL_LOOP -->
</table>
<!-- /TMPL_IF -->
- <!-- TMPL_ELSE -->
+ <!-- /TMPL_IF -->
+<!-- TMPL_UNLESS NAME="total" -->
<form name="f" action="/cgi-bin/koha/circ/view_holdsqueue.pl" method="post">
-
+ <fieldset class="rows">
+ <ol>
<li><label for="branchlimit">Library: </label><select name="branchlimit" id="branchlimit">
<option value="">All</option>
<!-- TMPL_LOOP name="branchloop" -->
@@ -81,8 +83,7 @@
<fieldset class="action"> <input type="submit" value="Submit" />
<input type="hidden" name="run_report" value="1" /></fieldset>
</form>
-
- <!-- /TMPL_IF -->
+ <!-- /TMPL_UNLESS -->
</div>
</div>
diff --git a/misc/cronjobs/holds/build_holds_queue.pl b/misc/cronjobs/holds/build_holds_queue.pl
index 800ae69..03a275f 100755
--- a/misc/cronjobs/holds/build_holds_queue.pl
+++ b/misc/cronjobs/holds/build_holds_queue.pl
@@ -23,14 +23,15 @@ my $branches = GetBranches();
# obtain the ranked list of weights for the case of static weighting
my $syspref = C4::Context->preference("StaticHoldsQueueWeight");
my @branch_loop;
- at branch_loop = split(/,/, $syspref) if $syspref;
+#@branch_loop = split(/,/, $syspref) if $syspref;
# TODO: Add Randomization Option
# If no syspref is set, use system-order to determine priority
unless ($syspref) {
for my $branch_hash (sort keys %$branches) {
- push @branch_loop, {value => "$branch_hash" , branchname => $branches->{$branch_hash}->{'branchname'}, };
+ push @branch_loop, $branch_hash;
+ #{value => "$branch_hash" , branchname => $branches->{$branch_hash}->{'branchname'}, };
}
}
@@ -101,21 +102,21 @@ while (my $data=$sth->fetchrow_hashref){
# Item is not notforloan
(!$itm->{"notforloan"}) ) ) {
- #warn "patron requested pickup at $pickbranch for item in ".$itm->{'holdingbranch'};
+ warn "patron requested pickup at $pickbranch for item in ".$itm->{'holdingbranch'};
# This selects items for fulfilment, and weights them based on
# a static list
my $weight=0;
# always prefer a direct match
if ($itm->{'holdingbranch'} eq $pickbranch) {
- #warn "Found match in pickuplibrary";
+ warn "Found match in pickuplibrary";
$itemorder[$weight]=$itm;
}
else {
for my $branchcode (@branch_loop) {
$weight++;
if ($itm->{'homebranch'} eq $branchcode) {
- #warn "Match found with weight $weight in ".$branchcode;
+ warn "Match found with weight $weight in ".$branchcode;
$itemorder[$weight]=$itm;
}
}
@@ -123,7 +124,7 @@ while (my $data=$sth->fetchrow_hashref){
}
}
my $count = @itemorder;
- #warn "Empty array" if $count<1;
+ warn "Empty array" if $count<1;
next GETIT if $count<1; # if the re-ordered array is empty, skip to next
PREP:
--
1.5.5.GIT
More information about the Koha-patches
mailing list