From truth_nz@users.sourceforge.net Wed May 8 20:01:43 2002 From: Gynn Lomax To: koha-devel@lists.koha-community.org Subject: [Koha-devel] CVS: koha detail.pl,1.4,1.5 modbib.pl,1.1.1.1,1.2 updatebiblio.pl,1.1.1.1,1.2 Date: Wed, 08 May 2002 20:02:03 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0784573454463922685==" --===============0784573454463922685== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Update of /cvsroot/koha/koha In directory usw-pr-cvs1:/tmp/cvs-serv16527 Modified Files: detail.pl modbib.pl updatebiblio.pl=20 Log Message: Update to catalogue to allow change of biblio abstracts. Related modifications to acqui system to match changes in Acquisition.pm detail.pm changed to show abstract - still working on how to show url's Index: detail.pl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/koha/koha/detail.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** detail.pl 3 May 2002 02:47:33 -0000 1.4 --- detail.pl 9 May 2002 03:01:40 -0000 1.5 *************** *** 14,31 **** my $title =3D $input->param('title'); my @items =3D &ItemInfo(undef, $bib, $type); my $dat =3D &bibdata($bib); my $count =3D @items; ! my ($count3, $addauthor) =3D &addauthor($bib); my $additional =3D $addauthor->[0]->{'author'}; - my @temp =3D split('\t', $items[0]); my $main; my $secondary; =20 ! if ($type eq ''){ $type =3D 'opac'; } # if =20 # setup colours ! if ($type eq 'opac'){ $main =3D '#99cccc'; $secondary =3D '#efe5ef'; --- 14,33 ---- my $title =3D $input->param('title'); my @items =3D &ItemInfo(undef, $bib, $type); + my @temp =3D split('\t', $items[0]); my $dat =3D &bibdata($bib); my $count =3D @items; ! my ($authorcount, $addauthor) =3D &addauthor($bib); my $additional =3D $addauthor->[0]->{'author'}; my $main; my $secondary; + my $colour; =20 !=20 ! if ($type eq '') { $type =3D 'opac'; } # if =20 # setup colours ! if ($type eq 'opac') { $main =3D '#99cccc'; $secondary =3D '#efe5ef'; *************** *** 34,37 **** --- 36,44 ---- $secondary =3D '#ffffcc'; } # else + $colour =3D $secondary; +=20 + for (my $i =3D 1; $i < $authorcount; $i++) { + $additional .=3D "|" . $addauthor->[$i]->{'author'}; + } # for =20 print $input->header; *************** *** 41,52 **** if ($type ne 'opac'){ print << "EOF"; ! EOF } # if =20 - for (my $i =3D 1; $i < $count3; $i++) { - $additional .=3D "|" . $addauthor->[$i]->{'author'}; - } # for -=20 if ($type eq 'catmain'){ print mkheadr(3,"Catalogue Maintenance"); --- 48,55 ---- if ($type ne 'opac'){ print << "EOF"; ! EOF } # if =20 if ($type eq 'catmain'){ print mkheadr(3,"Catalogue Maintenance"); *************** *** 57,97 **** } else { print mkheadr(3,"$dat->{'title'} $temp[4]"); ! } ! print << "EOF"; !=20 ! =20 =20 !=20 ! ! ! !=20 ! =20 =20 ! ! ! EOF =20 ! } else { ! print << "EOF"; If some of the items listed above need a different biblio, or are on the wr= ong biblio, you must use the acquisitions proce= ss to fix this. You will need to "re-order" the items, and delete them from t= his biblio. !

