From ffbe400ce54cd25cadd83eed02502fa0b1dd81fc Mon Sep 17 00:00:00 2001 From: hdl Date: Sun, 15 Dec 2002 17:38:20 +0000 Subject: [PATCH] Templating : modbibitem.pl modbibitem.tmpl --- .../intranet-tmpl/default/en/modbibitem.tmpl | 108 ++++++++++++ modbibitem.pl | 166 +++++------------- 2 files changed, 153 insertions(+), 121 deletions(-) create mode 100755 koha-tmpl/intranet-tmpl/default/en/modbibitem.tmpl diff --git a/koha-tmpl/intranet-tmpl/default/en/modbibitem.tmpl b/koha-tmpl/intranet-tmpl/default/en/modbibitem.tmpl new file mode 100755 index 0000000000..34fd8734f1 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/default/en/modbibitem.tmpl @@ -0,0 +1,108 @@ + + +
+"&type=intra> ()
+Modify Group -

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "> + + "> + +
RE-ASSIGN TO EXISTING GROUP
+ +
OR MODIFY DETAILS
Item Type" size=20>
URL" size="20">
Class" size=20>
Publisher" size=20>
Place" size=20>
ISBN" size=20>
Publication Year" size=20>
Pages" size=20>
Illustrations" size=20>
Volume" size=20>
Notes">
Size" size=20>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CHANGES TO AFFECT THESE BARCODES
+ Tick ALL barcodes that changes are to apply too. Those left un-ticked will keep the original group record.
 BarcodeLocationDate DueLast Seen
">"&bib=""&bi=""">
+

+ + + + +

+

+ + +HELP: You must click on the appropriate radio button (in the green boxes), and choose to either re-assign the item/s to a record already in the system, or modify this record. IF your changes only apply to some + items, tick the appropriate ones and a new group record will be created automatically for them. +
+

 

+ + diff --git a/modbibitem.pl b/modbibitem.pl index 0e59b602f5..d72e348800 100755 --- a/modbibitem.pl +++ b/modbibitem.pl @@ -31,6 +31,7 @@ use C4::Search; use C4::Output; use C4::Koha; use CGI; +use HTML::Template; my $input = new CGI; @@ -41,15 +42,9 @@ my $submit=$input->param('submit.x'); if ($submit eq ''){ print $input->redirect("deletebiblioitem.pl?biblioitemnumber=$bibitemnum&biblionumber=$biblio"); } -print $input->header; -#my ($count,$subject)=subject($data->{'biblionumber'}); -#my ($count2,$subtitle)=subtitle($data->{'biblionumber'}); -#my ($count3,$addauthor)=addauthor($data->{'biblionumber'}); - -#my ($analytictitle)=analytic($biblionumber,'t'); -#my ($analyticauthor)=analytic($biblionumber,'a'); -print startpage(); -print startmenu('catalogue'); + +my $template = gettemplate("modbibitem.tmpl"); + my %inputs; #hash is set up with input name being the key then @@ -87,131 +82,60 @@ $inputs{'Volume'}="text\t$data->{'volumeddesc'}\t17"; $inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20"; $inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21"; -print <param( biblionumber => $data->{'biblionumber'}, + title => $data->{'title'}, + author => $data->{'author'}, + description => $data->{'description'}); -
-{'biblionumber'}&type=intra>$data->{'title'} ($data->{'author'})
-Modify Group - $data->{'description'}

-
- +my ($count,@bibitems)=bibitems($data->{'biblionumber'}); - - +my @bibitemloop; -printend -; -my ($count,@bibitems)=bibitems($data->{'biblionumber'}); -print ""; -my $notesinput=$input->textfield(-name=>'Notes', -default=>$data->{'bnotes'}, -size=>20); - -print < - - - - - - - - - - - - - - - - - - - - - - - - - - +$template->param(bibitemloop =>\@bibitemloop); - - - - - - - +#my $notesinput=$input->textfield(-name=>'Notes', -default=>$data->{'bnotes'}, -size=>20); +$template->param(bnotes=>$data->{'bnotes'}); - +$template->param(itemtype => $data->{'itemtype'}); -
RE-ASSIGN TO EXISTING GROUP
OR MODIFY DETAILS
Item Type
URL
Class
Publisher
Place
ISBN
Publication Year
Pages
Illustrations
Volume
Notes$notesinput
Size
+$template->param(url => $data->{'url'}); +$template->param(classification => $data->{'classification'}, + dewey => $dewey, + subclass => $data->{'subclass'}, + publishercode => $data->{'publishercode'}, + place => $data->{'place'}, + isbn => $data->{'isbn'}, + publicationyear => $data->{'publicationyear'}, + pages => $data->{'pages'}, + illustration => $data->{'illustration'}, + volumeddesc => $data->{'volumeddesc'}, + size => $data->{'size'}, + biblionumber => $data->{'biblionumber'}, + biblioitemnumber => $data->{'biblioitemnumber'}); - - - - - - -printend -; - - -print < - - - - - - - - - -printend -; my (@items)=itemissues($data->{'biblioitemnumber'}); #print @items; +my @itemloop; my $count=@items; for (my $i=0;$i<$count;$i++){ - $items[$i]->{'datelastseen'} = slashifyDate($items[$i]->{'datelastseen'}); - print < - - - - - - -printend -; + my %line; + $items[$i]->{'datelastseen'} = slashifyDate($items[$i]->{'datelastseen'}); + $line{barcode}=$items[$i]->{'barcode'}; + $line{itemnumber}=$items[$i]->{'itemnumber'}; + $line{biblionumber}=$data->{'biblionumber'}; + $line{biblioitemnumber}=$data->{'biblioitemnumber'}; + $line{holdingbranch}=$items[$i]->{'holdingbranch'}; + $line{datelastseen}=$items[$i]->{'datelastseen'}; + push(@itemloop,\%line); } -print < -

- - - - - -

- - -HELP: You must click on the appropriate radio button (in the green boxes), and choose to either re-assign the item/s to a record already in the system, or modify this record. IF your changes only apply to some - items, tick the appropriate ones and a new group record will be created automatically for them. -
- -

 

- - -printend -; - +$template->param(itemloop => \@itemloop); +print "Content-Type: text/html\n\n", $template->output; -print endmenu(); -print endpage(); -- 2.39.5
CHANGES TO AFFECT THESE BARCODES
-Tick ALL barcodes that changes are to apply too. Those left un-ticked will keep the original group record.
 BarcodeLocationDate DueLast Seen
$items[$i]->{'barcode'}$items[$i]->{'holdingbranch'}$items[$i]->{'datelastseen'}