[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha detail.pl,1.8,1.9 moredetail.pl,1.6,1.7
From: |
Gynn Lomax |
Subject: |
[Koha-cvs] CVS: koha detail.pl,1.8,1.9 moredetail.pl,1.6,1.7 |
Date: |
Wed, 22 May 2002 11:35:27 -0700 |
Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv2531
Modified Files:
detail.pl moredetail.pl
Log Message:
Update to acqui.simple system. Hopefully this is a lot more user friendly.
Probably a few bug fixes to come still.
Index: detail.pl
===================================================================
RCS file: /cvsroot/koha/koha/detail.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** detail.pl 15 May 2002 07:40:45 -0000 1.8
--- detail.pl 22 May 2002 18:35:25 -0000 1.9
***************
*** 1,343 ****
#!/usr/bin/perl
!
! #script to display detailed information
! #written 8/11/99
!
use strict;
! use C4::Search;
use CGI;
! use C4::Output;
- my $input = new CGI;
- my $type = $input->param('type');
- my $bib = $input->param('bib');
- my @items = &ItemInfo(undef, $bib, $type);
- my @temp = split('\t', $items[0]);
- my $count = @items;
- my $dat = &bibdata($bib);
- my ($websitecount, @websites) = &getwebsites($bib);
- my ($authorcount, $addauthor) = &addauthor($bib);
- my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($bib);
- my $additional = $addauthor->[0]->{'author'};
- my $main;
- my $secondary;
- my $colour;
-
-
- if ($type eq '') {
- $type = 'opac';
- } # if
-
- # setup colours
- if ($type eq 'opac') {
- $main = '#99cccc';
- $secondary = '#efe5ef';
- } else {
- $main = '#cccc99';
- $secondary = '#ffffcc';
- } # else
- $colour = $secondary;
! for (my $i = 1; $i < $authorcount; $i++) {
! $additional .= "|" . $addauthor->[$i]->{'author'};
! } # for
- print $input->header;
- print startpage();
- print startmenu($type);
-
- if ($type ne 'opac'){
- print << "EOF";
- <a href=request.pl?bib=$bib><img height=42 WIDTH=120 BORDER="0"
src=\"/images/requests.gif\" align="right" border="0"></a>
- EOF
- } # if
-
- if ($type eq 'catmain'){
- print mkheadr(3,"Catalogue Maintenance");
- } # if
-
- if ($dat->{'author'} ne ''){
- print mkheadr(3,"$dat->{'title'} ($dat->{'author'}) $temp[4]");
- } else {
- print mkheadr(3,"$dat->{'title'} $temp[4]");
- } # if
-
- print << "EOF";
- <table cellspacing="0" callpadding="5" border="1" align="left" width="220">
- <!-----------------BIBLIO RECORD TABLE--------->
- <tr valign="top">
- EOF
-
- if ($type ne 'opac') {
- print << "EOF";
- <td bgcolor="$main" background="/images/background-mem.gif">
- EOF
- } else {
- print << "EOF";
- <td bgcolor="$main">
- EOF
- } # else
-
- print << "EOF";
- <b>BIBLIO RECORD</b>
- EOF
! if ($type ne 'opac') {
! print "$bib";
}
! print << "EOF";
! </td>
! </tr>
! <tr valign="top">
! <td>
! EOF
!
! if ($type ne 'opac') {
! print << "EOF";
! <form action="/cgi-bin/koha/modbib.pl" method="post">
! <input type="hidden" name="bibnum" value="$bib">
! <input type="image" name="submit" value="modify" height="42" width="93"
border="0" src="/images/modify-mem.gif">
! <input type="image" name="delete" value="delete" height="42" width="93"
border="0" src="/images/delete-mem.gif">
! </form>
! EOF
! } # if
!
! print << "EOF";
! <br>
! <FONT SIZE=2 face="arial, helvetica">
! EOF
!
!
! if ($type ne 'opac') {
! print << "EOF";
! <b>Subtitle:</b> $dat->{'subtitle'}<br>
! <b>Author:</b> $dat->{'author'}<br>
! <b>Additional Author:</b> $additional<br>
! <b>Series Title:</b> $dat->{'seriestitle'}<br>
! <b>Subject:</b> $dat->{'subject'}<br>
! <b>Copyright:</b> $dat->{'copyrightdate'}<br>
! <b>Notes:</b> $dat->{'notes'}<br>
! <b>Unititle:</b> $dat->{'unititle'}<br>
! <b>Analytical Author:</b> <br>
! <b>Analytical Title:</b> <br>
! <b>Serial:</b> $dat->{'serial'}<br>
! <b>Total Number of Items:</b> $count
! <p>
! EOF
!
! } else {
! if ($dat->{'subtitle'} ne ''){
! print "<b>Subtitle:</b> $dat->{'subtitle'}<br>";
! } # if
! if ($dat->{'author'} ne ''){
! print "<b>Author:</b> $dat->{'author'}<br>";
! } # if
!
! # Additional Author: <br>
! if ($dat->{'seriestitle'} ne '') {
! print "<b>Seriestitle:</b> $dat->{'seriestitle'}<br>";
! } # if
! if ($dat->{'subject'} ne '') {
! print "<b>Subject:</b> $dat->{'subject'}<br>";
! } # if
! if ($dat->{'copyrightdate'} ne '') {
! print "<b>Copyright:</b> $dat->{'copyrightdate'}<br>";
! } # if
! if ($dat->{'notes'} ne '') {
! print "<b>Notes:</b> $dat->{'notes'}<br>";
! } # if
! if ($dat->{'unititle'} ne '') {
! print "<b>Unititle:</b> $dat->{'unititle'}<br>";
! } # if
!
! # Analytical Author: <br>
! # Analytical Title: <br>
! if ($dat->{'serial'} ne '0') {
! print "<b>Serial:</b> Yes<br>";
! } # if
!
! print << "EOF";
! <b>Total Number of Items:</b> $count
! <p>
! EOF
!
! } # if
!
! print << "EOF";
! </font></td>
! </tr>
! </table>
!
! <img src="/images/holder.gif" width="16" height="300" align="left">
! EOF
!
! print center();
! print mktablehdr;
!
! if ($type eq 'opac') {
! print mktablerow(6,$main,'Item Type','Class','Branch','Date Due','Last
Seen');
! } else {
! print mktablerow(7,$main,'Itemtype','Class','Location','Date Due','Last
Seen','Barcode',"","/images/background-mem.gif");
! } # else
!
! $colour = 'white';
! for (my $i = 0; $i < $count; $i ++) {
!
! my @results = split('\t', $items[$i]);
!
! if ($type ne 'opac') {
! $results[1] =
mklink("/cgi-bin/koha/moredetail.pl?item=$results[5]&bib=$bib&bi=$results[8]&type=$type",$results[1]);
! } # if
!
! if ($results[2] eq '') {
! $results[2] = 'Available';
! } # if
!
! if ($type eq 'catmain'){
! $results[10] =
mklink("/cgi-bin/koha/maint/catmaintain.pl?type=fixitemtype&bi=$results[8]&item=$results[6]","Fix
Itemtype");
! } # if
!
! if ($type ne 'opac'){
! if ($type eq 'catmain'){
! print
mktablerow(8,$colour,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9],$results[10]);
! } else {
! print
mktablerow(7,$colour,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9]);
! } # else
! } else {
! $results[6] = ItemType($results[6]);
! print
mktablerow(6,$colour,$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]);
! } # else
!
! if ($colour eq $secondary) {
! $colour = 'white';
! } else {
! $colour = $secondary;
! } # else
! } # for
! for (my $i = 0; $i < $webbiblioitemcount; $i++) {
! if ($type eq 'opac') {
! $webbiblioitems[$i]->{'url'} =~ s/^http:\/\///;
! print mktablerow(6, $colour, 'Website', 'WEB', 'Online', 'Available',
"http://$webbiblioitems[$i]->{'url'}");
! } else {
! $webbiblioitems[$i]->{'url'} =~ s/^http:\/\///;
! print mktablerow(7, $colour, 'WEB', '', 'Online', 'Available', "", "<a
href='moredetail.pl?bib=$bib&bi=$webbiblioitems[$i]->{'biblioitemnumber'}&type=$type'>http://$webbiblioitems[$i]->{'url'}</a>");
! } # else
} # for
! print mktableft();
! print "<p>";
! print mktablehdr();
!
! if ($type ne 'opac') {
! print << "EOF";
! <tr valign="top">
! <td bgcolor="99cc33" background="/images/background-mem.gif"
colspan="2"><p><b>HELP</b><br>
! <b>Update Biblio for all Items:</b> Click on the <b>Modify</b> button [left]
to amend the biblio. Any changes you make will update the record for
<b>all</b> the items listed above. <p>
! <b>Updating the Biblio for only ONE or SOME Items:</b>
! EOF
!
! if ($type eq 'catmain') {
! print << "EOF";
! If some of the items listed above need a different biblio,
! you need to click on the wrong item, then shift the group it belongs to, to
the correct biblio.
! You will need to know the correct biblio number
! <p />
! </tr>
! EOF
!
! } else {
! print << "EOF";
! If some of the items listed above need a different biblio, or are on the
wrong biblio, you must use the <a href="/acquisitions/">acquisitions</a>
process to fix this. You will need to "re-order" the items, and delete them
from this biblio.
! <p />
! </tr>
! EOF
!
! } # else
! } # if
!
! print mktableft();
! print endcenter();
! print << "EOF";
! <br clear=all>
! <p />
! EOF
!
! if ($type ne 'opac') {
! print << "EOF";
! <table border="1" cellspacing="0" cellpadding="5" width="90%">
! <tr valign="top">
! <td bgcolor="$main"
background="/images/background-mem.gif"><b>Abstract</b></td>
! </tr>
! <tr valign="top">
! <td>$dat->{'abstract'}</td>
! </tr>
! </table>
! <p />
! <table border="1" cellspacing="0" cellpadding="5" width="90%">
! <tr valign="top">
! <td bgcolor="$main" background="/images/background-mem.gif"><b>Links to
Associated Websites<b></td>
! </tr>
! EOF
!
! for (my $i = 0; $i < $websitecount; $i++) {
! $websites[$i]->{'url'} =~ s/^http:\/\///;
! print << "EOF";
! <tr>
! <td><b>Title:</b> $websites[$i]->{'title'}<br>
! <b>Description:</b> $websites[$i]->{'description'}<br>
! <b>URL:</b> http://$websites[$i]->{'url'}<br>
! </td>
! </tr>
! EOF
! } # for
!
! print << "EOF";
! </table>
! EOF
! } else {
! if ($dat->{'abstract'} ne '') {
! print << "EOF";
! <table border="1" cellspacing="0" cellpadding="5" width="90%">
! <tr valign="top">
! <td bgcolor="$main"><b>Abstract</b></td>
! </tr>
! <tr valign="top">
! <td>$dat->{'abstract'}</td>
! </tr>
! </table>
! <p />
! EOF
! } # if
! if ($websitecount) {
! print << "EOF";
! <table border="1" cellspacing="0" cellpadding="5" width="90%">
! <tr valign="top">
! <td bgcolor="$main" background="/images/background-mem.gif"><b>Link to
Associated Websites</b></td>
! </tr>
! EOF
!
! for (my $i = 0; $i < $websitecount; $i++) {
! $websites[$i]->{'url'} =~ s/^http:\/\///;
! print << "EOF";
! <tr>
! <td><b>Title:</b> $websites[$i]->{'title'}<br>
! <b>Description:</b> $websites[$i]->{'description'}<br>
! <b>URL:</b> http://$websites[$i]->{'url'}<br>
! </td>
! </tr>
! EOF
! } # for
!
! print << "EOF";
! </table>
! EOF
! } # if
! } # else
- print endmenu($type);
- print endpage();
--- 1,88 ----
#!/usr/bin/perl
! use HTML::Template;
use strict;
! require Exporter;
! use C4::Database;
! use C4::Output; # contains picktemplate
use CGI;
! use C4::Search;
!
! my $query=new CGI;
! my $language='french';
! my %configfile;
! open (KC, "/etc/koha.conf");
! while (<KC>) {
! chomp;
! (next) if (/^\s*#/);
! if (/(.*)\s*=\s*(.*)/) {
! my $variable=$1;
! my $value=$2;
! # Clean up white space at beginning and end
! $variable=~s/^\s*//g;
! $variable=~s/\s*$//g;
! $value=~s/^\s*//g;
! $value=~s/\s*$//g;
! $configfile{$variable}=$value;
! }
}
! my $biblionumber=$query->param('bib');
! my $type='intra';
! # change back when ive fixed request.pl
! my @items = ItemInfo(undef, $biblionumber, $type);
! my $dat=bibdata($biblionumber);
! my ($authorcount, $addauthor)= &addauthor($biblionumber);
! my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
! my ($websitecount, @websites) = &getwebsites($biblionumber);
+ $dat->{'count'address@hidden;
! $dat->{'additional'}=$addauthor->[0]->{'author'};
! for (my $i = 1; $i < $authorcount; $i++) {
! $dat->{'additional'} .= "|" . $addauthor->[$i]->{'author'};
} # for
+ my @results;
+
+ $results[0]=$dat;
! my address@hidden;
! my address@hidden;
! my address@hidden;
! my address@hidden;
!
! my $includes=$configfile{'includes'};
! ($includes) || ($includes="/usr/local/www/hdl/htdocs/includes");
! my $templatebase="catalogue/detail.tmpl";
! my $startfrom=$query->param('startfrom');
! ($startfrom) || ($startfrom=0);
! my $theme=picktemplate($includes, $templatebase);
!
! my $template = HTML::Template->new(filename =>
"$includes/templates/$theme/$templatebase", die_on_bad_params => 0, path =>
[$includes]);
!
! my $count=1;
!
! # now to get the items into a hash we can use and whack that thru
!
!
! $template->param(startfrom => $startfrom+1);
! $template->param(endat => $startfrom+20);
! $template->param(numrecords => $count);
! my $nextstartfrom=($startfrom+20<$count-20) ? ($startfrom+20) : ($count-20);
! my $prevstartfrom=($startfrom-20>0) ? ($startfrom-20) : (0);
! $template->param(nextstartfrom => $nextstartfrom);
! $template->param(prevstartfrom => $prevstartfrom);
! # $template->param(template => $templatename);
! # $template->param(search => $search);
! $template->param(includesdir => $includes);
! $template->param(BIBLIO_RESULTS => $resultsarray);
! $template->param(ITEM_RESULTS => $itemsarray);
! $template->param(WEB_RESULTS => $webarray);
! $template->param(SITE_RESULTS => $sitearray);
! print "Content-Type: text/html\n\n", $template->output;
Index: moredetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/moredetail.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** moredetail.pl 12 May 2002 18:08:19 -0000 1.6
--- moredetail.pl 22 May 2002 18:35:25 -0000 1.7
***************
*** 1,199 ****
#!/usr/bin/perl
!
! #script to display detailed information
! #written 8/11/99
!
use strict;
! use C4::Search;
use C4::Koha;
- use C4::Output;
- use C4::Acquisitions;
use CGI;
- my $input = new CGI;
- my $type=$input->param('type');
-
- print $input->header;
-
- # setup colours
- my $main;
- my $secondary;
- if ($type eq 'opac'){
- $main='#99cccc';
- $secondary='#efe5ef';
- } else {
- $main='#cccc99';
- $secondary='#ffffcc';
- }
- print startpage();
- print startmenu($type);
- my $blah;
-
- my $bib=$input->param('bib');
- my $title=$input->param('title');
- my $bi=$input->param('bi');
my $data=bibitemdata($bi);
!
! my (@items)=itemissues($bi);
! my ($order,$ordernum)=getorder($bi,$bib);
! #print @items;
! my address@hidden;
!
! my $i=0;
! print center();
!
! my $dewey = $data->{'dewey'};
! $dewey =~ s/0+$//;
! if ($dewey eq "000.") { $dewey = "";};
! if ($dewey < 10){$dewey='00'.$dewey;}
! if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
if ($dewey <= 0){
! $dewey='';
! }
! $dewey=~ s/\.$//;
! print <<printend
! <br>
! <a href=/cgi-bin/koha/request.pl?bib=$bib><img src=/images/requests.gif
width=120 height=42 border=0 align=right border=0></a>
! printend
! ;
! if ($type eq 'catmain'){
! print "<FONT SIZE=6><em>Catalogue Maintenance</em></FONT><br>";
! }
! print <<printend
! <FONT SIZE=6><em><a
href=/cgi-bin/koha/detail.pl?bib=$bib&type=intra>$data->{'title'}
($data->{'author'})</a></em></FONT><P>
! <p>
! <form action=/cgi-bin/koha/modbibitem.pl>
! <input type=hidden name=bibitem value=$bi>
! <input type=hidden name=biblio value=$bib>
! <!-------------------BIBLIO ITEM------------>
! <TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left>
! <TR VALIGN=TOP>
! <td bgcolor="99cc33" background="/images/background-mem.gif"
><B>$data->{'biblioitemnumber'} GROUP - $data->{'description'} </b> </TD>
! </TR>
! <tr VALIGN=TOP >
! <TD width=210 >
! <INPUT TYPE="image" name="submit" VALUE="modify" height=42 WIDTH=93
BORDER=0 src="/images/modify-mem.gif">
! <INPUT TYPE="image" name="delete" VALUE="delete" height=42 WIDTH=93
BORDER=0 src="/images/delete-mem.gif">
! <br>
! <FONT SIZE=2 face="arial, helvetica">
! <b>Biblionumber:</b> $bib<br>
! <b>Item Type:</b> $data->{'itemtype'}<br>
! <b>URL:</b> $data->{'url'}<br>
! <b>Loan Length:</b> $data->{'loanlength'}<br>
! <b>Rental Charge:</b> $data->{'rentalcharge'}<br>
! <b>Classification:</b> $data->{'classification'}$dewey$data->{'subclass'}<br>
! <b>ISBN:</b> $data->{'isbn'}<br>
! <b>Publisher:</b> $data->{'publishercode'} <br>
! <b>Place:</b> $data->{'place'}<br>
! <b>Date:</b> $data->{'publicationyear'}<br>
! <b>Volume:</b> $data->{'volumeddesc'}<br>
! <b>Pages:</b> $data->{'pages'}<br>
! <b>Illus:</b> $data->{'illus'}<br>
! <b>Size:</b> $data->{'size'}<br>
! <b>Notes:</b> $data->{'bnotes'}<br>
! <b>No. of Items:</b> $count
!
! printend
! ;
! if ($type eq 'catmain'){
! print "<br><a
href=/cgi-bin/koha/maint/shiftbib.pl?bi=$data->{'biblioitemnumber'}&bib=$data->{'biblionumber'}>Shift
to another biblio</a>";
!
! }
! print <<printend
!
! </font>
! </TD>
! </tr>
! </table>
! </form>
! printend
! ;
!
! for (my $i=0;$i<$count;$i++){
! print <<printend
! <img src="/images/holder.gif" width=16 height=300 align=left>
! <TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left width=220 >
! <TR VALIGN=TOP>
! <td bgcolor="99cc33" background="/images/background-mem.gif"><B>BARCODE
$items[$i]->{'barcode'}</b></TD>
! </TR>
! <tr VALIGN=TOP >
! <TD width=220 >
! <form action=/cgi-bin/koha/moditem.pl method=post>
! <input type=hidden name=bibitem value=$bi>
! <input type=hidden name=item value=$items[$i]->{'itemnumber'}>
! <input type=hidden name=type value=$type>
! <INPUT TYPE="image" name="submit" VALUE="modify" height=42 WIDTH=93
BORDER=0 src="/images/modify-mem.gif">
! <INPUT TYPE="image" name="delete" VALUE="delete" height=42 WIDTH=93
BORDER=0 src="/images/delete-mem.gif">
! <br>
! printend
! ;
! $items[$i]->{'itemlost'}=~ s/0/No/;
! $items[$i]->{'itemlost'}=~ s/1/Yes/;
! $items[$i]->{'withdrawn'}=~ s/0/No/;
! $items[$i]->{'withdrawn'}=~ s/1/Yes/;
! $items[$i]->{'replacementprice'}+=0.00;
!
! my $year=substr($items[$i]->{'timestamp0'},0,4);
! my $mon=substr($items[$i]->{'timestamp0'},4,2);
! my $day=substr($items[$i]->{'timestamp0'},6,2);
! $items[$i]->{'timestamp0'}="$day/$mon/$year";
!
! $items[$i]->{'dateaccessioned'} =
slashifyDate($items[$i]->{'dateaccessioned'});
! $items[$i]->{'datelastseen'} = slashifyDate($items[$i]->{'datelastseen'});
!
! print <<printend
! <FONT SIZE=2 face="arial, helvetica">
! <b>Home Branch:</b> $items[$i]->{'homebranch'}<br>
! <b>Last seen:</b> $items[$i]->{'datelastseen'}<br>
! <b>Last borrowed:</b> $items[$i]->{'timestamp0'}<br>
! printend
! ;
! if ($items[$i] eq 'Available'){
! print "<b>Currently on issue to:</b><br>";
! } else {
! print "<b>Currently on issue to:</b> <a
href=/cgi-bin/koha/moremember.pl?bornum=$items[$i]->{'borrower0'}>$items[$i]->{'card'}</a><br>";
}
! print <<printend
! <b>Last Borrower 1:</b> $items[$i]->{'card0'}<br>
! <b>Last Borrower 2:</b> $items[$i]->{'card1'}<br>
! <b>Current Branch:</b> $items[$i]->{'holdingbranch'}<br>
! <b>Replacement Price:</b> $items[$i]->{'replacementprice'}<br>
! <b>Item lost:</b> $items[$i]->{'itemlost'}<br>
! <b>Paid for:</b> $items[$i]->{'paidfor'}<br>
! <b>Notes:</b> $items[$i]->{'itemnotes'}<br>
! <b>Renewals:</b> $items[$i]->{'renewals'}<br>
! <b><a
href=/cgi-bin/koha/acqui/acquire.pl?recieve=$ordernum&biblio=$bib&invoice=$order->{'booksellerinvoicenumber'}&catview=yes>Accession</a>
Date: $items[$i]->{'dateaccessioned'}<br>
! printend
! ;
! if ($items[$i]->{'wthdrawn'} eq '1'){
! $items[$i]->{'wthdrawn'}="Yes";
! } else {
! $items[$i]->{'wthdrawn'}="No";
! }
! print <<printend
! <b>Cancelled: $items[$i]->{'wthdrawn'}<br>
! <b><a
href=/cgi-bin/koha/bookcount.pl?&bib=$bib&bi=$bi&itm=$items[$i]->{'itemnumber'}>Total
Issues:</a></b> $items[$i]->{'issues'}<br>
! <b>Group Number:</b> $bi <br>
! <b>Biblio number:</b> $bib <br>
! </font>
! </TD>
! </tr>
! </table>
! </form>
! printend
! ;
! }
! print <<printend
! <p>
! </form>
! printend
! ;
! print endcenter();
- print endmenu($type);
- print endpage();
--- 1,102 ----
#!/usr/bin/perl
! use HTML::Template;
use strict;
! require Exporter;
use C4::Koha;
use CGI;
+ use C4::Search;
+ use C4::Acquisitions;
+ use C4::Output; # contains picktemplate
+
+ my $query=new CGI;
+
+
+ my $language='french';
+
+
+ my %configfile;
+ open (KC, "/etc/koha.conf");
+ while (<KC>) {
+ chomp;
+ (next) if (/^\s*#/);
+ if (/(.*)\s*=\s*(.*)/) {
+ my $variable=$1;
+ my $value=$2;
+ # Clean up white space at beginning and end
+ $variable=~s/^\s*//g;
+ $variable=~s/\s*$//g;
+ $value=~s/^\s*//g;
+ $value=~s/\s*$//g;
+ $configfile{$variable}=$value;
+ }
+ }
+
+ my $includes=$configfile{'includes'};
+ ($includes) || ($includes="/usr/local/www/hdl/htdocs/includes");
+ my $templatebase="catalogue/moredetail.tmpl";
+ my $startfrom=$query->param('startfrom');
+ ($startfrom) || ($startfrom=0);
+ my $theme=picktemplate($includes, $templatebase);
+
+ my $subject=$query->param('subject');
+ # if its a subject we need to use the subject.tmpl
+ if ($subject){
+ $templatebase=~ s/searchresults\.tmpl/subject\.tmpl/;
+ }
+ my $template = HTML::Template->new(filename =>
"$includes/templates/$theme/$templatebase", die_on_bad_params => 0, path =>
[$includes]);
+
+ # get variables
+
+ my $biblionumber=$query->param('bib');
+ my $title=$query->param('title');
+ my $bi=$query->param('bi');
my $data=bibitemdata($bi);
! my $dewey = $data->{'dewey'};
! $dewey =~ s/0+$//;
! if ($dewey eq "000.") { $dewey = "";};
! if ($dewey < 10){$dewey='00'.$dewey;}
! if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
if ($dewey <= 0){
! $dewey='';
}
! $dewey=~ s/\.$//;
! $data->{'dewey'}=$dewey;
+ my @results;
+ my (@items)=itemissues($bi);
+ my address@hidden;
+ $data->{'count'}=$count;
+ my ($order,$ordernum)=getorder($bi,$biblionumber);
! my $env;
! $env->{itemcount}=1;
+ $results[0]=$data;
! foreach my $item (@items){
! $item->{'itemlost'}=~ s/0/No/;
! $item->{'itemlost'}=~ s/1/Yes/;
! $item->{'withdrawn'}=~ s/0/No/;
! $item->{'withdrawn'}=~ s/1/Yes/;
! $item->{'replacementprice'}+=0.00;
! my $year=substr($item->{'timestamp0'},0,4);
! my $mon=substr($item->{'timestamp0'},4,2);
! my $day=substr($item->{'timestamp0'},6,2);
! $item->{'timestamp0'}="$day/$mon/$year";
! $item->{'dateaccessioned'} = slashifyDate($item->{'dateaccessioned'});
! $item->{'datelastseen'} = slashifyDate($item->{'datelastseen'});
! if ($item->{'date_due'} = 'Available'){
! $item->{'issue'}="<b>Currently on issue to:</b><br>";
! } else {
! $item->{'issue'}="<b>Currently on issue to:</b> <a
href=/cgi-bin/koha/moremember.pl?bornum=$item->{'borrower0'}>$item->{'card'}</a><br>";
! }
!
! }
!
! $template->param(includesdir => $includes);
! $template->param(BIBITEM_DATA => address@hidden);
! $template->param(ITEM_DATA => address@hidden);
! print "Content-Type: text/html\n\n", $template->output;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha detail.pl,1.8,1.9 moredetail.pl,1.6,1.7,
Gynn Lomax <=