[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha detail.pl,1.6,1.7 modbibitem.pl,1.4,1.5 moredetail.
From: |
Gynn Lomax |
Subject: |
[Koha-cvs] CVS: koha detail.pl,1.6,1.7 modbibitem.pl,1.4,1.5 moredetail.pl,1.5,1.6 updatebibitem.pl,1.4,1.5 |
Date: |
Sun, 12 May 2002 11:08:22 -0700 |
Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv11435
Modified Files:
detail.pl modbibitem.pl moredetail.pl updatebibitem.pl
Log Message:
Changes to allow modifications to the website biblioitems
Changes to way that website biblioitems are shown on the details page
Index: detail.pl
===================================================================
RCS file: /cvsroot/koha/koha/detail.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** detail.pl 12 May 2002 15:37:53 -0000 1.6
--- detail.pl 12 May 2002 18:08:17 -0000 1.7
***************
*** 16,21 ****
my $count = @items;
my $dat = &bibdata($bib);
! my ($websitecount, @websites) = &getwebsites($bib);
! my ($authorcount, $addauthor) = &addauthor($bib);
my $additional = $addauthor->[0]->{'author'};
my $main;
--- 16,22 ----
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;
***************
*** 177,195 ****
if ($type eq 'opac') {
print mktablerow(6,$main,'Item Type','Class','Branch','Date Due','Last
Seen');
- if ($dat->{'url'} ne '') {
- $dat->{'url'} =~ s/^http:\/\///;
- print mktablerow(6, $colour, 'Website', 'WEB', 'Online', 'Available',
"<a href=\"http://$dat->{'url'}\">$dat->{'url'}</a>");
- } # if
} else {
print mktablerow(7,$main,'Itemtype','Class','Location','Date Due','Last
Seen','Barcode',"","/images/background-mem.gif");
- if ($dat->{'url'} ne '') {
- $dat->{'url'} =~ s/^http:\/\///;
- print mktablerow(7, $colour, 'WEB', '', 'Online', 'Available', "<a
href=\"http://$dat->{'url'}\">$dat->{'url'}</a>");
- } # if
} # else
$colour = 'white';
for (my $i = 0; $i < $count; $i ++) {
!
my @results = split('\t', $items[$i]);
--- 178,188 ----
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]);
***************
*** 224,227 ****
--- 217,232 ----
} # 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();
Index: modbibitem.pl
===================================================================
RCS file: /cvsroot/koha/koha/modbibitem.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** modbibitem.pl 8 Apr 2002 23:44:43 -0000 1.4
--- modbibitem.pl 12 May 2002 18:08:19 -0000 1.5
***************
*** 15,19 ****
my $input = new CGI;
- #
my $bibitemnum=$input->param('bibitem');
my $data=bibitemdata($bibitemnum);
--- 15,18 ----
***************
*** 49,53 ****
$inputs{'Class'}="text\t$data->{'classification'}$dewey$data->{'subclass'}\t2";
$inputs{'Item Type'}="text\t$data->{'itemtype'}\t3";
! #$inputs{'Subject'}="textarea\t$sub\t4";
$inputs{'Publisher'}="text\t$data->{'publishercode'}\t5";
#$inputs{'Copyright date'}="text\t$data->{'copyrightdate'}\t6";
--- 48,52 ----
$inputs{'Class'}="text\t$data->{'classification'}$dewey$data->{'subclass'}\t2";
$inputs{'Item Type'}="text\t$data->{'itemtype'}\t3";
! $inputs{'URL'}="text\t$data->{'url'}\t4";
$inputs{'Publisher'}="text\t$data->{'publishercode'}\t5";
#$inputs{'Copyright date'}="text\t$data->{'copyrightdate'}\t6";
***************
*** 74,78 ****
<em><a
href=/cgi-bin/koha/detail.pl?bib=$data->{'biblionumber'}&type=intra>$data->{'title'}
($data->{'author'})</a><br>
Modify Group - $data->{'description'}</em></FONT><br>
! <form action=updatebibitem.pl method=post>
<table border=0 cellspacing=0 cellpadding=5 align=left>
--- 73,77 ----
<em><a
href=/cgi-bin/koha/detail.pl?bib=$data->{'biblionumber'}&type=intra>$data->{'title'}
($data->{'author'})</a><br>
Modify Group - $data->{'description'}</em></FONT><br>
! <form action="updatebibitem.pl" method="post">
<table border=0 cellspacing=0 cellpadding=5 align=left>
***************
*** 97,100 ****
--- 96,104 ----
<tr valign=top bgcolor=white><td>Item Type</td><td><input type=text name=Item
Type value="$data->{'itemtype'}" size=20></td></tr>
+
+ <tr valign="top" bgcolor="white">
+ <td>URL</td>
+ <td><input type="text" name="url" value="$data->{'url'}" size="20"></td>
+ </tr>
<tr valign=top bgcolor=white><td>Class</td><td><input type=text name=Class
value="$data->{'classification'}$dewey$data->{'subclass'}" size=20></td></tr>
Index: moredetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/moredetail.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** moredetail.pl 2 May 2002 00:08:53 -0000 1.5
--- moredetail.pl 12 May 2002 18:08:19 -0000 1.6
***************
*** 5,20 ****
use strict;
- #use DBI;
use C4::Search;
use C4::Koha;
use C4::Output;
use C4::Acquisitions;
-
use CGI;
my $input = new CGI;
- print $input->header;
- #whether it is called from the opac of the intranet
my $type=$input->param('type');
! #setup colours
my $main;
my $secondary;
--- 5,20 ----
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;
***************
*** 79,82 ****
--- 79,83 ----
<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>
Index: updatebibitem.pl
===================================================================
RCS file: /cvsroot/koha/koha/updatebibitem.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** updatebibitem.pl 15 Apr 2002 05:33:33 -0000 1.4
--- updatebibitem.pl 12 May 2002 18:08:19 -0000 1.5
***************
*** 9,58 ****
my $input= new CGI;
- #print $input->header;
- #print $input->Dump;
!
! my $bibitemnum=checkinp($input->param('bibitemnum'));
! my $bibnum=checkinp($input->param('bibnum'));
! my $itemtype=checkinp($input->param('Item'));
! my $isbn=checkinp($input->param('ISBN'));
! my $publishercode=checkinp($input->param('Publisher'));
! my $publicationdate=checkinp($input->param('Publication'));
! my $class=checkinp($input->param('Class'));
my $classification;
my $dewey;
my $subclass;
! if ($itemtype ne 'NF'){
$classification=$class;
! }
! if ($class =~/[0-9]+/){
! # print $class;
$dewey= $class;
$dewey=~ s/[a-z]+//gi;
my @temp;
! if ($class =~ /\./){
@temp=split(/[0-9]+\.[0-9]+/,$class);
} else {
@temp=split(/[0-9]+/,$class);
! }
$classification=$temp[0];
$subclass=$temp[1];
! # print $classification,$dewey,$subclass;
! }else{
$dewey='';
$subclass='';
! }
! my $illus=checkinp($input->param('Illustrations'));
! my $pages=checkinp($input->param('Pages'));
! my $volumeddesc=checkinp($input->param('Volume'));
! my $notes=checkinp($input->param('Notes'));
! my $size=checkinp($input->param('Size'));
! my $place=checkinp($input->param('Place'));
! my (@items)=itemissues($bibitemnum);
! #print @items;
! my address@hidden;
! #print $count;
! my @barcodes;
my $existing=$input->param('existing');
--- 9,55 ----
my $input= new CGI;
! my $bibitemnum = checkinp($input->param('bibitemnum'));
! my $bibnum = checkinp($input->param('bibnum'));
! my $itemtype = checkinp($input->param('Item'));
! my $url = checkinp($input->param('url'));
! my $isbn = checkinp($input->param('ISBN'));
! my $publishercode = checkinp($input->param('Publisher'));
! my $publicationdate = checkinp($input->param('Publication'));
! my $class = checkinp($input->param('Class'));
my $classification;
my $dewey;
my $subclass;
!
! if ($itemtype ne 'NF') {
$classification=$class;
! } # if
!
! if ($class =~/[0-9]+/) {
$dewey= $class;
$dewey=~ s/[a-z]+//gi;
my @temp;
! if ($class =~ /\./) {
@temp=split(/[0-9]+\.[0-9]+/,$class);
} else {
@temp=split(/[0-9]+/,$class);
! } # else
$classification=$temp[0];
$subclass=$temp[1];
!
! } else {
$dewey='';
$subclass='';
! } # else
+ my $illus = checkinp($input->param('Illustrations'));
+ my $pages = checkinp($input->param('Pages'));
+ my $volumeddesc = checkinp($input->param('Volume'));
+ my $notes = checkinp($input->param('Notes'));
+ my $size = checkinp($input->param('Size'));
+ my $place = checkinp($input->param('Place'));
+ my (@items) = &itemissues($bibitemnum);
+ my $count = @items;
+ my @barcodes;
my $existing=$input->param('existing');
***************
*** 84,92 ****
my $loan;
if ($flag eq 'notall' && $flag2 eq 'leastone'){
! $bibitemnum = &newbiblioitem({ biblionumber => $bibnum,
! itemtype => $itemtype,
! volumeddesc => $volumeddesc,
! classification => $classification });
!
modbibitem($bibitemnum,$itemtype,$isbn,$publishercode,$publicationdate,$classification,$dewey,$subclass,$illus,$pages,$volumeddesc,$notes,$size,$place);
if ($itemtype =~ /REF/){
$loan=1;
--- 81,100 ----
my $loan;
if ($flag eq 'notall' && $flag2 eq 'leastone'){
! $bibitemnum = &newbiblioitem({
! biblionumber => $bibnum,
! itemtype => $itemtype?$itemtype:"",
! url => $url?$url:"",
! isbn => $isbn?$isbn:"",
! publishercode => $publishercode?$publishercode:"",
! publicationyear => $publicationdate?$publicationdate:"",
! volumeddesc => $volumeddesc?$volumeddesc:"",
! classification => $classification?$classification:"",
! dewey => $dewey?$dewey:"",
! subclass => $subclass?$subclass:"",
! illus => $illus?$illus:"",
! pages => $pages?$pages:"",
! notes => $notes?$notes:"",
! size => $size?$size:"",
! place => $place?$place:"" });
if ($itemtype =~ /REF/){
$loan=1;
***************
*** 101,105 ****
} elsif ($flag2 eq 'leastone') {
!
modbibitem($bibitemnum,$itemtype,$isbn,$publishercode,$publicationdate,$classification,$dewey,$subclass,$illus,$pages,$volumeddesc,$notes,$size,$place);
if ($itemtype =~ /REF/){
$loan=1;
--- 109,127 ----
} elsif ($flag2 eq 'leastone') {
! &modbibitem({
! biblioitemnumber => $bibitemnum,
! itemtype => $itemtype?$itemtype:"",
! isbn => $isbn?$isbn:"",
! publishercode => $publishercode?$publishercode:"",
! publicationyear => $publicationdate?$publicationdate:"",
! classification => $classification?$classification:"",
! dewey => $dewey?$dewey:"",
! subclass => $subclass?$subclass:"",
! illus => $illus?$illus:"",
! pages => $pages?$pages:"",
! volumeddesc => $volumeddesc?$volumeddesc:"",
! notes => $notes?$notes:"",
! size => $size?$size:"",
! place => $place?$place:"" });
if ($itemtype =~ /REF/){
$loan=1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha detail.pl,1.6,1.7 modbibitem.pl,1.4,1.5 moredetail.pl,1.5,1.6 updatebibitem.pl,1.4,1.5,
Gynn Lomax <=
- Prev by Date:
[Koha-cvs] CVS: koha addwebsite.pl,NONE,1.1 deletewebsite.pl,NONE,1.1 modwebsites.pl,NONE,1.1 updatewebsite.pl,NONE,1.1 database.mysql,1.6,1.7 detail.pl,1.5,1.6 modbib.pl,1.2,1.3
- Next by Date:
[Koha-cvs] CVS: koha/acqui finishreceive.pl,1.3,1.4
- Previous by thread:
[Koha-cvs] CVS: koha addwebsite.pl,NONE,1.1 deletewebsite.pl,NONE,1.1 modwebsites.pl,NONE,1.1 updatewebsite.pl,NONE,1.1 database.mysql,1.6,1.7 detail.pl,1.5,1.6 modbib.pl,1.2,1.3
- Next by thread:
[Koha-cvs] CVS: koha/acqui finishreceive.pl,1.3,1.4
- Index(es):