!=20 ! EOF =20 ! } ! } print mktableft(); print endcenter(); ! print "
"; print endmenu($type); print endpage(); --- 126,292 ---- EOF =20 ! } else { ! if ($dat->{'subtitle'} ne ''){ ! print "Subtitle: $dat->{'subtitle'}
"; ! } # if ! if ($dat->{'author'} ne ''){ ! print "Author: $dat->{'author'}
"; ! } # if !=20 ! # Additional Author:
! if ($dat->{'seriestitle'} ne '') { ! print "Seriestitle: $dat->{'seriestitle'}
"; ! } # if ! if ($dat->{'subject'} ne '') { ! print "Subject: $dat->{'subject'}
"; ! } # if ! if ($dat->{'copyrightdate'} ne '') { ! print "Copyright: $dat->{'copyrightdate'}
"; ! } # if ! if ($dat->{'notes'} ne '') { ! print "Notes: $dat->{'notes'}
"; ! } # if ! if ($dat->{'unititle'} ne '') { ! print "Unititle: $dat->{'unititle'}
"; ! } # if !=20 ! # Analytical Author:
! # Analytical Title:
! if ($dat->{'serial'} ne '0') { ! print "Serial: Yes
"; ! } # if !=20 ! print << "EOF"; ! Total Number of Items: $count

! EOF !=20 ! } # if =20 print << "EOF"; ! ! !

BIBLIO RECORD=20 EOF =20 ! if ($type ne 'opac'){ print "$bib"; } - print << "EOF"; -
EOF =20 - if ($type ne 'opac'){ - print "=20 - "; - } print << "EOF";
--- 60,106 ---- } else { print mkheadr(3,"$dat->{'title'} $temp[4]"); ! } # if =20 + print << "EOF"; + + + EOF =20 ! if ($type ne 'opac') { ! print << "EOF"; ! + + + ! =20 !
EOF + } else { + print << "EOF"; + + EOF + } # else =20 print << "EOF"; ! BIBLIO RECORD EOF =20 ! if ($type ne 'opac') { print "$bib"; } =20 + print << "EOF"; +
+ EOF =20 ! if ($type ne 'opac') { ! print << "EOF"; ! ! ! =20 ! ! EOF + } # if =20 print << "EOF";
*************** *** 100,105 **** =20 =20 ! if ($type ne 'opac'){ ! print << "EOF"; Subtitle: $dat->{'subtitle'}
Author: $dat->{'author'}
--- 109,114 ---- =20 =20 ! if ($type ne 'opac') { ! print << "EOF"; Subtitle: $dat->{'subtitle'}
Author: $dat->{'author'}
*************** *** 117,247 **** EOF =20 ! } ! else { ! if ($dat->{'subtitle'} ne ''){ ! print "Subtitle: $dat->{'subtitle'}
"; ! } ! if ($dat->{'author'} ne ''){ ! print "Author: $dat->{'author'}
"; ! } ! #Additional Author:
! if ($dat->{'seriestitle'} ne ''){ ! print "Seriestitle: $dat->{'seriestitle'}
"; ! } ! if ($dat->{'subject'} ne ''){ ! print "Subject: $dat->{'subject'}
"; ! } ! if ($dat->{'copyrightdate'} ne ''){ ! print "Copyright: $dat->{'copyrightdate'}
"; ! } ! if ($dat->{'notes'} ne ''){ ! print "Notes: $dat->{'notes'}
"; ! } ! if ($dat->{'unititle'} ne ''){ ! print "Unititle: $dat->{'unititle'}
"; ! } ! #Analytical Author:
! #Analytical Title:
! if ($dat->{'serial'} ne '0'){ ! print "Serial: Yes
"; ! } ! print "Total Number of Items: $count

! "; =20 - } print << "EOF"; ! !

! EOF =20 - my $i=3D0; print center(); print mktablehdr; - if ($type eq 'opac'){ =20 ! print mktablerow(6,$main,'Item Type','Class','Branch','Date Due','Last Se= en');=20 } else { ! print mktablerow(6,$main,'Itemtype','Class','Location','Date Due','Last S= een','Barcode',"/images/background-mem.gif");=20 ! } ! my $colour=3D1; ! while ($i < $count){ =20 - my @results =3D split('\t', $items[$i]); - if ($type ne 'opac'){ - $results[1]=3Dmklink("/cgi-bin/koha/moredetail.pl?item=3D$results[5]&bi= b=3D$bib&bi=3D$results[8]&type=3D$type",$results[1]); - } - if ($results[2] eq ''){ - $results[2]=3D'Available'; - } - if ($type eq 'catmain'){ - $results[10]=3Dmklink("/cgi-bin/koha/maint/catmaintain.pl?type=3Dfixite= mtype&bi=3D$results[8]&item=3D$results[6]","Fix Itemtype"); - } - if ($colour =3D=3D 1){ if ($type ne 'opac'){ ! if ($type eq 'catmain'){ ! print mktablerow(8,$secondary,$results[6],$results[4],$results[3],$= results[2],$results[7],$results[1],$results[9],$results[10]); ! } else { ! print mktablerow(7,$secondary,$results[6],$results[4],$results[3],$= results[2],$results[7],$results[1],$results[9]); ! } } else { ! $results[6]=3DItemType($results[6]); ! print mktablerow(6,$secondary,$results[6],$results[4],$results[3],$re= sults[2],$results[7],$results[9]); ! }=20 ! $colour=3D0; = =20 ! } else{ = =20 ! if ($type ne 'opac'){ ! if ($type eq 'catmain'){ ! print mktablerow(8,'white',$results[6],$results[4],$results[3],$res= ults[2],$results[7],$results[1],$results[9],$results[10]); ! } else { ! print mktablerow(7,'white',$results[6],$results[4],$results[3],$res= ults[2],$results[7],$results[1],$results[9]); ! } } else { ! $results[6]=3DItemType($results[6]); ! print mktablerow(6,'white',$results[6],$results[4],$results[3],$resul= ts[2],$results[7],$results[9]); ! } ! $colour=3D1; = =20 ! } ! $i++; ! } =20 print mktableft(); print "

"; print mktablehdr(); ! if ($type ne 'opac'){ ! print << "EOF"; !

HELP
Update Biblio for all Items: Click on the Modify button [left= ] to amend the biblio. Any changes you make will update the record for al= l the items listed above.

Updating the Biblio for only ONE or SOME Items:=20 EOF =20 ! if ($type eq 'catmain'){ ! print << "EOF"; If some of the items listed above need a different biblio,=20 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 !

!=20 !

=20 ! EOF =20 print center(); print mktablehdr; =20 ! if ($type eq 'opac') { ! print mktablerow(6,$main,'Item Type','Class','Branch','Date Due','Last = Seen'); ! if ($dat->{'url'} ne '') { ! $dat->{'url'} =3D~ s/^http:\/\///; ! print mktablerow(6, $colour, 'Website', 'WEB', 'Online', 'Available', "{'url'}\">$dat->{'url'}"); ! } # if } else { ! print mktablerow(7,$main,'Itemtype','Class','Location','Date Due','Last= Seen','Barcode',"","/images/background-mem.gif"); ! if ($dat->{'url'} ne '') { ! $dat->{'url'} =3D~ s/^http:\/\///; ! print mktablerow(7, $colour, 'WEB', '', 'Online', 'Available', "{'url'}\">$dat->{'url'}"); ! } # if ! } # else !=20 ! $colour =3D 'white'; ! for (my $i =3D 0; $i < $count; $i ++) { ! =20 ! my @results =3D split('\t', $items[$i]); !=20 ! if ($type ne 'opac') { ! $results[1] =3D mklink("/cgi-bin/koha/moredetail.pl?item=3D$results[5]&bib= =3D$bib&bi=3D$results[8]&type=3D$type",$results[1]); ! } # if !=20 ! if ($results[2] eq '') { ! $results[2] =3D 'Available'; ! } # if !=20 ! if ($type eq 'catmain'){ ! $results[10] =3D mklink("/cgi-bin/koha/maint/catmaintain.pl?type=3Dfixitem= type&bi=3D$results[8]&item=3D$results[6]","Fix Itemtype"); ! } # if =20 if ($type ne 'opac'){ ! if ($type eq 'catmain'){ ! print mktablerow(8,$colour,$results[6],$results[4],$results[3],$result= s[2],$results[7],$results[1],$results[9],$results[10]); ! } else { ! print mktablerow(7,$colour,$results[6],$results[4],$results[3],$result= s[2],$results[7],$results[1],$results[9]); ! } # else } else { ! $results[6] =3D ItemType($results[6]); ! print mktablerow(6,$colour,$results[6],$results[4],$results[3],$results[2]= ,$results[7],$results[9]); ! } # else ! =20 ! if ($colour eq $secondary) { ! $colour =3D 'white'; } else { ! $colour =3D $secondary; ! } # else !=20 ! } # for =20 print mktableft(); print "

"; print mktablehdr(); !=20 ! if ($type ne 'opac') { ! print << "EOF"; ! !

HELP
Update Biblio for all Items: Click on the Modify button [left= ] to amend the biblio. Any changes you make will update the record for al= l the items listed above.

Updating the Biblio for only ONE or SOME Items:=20 EOF =20 ! if ($type eq 'catmain') { ! print << "EOF"; If some of the items listed above need a different biblio,=20 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 !

! EOF =20 ! } else { ! print << "EOF"; If some of the items listed above need a different biblio, or are on the wr= ong biblio, you must use the acquisitions proce= ss to fix this. You will need to "re-order" the items, and delete them from t= his biblio. !

! EOF =20 ! } # else ! } # if !=20 print mktableft(); print endcenter(); ! print << "EOF"; !
!

! EOF !=20 ! if ($type ne 'opac') { ! print << "EOF"; ! ! ! ! ! ! ! !
Abstract=
$dat->{'abstract'}
! EOF ! } else { ! if ($dat->{'abstract'} ne '') { ! print << "EOF"; ! ! ! ! ! ! ! !
Abstract
$dat->{'abstract'}
! EOF ! } # if ! } # else !=20 print endmenu($type); print endpage(); Index: modbib.pl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/koha/koha/modbib.pl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** modbib.pl 19 Dec 2000 23:45:52 -0000 1.1.1.1 --- modbib.pl 9 May 2002 03:01:40 -0000 1.2 *************** *** 13,84 **** my $input =3D new CGI; =20 ! my $bibnum=3D$input->param('bibnum'); ! my $data=3Dbibdata($bibnum); ! my ($count,$subject)=3Dsubject($data->{'biblionumber'}); ! my ($count2,$subtitle)=3Dsubtitle($data->{'biblionumber'}); ! my ($count3,$addauthor)=3Daddauthor($data->{'biblionumber'}); ! my $submit=3D$input->param('submit.x'); = =20 ! if ($submit eq ''){ = =20 ! print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=3D$bibnum"); = =20 ! } =20 =20 print $input->header; ! #my ($analytictitle)=3Danalytic($biblionumber,'t'); ! #my ($analyticauthor)=3Danalytic($biblionumber,'a'); print startpage(); print startmenu(); - my %inputs; =20 ! #have to get all subtitles, subjects and additional authors ! my $sub=3D$subject->[0]->{'subject'}; ! for (my $i=3D1;$i<$count;$i++){ ! $sub=3D$sub."|".$subject->[$i]->{'subject'}; ! } ! my $additional=3D$addauthor->[0]->{'author'}; ! for (my $i=3D1;$i<$count3;$i++){ ! $additional=3D$additional."|".$addauthor->[$i]->{'author'}; ! } !=20 !=20 ! #hash is set up with input name being the key then ! #the value is a tab separated list, the first item being the input type ! $inputs{'Author'}=3D"text\t$data->{'author'}\t0"; ! $data->{'title'}=3Dtidyhtml($data->{'title'}); ! $inputs{'Title'}=3D"text\t$data->{'title'}\t1"; ! my $dewey =3D $data->{'dewey'}; = =20 ! $dewey =3D~ s/0+$//; = =20 ! if ($dewey eq "000.") { $dewey =3D "";}; = =20 ! if ($dewey < 10){$dewey=3D'00'.$dewey;} = =20 ! if ($dewey < 100 && $dewey > 10){$dewey=3D'0'.$dewey;} = =20 ! if ($dewey <=3D 0){ = =20 ! $dewey=3D''; = =20 ! }=20 ! $dewey=3D~ s/\.$//; ! #$inputs{'Class'}=3D"text\t$data->{'classification'}$dewey$data->{'subclass= '}\t2"; ! #$inputs{'Item Type'}=3D"text\t$data->{'itemtype'}\t3"; ! $inputs{'Subject'}=3D"textarea\t$sub\t4"; ! #$inputs{'Publisher'}=3D"text\t$data->{'publishercode'}\t5"; ! $inputs{'Copyright date'}=3D"text\t$data->{'copyrightdate'}\t6"; ! #$inputs{'ISBN'}=3D"text\t$data->{'isbn'}\t7"; ! #$inputs{'Publication Year'}=3D"text\t$data->{'publicationyear'}\t8"; ! #$inputs{'Pages'}=3D"text\t$data->{'pages'}\t9"; ! #$inputs{'Illustrations'}=3D"text\t$data->{'illustration'}\t10"; ! $inputs{'Series Title'}=3D"text\t$data->{'seriestitle'}\t11"; ! $inputs{'Additional Author'}=3D"text\t$additional\t12"; ! $inputs{'Subtitle'}=3D"text\t$subtitle->[0]->{'subtitle'}\t13"; ! $inputs{'Unititle'}=3D"text\t$data->{'unititle'}\t14"; ! $inputs{'Notes'}=3D"textarea\t$data->{'notes'}\t15"; ! $inputs{'Serial'}=3D"text\t$data->{'serial'}\t16"; ! #$inputs{'Volume'}=3D"text\t$data->{'volumeddesc'}\t17"; ! $inputs{'Analytic author'}=3D"text\t\t18"; ! $inputs{'Analytic title'}=3D"text\t\t19"; !=20 ! $inputs{'bibnum'}=3D"hidden\t$data->{'biblionumber'}\t20"; ! $inputs{'bibitemnum'}=3D"hidden\t$data->{'biblioitemnumber'}\t21"; !=20 !=20 ! print mkform3('updatebiblio.pl',%inputs); ! #print mktablehdr(); ! #print mktableft(); print endmenu(); print endpage(); --- 13,128 ---- my $input =3D new CGI; =20 ! my $submit =3D $input->param('submit.x'); ! my $bibnum =3D $input->param('bibnum'); ! my $data =3D &bibdata($bibnum); ! my ($subjectcount, $subject) =3D &subject($data->{'biblionumber'}); ! my ($subtitlecount, $subtitle) =3D &subtitle($data->{'biblionumber'}); ! my ($addauthorcount, $addauthor) =3D &addauthor($data->{'biblionumber'}); ! my $sub =3D $subject->[0]->{'subject'}; ! my $additional =3D $addauthor->[0]->{'author'}; ! my %inputs; ! my $dewey; !=20 ! if ($submit eq '') { ! print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=3D$bibnum"); ! } # if =20 print $input->header; ! # my ($analytictitle) =3D &analytic($biblionumber,'t'); ! # my ($analyticauthor) =3D &analytic($biblionumber,'a'); print startpage(); print startmenu(); =20 ! # have to get all subtitles, subjects and additional authors ! for (my $i =3D 1; $i < $subjectcount; $i++) { ! $sub =3D $sub . "|" . $subject->[$i]->{'subject'}; ! } # for !=20 ! for (my $i =3D 1; $i < $addauthorcount; $i++) { ! $additional =3D $additional . "|" . $addauthor->[$i]->{'author'}; ! } # for !=20 !=20 ! $dewey =3D $data->{'dewey'}; ! $dewey =3D~ s/0+$//; ! if ($dewey eq "000.") { ! $dewey =3D ""; ! } # if ! if ($dewey < 10) { ! $dewey =3D '00' . $dewey; ! } # if ! if ($dewey < 100 && $dewey > 10) { ! $dewey =3D '0' . $dewey; ! } # if ! if ($dewey <=3D 0){ ! $dewey=3D''; ! } # if ! $dewey =3D ~ s/\.$//; !=20 ! $data->{'title'} =3D &tidyhtml($data->{'title'}); !=20 ! print << "EOF"; !

! {'biblionumber= '}"> ! {'biblio= itemnumber'}"> ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
Author{'author'}">
Title{'title'}">
Abstract
Copyright Date{'copyright= date'}">
Series Title{'seriestitle= '}">
Additional Author !
Subtitle{'subtitle'}"> !
Unititle{'untitle'}"> !
Notes