[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha koha-tmpl/intranet-tmpl/default/en/reports... [rel_2_2]
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] koha koha-tmpl/intranet-tmpl/default/en/reports... [rel_2_2] |
Date: |
Mon, 19 Dec 2005 13:33:04 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: Henri-Damien LAURENT <address@hidden> 05/12/19 13:33:04
Modified files:
koha-tmpl/intranet-tmpl/default/en/reports: catalogue_out.tmpl
reports : catalogue_out.pl
Log message:
Bug Fixing.
Displaying more precise description, barcodes and not itemnumbers,
titles and authors...
......
Maybe could be good to group items on biblios, so that multiple items
for one biblio would not come out.... AND... not get a biblio that is not
issuable... Should we use biblios more than items ?????
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/reports/catalogue_out.tmpl.diff?only_with_tag=rel_2_2&tr1=1.1.2.1&tr2=1.1.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/catalogue_out.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.1&tr2=1.1.2.2&r1=text&r2=text
Patches:
Index: koha/koha-tmpl/intranet-tmpl/default/en/reports/catalogue_out.tmpl
diff -u
koha/koha-tmpl/intranet-tmpl/default/en/reports/catalogue_out.tmpl:1.1.2.1
koha/koha-tmpl/intranet-tmpl/default/en/reports/catalogue_out.tmpl:1.1.2.2
--- koha/koha-tmpl/intranet-tmpl/default/en/reports/catalogue_out.tmpl:1.1.2.1
Thu Apr 7 10:17:45 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/reports/catalogue_out.tmpl Mon Dec
19 13:33:04 2005
@@ -13,7 +13,7 @@
<br>
<table>
<tr >
- <th class="reports">Num/Items</th>
+ <th class="reports">Barcode/Titles</th>
<!-- TMPL_LOOP NAME="loopcol" -->
<th class="reports"><!-- TMPL_VAR
NAME="coltitle" --></th>
<!-- /TMPL_LOOP -->
@@ -24,7 +24,9 @@
<!-- TMPL_VAR NAME="rowtitle"
--></td>
<!-- TMPL_LOOP NAME="loopcell"
-->
<!-- TMPL_IF
NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td ><!-- /TMPL_IF
-->
- <!-- TMPL_IF
NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
+ <!-- TMPL_IF
NAME="title" --><b><!-- TMPL_VAR NAME="title" --></b><!-- /TMPL_IF -->
+ <!-- TMPL_IF
NAME="author" --><!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF -->
+ <!-- TMPL_IF
NAME="barcode" --> <i><!-- TMPL_VAR NAME="barcode" --></i><!-- /TMPL_IF -->
</td>
<!-- /TMPL_LOOP -->
</tr>
@@ -70,13 +72,29 @@
<td> </td>
<td> </td>
<td>Branch</td>
- <td><input type="text" name="Filter"
value=""></td>
+ <td>
+ <select name="Filter">
+ <option value="">All
branches</option>
+ <!-- TMPL_LOOP
name="branchloop" -->
+ <option value="<!--
TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!--
/TMPL_IF -->><!-- TMPL_VAR name
+ ="branchname" --></option>
+ <!-- /TMPL_LOOP -->
+ </select>
+ </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>Document Type</td>
- <td><input type="text" name="Filter"
value=""></td>
+ <td>
+ <select name="Filter">
+ <option value="">All Item
Types</option>
+ <!-- TMPL_LOOP
name="itemtypeloop" -->
+ <option value="<!--
TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!--
/TMPL_IF -->><!-- TMPL_VAR name
+ ="description" --></option>
+ <!-- /TMPL_LOOP -->
+ </select>
+ </td>
</tr>
</tbody>
</table>
Index: koha/reports/catalogue_out.pl
diff -u koha/reports/catalogue_out.pl:1.1.2.1
koha/reports/catalogue_out.pl:1.1.2.2
--- koha/reports/catalogue_out.pl:1.1.2.1 Thu Apr 7 12:06:05 2005
+++ koha/reports/catalogue_out.pl Mon Dec 19 13:33:04 2005
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: catalogue_out.pl,v 1.1.2.1 2005/04/07 12:06:05 tipaul Exp $
+# $Id: catalogue_out.pl,v 1.1.2.2 2005/12/19 13:33:04 hdl Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -132,10 +132,35 @@
-values => address@hidden,
-size => 1,
-multiple => 0 );
+ #doctype
+ my $itemtypes = getitemtypes;
+ my @itemtypeloop;
+ foreach my $thisitemtype (keys %$itemtypes) {
+# my $selected = 1 if $thisbranch eq $branch;
+ my %row =(value => $thisitemtype,
+#
selected => $selected,
+
description => $itemtypes->{$thisitemtype}->{'description'},
+ );
+ push @itemtypeloop, \%row;
+ }
+
+ #branch
+ my $branches = getallbranches;
+ my @branchloop;
+ foreach my $thisbranch (keys %$branches) {
+# my $selected = 1 if $thisbranch eq $branch;
+ my %row =(value => $thisbranch,
+#
selected => $selected,
+
branchname => $branches->{$thisbranch}->{'branchname'},
+ );
+ push @branchloop, \%row;
+ }
$template->param(
CGIextChoice => $CGIextChoice,
- CGIsepChoice => $CGIsepChoice
+ CGIsepChoice => $CGIsepChoice,
+ itemtypeloop =>address@hidden,
+ branchloop =>address@hidden,
);
output_html_with_http_headers $input, $cookie, $template->output;
}
@@ -231,9 +256,9 @@
my $strcalc ;
# Processing average loanperiods
- $strcalc .= "SELECT CONCAT( items.itemnumber, \"
\",biblioitems.biblioitemnumber)";
+ $strcalc .= "SELECT items.barcode, biblio.title, biblio.biblionumber,
biblio.author";
$strcalc .= " , $colfield " if ($colfield);
- $strcalc .= " FROM (items LEFT JOIN biblioitems ON
biblioitems.biblioitemnumber = items.biblioitemnumber) LEFT JOIN issues ON
issues.itemnumber=items.itemnumber WHERE issues.itemnumber is null";
+ $strcalc .= " FROM (items LEFT JOIN biblioitems ON
biblioitems.biblioitemnumber = items.biblioitemnumber LEFT JOIN biblio ON
biblio.biblionumber=items.biblionumber) LEFT JOIN issues ON
issues.itemnumber=items.itemnumber WHERE issues.itemnumber is null";
# @$filters[0]=~ s/\*/%/g if (@$filters[0]);
# $strcalc .= " AND issues.timestamp <= '" . @$filters[0] ."'" if (
@$filters[0] );
# @$filters[1]=~ s/\*/%/g if (@$filters[1]);
@@ -263,10 +288,13 @@
my $previous_col;
my $i=1;
while (my @data = $dbcalc->fetchrow) {
- my ($row, $col )address@hidden;
+ my ($barcode,$title,$bibnum,$author, $col )address@hidden;
$col = "zzEMPTY" if ($col eq undef);
$i=1 if (($previous_col) and not($col eq $previous_col));
- $table[$i]->{$col}=$row;
+ $table[$i]->{$col}->{'barcode'}=$barcode;
+ $table[$i]->{$col}->{'title'}=$title;
+ $table[$i]->{$col}->{'bibnum'}=$bibnum;
+ $table[$i]->{$col}->{'author'}=$author;
# warn " ".$i." ".$col. " ".$row;
$i++;
$previous_col=$col;
@@ -281,13 +309,19 @@
# and the number matches the number of columns
my $colcount=0;
foreach my $col ( @loopcol ) {
- my $value;
+ my ($barcode, $author, $title, $bibnum);
if (@loopcol){
- $value =$table[$i]->{(($col->{coltitle} eq
"NULL") or ($col->{coltitle} eq "Global"))?"zzEMPTY":$col->{coltitle}};
+ $barcode =$table[$i]->{(($col->{coltitle} eq
"NULL") or ($col->{coltitle} eq
"Global"))?"zzEMPTY":$col->{coltitle}}->{'barcode'};
+ $title =$table[$i]->{(($col->{coltitle} eq
"NULL") or ($col->{coltitle} eq
"Global"))?"zzEMPTY":$col->{coltitle}}->{'title'};
+ $author =$table[$i]->{(($col->{coltitle} eq
"NULL") or ($col->{coltitle} eq
"Global"))?"zzEMPTY":$col->{coltitle}}->{'author'};
+ $bibnum =$table[$i]->{(($col->{coltitle} eq
"NULL") or ($col->{coltitle} eq
"Global"))?"zzEMPTY":$col->{coltitle}}->{'bibnum'};
} else {
- $value =$table[$i]->{"zzEMPTY"};
+ $barcode =$table[$i]->{"zzEMPTY"}->{'barcode'};
+ $title =$table[$i]->{"zzEMPTY"}->{'title'};
+ $author =$table[$i]->{"zzEMPTY"}->{'author'};
+ $bibnum =$table[$i]->{"zzEMPTY"}->{'bibnum'};
}
- push @loopcell, {value => $value} ;
+ push @loopcell, {author=> $author,
title=>$title,bibnum=>$bibnum,barcode=>$barcode} ;
}
push @looprow,{ 'rowtitle' => $i ,
'loopcell' => address@hidden,