Update of /cvsroot/koha/koha In directory usw-pr-cvs1:/tmp/cvs-serv25277 Modified Files: detail.pl Log Message: Bug fixes to get the new acqui.simple system working. Index: detail.pl =================================================================== RCS file: /cvsroot/koha/koha/detail.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** detail.pl 15 Mar 2001 10:17:33 -0000 1.3 --- detail.pl 3 May 2002 02:47:33 -0000 1.4 *************** *** 5,9 **** use strict; - #use DBI; use C4::Search; use CGI; --- 5,8 ---- *************** *** 11,53 **** my $input = new CGI; ! print $input->header; ! #whether it is called from the opac of the intranet ! my $type=$input->param('type'); ! if ($type eq ''){ ! $type='intra'; ! } ! #setup colours my $main; my $secondary; if ($type eq 'opac'){ ! $main='#99cccc'; ! $secondary='#efe5ef'; } else { ! $main='#cccc99'; ! $secondary='#ffffcc'; ! } print startpage(); print startmenu($type); - #print $type; - my $blah; - my $bib=$input->param('bib'); - my $title=$input->param('title'); - if ($type ne 'opac'){ - print "<a href=request.pl?bib=$bib><img height=42 WIDTH=120 BORDER=0 src=\"/images/requests.gif\" align=right border=0></a>"; - } - my @items=ItemInfo(\$blah,$bib,$type); - my $dat=bibdata($bib); - my $count=@items; - my ($count3,$addauthor)=addauthor($bib); - my $additional=$addauthor->[0]->{'author'}; - for (my $i=1;$i<$count3;$i++){ - $additional=$additional."|".$addauthor->[$i]->{'author'}; - } - my @temp=split('\t',$items[0]); if ($type eq 'catmain'){ print mkheadr(3,"Catalogue Maintenance"); ! } if ($dat->{'author'} ne ''){ print mkheadr(3,"$dat->{'title'} ($dat->{'author'}) $temp[4]"); --- 10,56 ---- my $input = new CGI; ! my $type = $input->param('type'); ! my $bib = $input->param('bib'); ! my $title = $input->param('title'); ! my @items = &ItemInfo(undef, $bib, $type); ! my $dat = &bibdata($bib); ! my $count = @items; ! my ($count3, $addauthor) = &addauthor($bib); ! my $additional = $addauthor->[0]->{'author'}; ! my @temp = split('\t', $items[0]); my $main; my $secondary; + + if ($type eq ''){ + $type = 'opac'; + } # if + + # setup colours if ($type eq 'opac'){ ! $main = '#99cccc'; ! $secondary = '#efe5ef'; } else { ! $main = '#cccc99'; ! $secondary = '#ffffcc'; ! } # else ! ! 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 + + for (my $i = 1; $i < $count3; $i++) { + $additional .= "|" . $addauthor->[$i]->{'author'}; + } # for if ($type eq 'catmain'){ print mkheadr(3,"Catalogue Maintenance"); ! } # if ! if ($dat->{'author'} ne ''){ print mkheadr(3,"$dat->{'title'} ($dat->{'author'}) $temp[4]"); *************** *** 55,59 **** print mkheadr(3,"$dat->{'title'} $temp[4]"); } ! print <<printend <TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left width="220"> --- 58,62 ---- print mkheadr(3,"$dat->{'title'} $temp[4]"); } ! print << "EOF"; <TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left width="220"> *************** *** 67,83 **** <td bgcolor="$main" ! printend ! ; if ($type ne 'opac'){ print "background=\"/images/background-mem.gif\""; } ! print <<printend
<B>BIBLIO RECORD ! printend ! ; if ($type ne 'opac'){ print "$bib"; } ! print <<printend </TD></TR>
--- 70,86 ---- <td bgcolor="$main" ! EOF ! if ($type ne 'opac'){ print "background=\"/images/background-mem.gif\""; } ! print << "EOF";
<B>BIBLIO RECORD ! EOF ! if ($type ne 'opac'){ print "$bib"; } ! print << "EOF"; </TD></TR>
*************** *** 85,103 **** <tr VALIGN=TOP > <TD> ! printend ! ; if ($type ne 'opac'){ print "<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\">"; } ! print <<printend <br> <FONT SIZE=2 face="arial, helvetica"> ! printend ! ; if ($type ne 'opac'){ ! print <<printend <b>Subtitle:</b> $dat->{'subtitle'}<br> <b>Author:</b> $dat->{'author'}<br> --- 88,105 ---- <tr VALIGN=TOP > <TD> ! EOF ! if ($type ne 'opac'){ print "<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\">"; } ! 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> *************** *** 113,118 **** <b>Total Number of Items:</b> $count <p> ! printend ! ; } else { --- 115,120 ---- <b>Total Number of Items:</b> $count <p> ! EOF ! } else { *************** *** 149,153 **** } ! print <<printend </form> </font></TD> --- 151,155 ---- } ! print << "EOF"; </form> </font></TD> *************** *** 156,165 **** </TABLE> <img src="/images/holder.gif" width=16 height=300 align=left> ! ! printend ! ; ! ! ! #print @items; my $i=0; --- 158,162 ---- </TABLE> <img src="/images/holder.gif" width=16 height=300 align=left> ! EOF my $i=0; *************** *** 174,179 **** my $colour=1; while ($i < $count){ ! # print $items[$i],"<br>"; ! 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]); --- 171,176 ---- my $colour=1; while ($i < $count){ ! ! 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]); *************** *** 217,229 **** print mktablehdr(); if ($type ne 'opac'){ ! print <<printend <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> ! printend ! ; if ($type eq 'catmain'){ ! print <<printend 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. --- 214,226 ---- 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. *************** *** 232,245 **** </TR> ! printend ! ; } else { ! print <<printend 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> ! printend ! ; } } --- 229,242 ---- </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 ! } }