[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha modbib.pl,1.9,1.10 moditem.pl,1.5,1.6 modwebsites.p
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] CVS: koha modbib.pl,1.9,1.10 moditem.pl,1.5,1.6 modwebsites.pl,1.2,1.3 newimember.pl,1.3,1.4 |
Date: |
Sun, 15 Dec 2002 16:26:20 -0800 |
Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv8444
Modified Files:
modbib.pl moditem.pl modwebsites.pl newimember.pl
Log Message:
Templating moditem, modbib, modwebsites, newimember
Index: modbib.pl
===================================================================
RCS file: /cvsroot/koha/koha/modbib.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** modbib.pl 13 Oct 2002 09:26:24 -0000 1.9
--- modbib.pl 16 Dec 2002 00:26:18 -0000 1.10
***************
*** 6,9 ****
--- 6,10 ----
#written 8/11/99
# modified 11/11/99 by address@hidden
+ # modified 12/16/2002 by address@hidden : templating
***************
*** 30,33 ****
--- 31,35 ----
use CGI;
use C4::Output;
+ use HTML::Template;
my $input = new CGI;
***************
*** 46,54 ****
} # if
! print $input->header;
# my ($analytictitle) = &analytic($biblionumber,'t');
# my ($analyticauthor) = &analytic($biblionumber,'a');
! print startpage();
! print startmenu('catalogue');
# have to get all subtitles, subjects and additional authors
--- 48,57 ----
} # if
! #print $input->header;
# my ($analytictitle) = &analytic($biblionumber,'t');
# my ($analyticauthor) = &analytic($biblionumber,'a');
! #print startpage();
! #print startmenu('catalogue');
! my $template = gettemplate("modbib.tmpl");
# have to get all subtitles, subjects and additional authors
***************
*** 75,151 ****
$data->{'title'} = &tidyhtml($data->{'title'});
! print << "EOF";
! <a href="modwebsites.pl?biblionumber=$data->{'biblionumber'}">Modify Website
Links</a>
! <form action="updatebiblio.pl" method="post" name="f">
! <input type="hidden" name="biblionumber" value="$data->{'biblionumber'}">
! <input type="hidden" name="biblioitemnumber"
value="$data=>{'biblioitemnumber'}">
! <table border="0" cellspacing="0" cellpadding="5">
! <tr valign="top">
! <td>Author</td>
! <td><input type="text" name="author" value="$data->{'author'}"></td>
! </tr>
! <tr valign="top">
! <td>Title</td>
! <td><input type="text" name="title" value="$data->{'title'}"></td>
! </tr>
! <tr valign="top">
! <td>Abstract</td>
! <td><textarea name="abstract" cols="40"
rows="4">$data->{'abstract'}</textarea></td>
! </tr>
! <tr valign="top">
! <td>Subject</td>
! <td><textarea name="subject" cols="40" rows="4">$sub</textarea>
! <a href="javascript:Dopop()">...</a>
! </td>
! </tr>
! <tr valign="top">
! <td>Copyright Date</td>
! <td><input type="text" name="copyrightdate"
value="$data->{'copyrightdate'}"></td>
! </tr>
! <tr valign="top">
! <td>Series Title</td>
! <td><input type="text" name="seriestitle" value="$data->{'seriestitle'}"></td>
! </tr>
! <tr valign="top">
! <td>Additional Author</td>
! <td><input type="text" name="additionalauthor" value="$additional"></td>
! </tr>
! <tr valign="top">
! <td>Subtitle</td>
! <td><input type="text" name="subtitle" value="$data->{'subtitle'}"></td>
! </tr>
! <tr valign="top">
! <td>Unititle</td>
! <td><input type="text" name="unititle" value="$data->{'untitle'}"></td>
! </tr>
! <tr valign="top">
! <td>Notes</td>
! <td><textarea name="notes" cols="40" rows="4">$data->{'notes'}</textarea></td>
! </tr>
! <tr valign="top">
! <td>Serial</td>
! <td><input type="text" name="serial" value="$data->{'serial'}"></td>
! </tr>
! <tr valign="top">
! <td>Analytic Author</td>
! <td><input type="text" name="analyticauthor"></td>
! </tr>
! <tr valign="top">
! <td>Analytic Title</td>
! <td><input type="text" name="analytictitle"></td>
! </tr>
! </table>
! <br>
! <input type="submit" name="submit" value="Save Changes">
! </form>
! <script>
! function Dopop() {
!
newin=window.open("thesaurus_popup.pl?subject="+document.f.subject.value,"thesaurus",'width=500,height=400,toolbar=false,scrollbars=yes');
! }
! </script>
! EOF
! print endmenu();
! print endpage();
sub tidyhtml {
--- 78,96 ----
$data->{'title'} = &tidyhtml($data->{'title'});
! $template->param ( biblionumber => $data->{'biblionumber'});
! $template->param ( biblioitemnumber => $data->{'biblioitemnumber'});
! $template->param ( author => $data->{'author'});
! $template->param ( title => $data->{'title'});
! $template->param ( abstract => $data->{'abstract'});
! $template->param ( subject => $sub);
! $template->param ( copyrightdate => $data->{'copyrightdate'});
! $template->param ( seriestitle => $data->{'seriestitle'});
! $template->param ( additionalauthor => $additional);
! $template->param ( subtitle => $data->{'subtitle'});
! $template->param ( untitle => $data->{'untitle'});
! $template->param ( notes => $data->{'notes'});
! $template->param ( serial => $data->{'serial'});
! print "Content-Type: text/html\n\n", $template->output;
sub tidyhtml {
Index: moditem.pl
===================================================================
RCS file: /cvsroot/koha/koha/moditem.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** moditem.pl 13 Oct 2002 08:34:23 -0000 1.5
--- moditem.pl 16 Dec 2002 00:26:18 -0000 1.6
***************
*** 3,10 ****
# $Id$
#script to modify/delete biblios
#written 8/11/99
# modified 11/11/99 by address@hidden
!
# Copyright 2000-2002 Katipo Communications
--- 3,11 ----
# $Id$
+
#script to modify/delete biblios
#written 8/11/99
# modified 11/11/99 by address@hidden
! # modified 12/16/02 by address@hidden : Templating
# Copyright 2000-2002 Katipo Communications
***************
*** 32,35 ****
--- 33,37 ----
use C4::Acquisitions;
use C4::Biblio;
+ use HTML::Template;
my $input = new CGI;
***************
*** 41,45 ****
}
! print $input->header;
#print $input->dump;
--- 43,47 ----
}
! #print $input->header;
#print $input->dump;
***************
*** 49,54 ****
#my ($analytictitle)=analytic($biblionumber,'t');
#my ($analyticauthor)=analytic($biblionumber,'a');
! print startpage();
! print startmenu('catalogue');
my %inputs;
--- 51,60 ----
#my ($analytictitle)=analytic($biblionumber,'t');
#my ($analyticauthor)=analytic($biblionumber,'a');
!
!
! #print startpage();
! #print startmenu('catalogue');
! my $template=gettemplate("moditem.tmpl");
!
my %inputs;
***************
*** 70,73 ****
--- 76,82 ----
}
$dewey=~ s/\.$//;
+
+ # 12/16/2002 address@hidden : all these inputs seem unused !!!
+
$inputs{'Barcode'}="text\t$item->{'barcode'}\t0";
$inputs{'Class'}="hidden\t$data->{'classification'}$dewey$data->{'subclass'}\t2";
***************
*** 91,166 ****
#$inputs{'Analytic author'}="text\t\t18";
#$inputs{'Analytic title'}="text\t\t19";
-
$inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20";
$inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21";
$inputs{'itemnumber'}="hidden\t$itemnum\t22";
!
!
! print <<printend
! <FONT SIZE=6><em>$data->{'title'} ($data->{'author'})</em></FONT><br>
! <table border=0 cellspacing=0 cellpadding=5>
! <tr valign=top bgcolor=white><td><form action=updateitem.pl method=post>
! <table border=0 cellspacing=0 cellpadding=5>
! <tr valign=top bgcolor=white><td>Barcode</td><td><input type=text
name=Barcode value="$item->{'barcode'}" size=40></td></tr>
! <input type=hidden name=Class
value="$data->{'classification'}$dewey$data->{'subclass'}">
! <input type=hidden name=Publisher value="$data->{'publisher'}">
! <input type=hidden name=ISBN value="$data->{'isbn'}">
! <input type=hidden name=Publication Year value="$data->{'publicationyear'}">
! <input type=hidden name=Pages value="$data->{'pages'}">
! <input type=hidden name=Illustrations value="$data->{'illustration'}">
! <tr valign=top bgcolor=white><td>ItemNotes</td><td><textarea name=ItemNotes
cols=40 rows=4>$item->{'itemnotes'}</textarea></td></tr>
! <input type=hidden name=Volume value="$data->{'volumeddesc'}">
! <tr valign=top bgcolor=white><td>Home Branch</td><td><input type=text
name=Home Branch value="$item->{'homebranch'}" size=40></td></tr>
! <tr valign=top bgcolor=white><td>Lost</td><td><input type=radio name=Lost
value=1
! printend
! ;
! if ($item->{'itemlost'} ==1){
! print " checked ";
! }
! print <<printend
! >Yes
! <input type=radio name=Lost value=0
! printend
! ;
! if ($item->{'itemlost'} ==0){
! print " checked ";
! }
! print <<printend
! >No</td></tr>
! <tr valign=top bgcolor=white><td>Cancelled</td><td><input type=radio
name=withdrawn value=1
! printend
! ;
! if ($item->{'wthdrawn'} ==1){
! print " checked ";
! }
! print <<printend
! >Yes
! <input type=radio name=withdrawn value=0
! printend
! ;
! if ($item->{'wthdrawn'} ==0){
! print " checked ";
! }
! print <<printend
! >No</td></tr>
! <input type=hidden name=bibnum value="$data->{'biblionumber'}">
! <input type=hidden name=bibitemnum value="$data->{'biblioitemnumber'}">
! <input type=hidden name=itemnumber value="$itemnum">
! <tr valign=top bgcolor=white><td></td><td>
!
! <input type=image name=submit src=/images/save-changes.gif border=0 width=187
! height=42></td></tr>
! </table>
! </form></td></tr>
! </table>
!
! printend
! ;
!
! print endmenu();
! print endpage();
--- 100,129 ----
#$inputs{'Analytic author'}="text\t\t18";
#$inputs{'Analytic title'}="text\t\t19";
$inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20";
$inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21";
$inputs{'itemnumber'}="hidden\t$itemnum\t22";
! #12/16/2002 address@hidden : end of comment
+ #12/16/2002 address@hidden : templating
+ $template->param( title => $data->{'title'},
+ author =>
$data->{'author'},
+ barcode =>
$item->{'barcode'},
+ classification
=> "$data->{'classification'}$dewey$data->{'subclass'}",
+ publisher =>
$data->{'publisher'},
+ publicationyear
=> $data->{'publicationyear'},
+ pages =>
$data->{'pages'},
+ illustration =>
$data->{'illustration'},
+ itemnotes =>
$item->{'itemnotes'},
+ volumedesc =>
$data->{'volumedesc'},
+ homebranch =>
$data->{'homebranch'},
+ itemlost =>
($item->{'itemlost'} ==1),
+ itemwithdrawn
=> ($item->{'wthdrawn'} ==1),
+ biblionumber =>
$data->{'biblionumber'},
+
biblioitemnumber => $data->{'biblioitemnumber'},
+ itemnumber =>
$itemnum);
! print "Content-Type: text/html\n\n", $template->output;
! #12/16/2002 address@hidden : templating
Index: modwebsites.pl
===================================================================
RCS file: /cvsroot/koha/koha/modwebsites.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** modwebsites.pl 14 Aug 2002 18:12:51 -0000 1.2
--- modwebsites.pl 16 Dec 2002 00:26:18 -0000 1.3
***************
*** 19,22 ****
--- 19,24 ----
# Suite 330, Boston, MA 02111-1307 USA
+ # modified by address@hidden 12/16/2002, templating
+
use strict;
***************
*** 24,27 ****
--- 26,30 ----
use CGI;
use C4::Output;
+ use HTML::Template;
my $input = new CGI;
***************
*** 33,93 ****
} # if
! print $input->header;
! print startpage();
! print startmenu();
!
! print << "EOF";
! <p />
! <a href="detail.pl?type=intra&bib=$biblionumber">Return to Details Page</a>
! EOF
for (my $i = 0; $i < $count; $i++) {
! print << "EOF"
! <p />
! <form action="updatewebsite.pl" method="post">
! <input type="hidden" name="biblionumber" value="$biblionumber">
! <input type="hidden" name="websitenumber"
value="$websites[$i]->{'websitenumber'}">
! <table>
! <tr valign="top">
! <td>Title</td>
! <td><input type="text" name="title" value="$websites[$i]->{'title'}"></td>
! </tr>
! <tr valign="top">
! <td>Description</td>
! <td><textarea name="description" cols="40"
rows="4">$websites[$i]->{'description'}</textarea></td>
! </tr>
! <tr valign="top">
! <td>URL</td>
! <td><input type="text" name="url" value="$websites[$i]->{'url'}"></td>
! </tr>
! </table>
! <input type="submit" value="Update this Website Link"> <input type="submit"
name="delete" value="Delete this Website link">
! </form>
! EOF
} # for
! print << "EOF";
! <p />
! <h2><b>Add another Website Link</b></h2>
! <form action="addwebsite.pl" method="post">
! <input type="hidden" name="biblionumber" value="$biblionumber">
! <table>
! <tr valign="top">
! <td>Title</td>
! <td><input type="text" name="title"></td>
! </tr>
! <tr valign="top">
! <td>Description</td>
! <td><textarea name="description" cols="40" rows="4"></textarea></td>
! </tr>
! <tr valign="top">
! <td>URL</td>
! <td><input type="text" name="url"></td>
! </tr>
! </table>
! <input type="submit" value="Add this Website Link">
! </form>
! EOF
! print endmenu();
! print endpage();
--- 36,57 ----
} # if
! #print $input->header;
! #print startpage();
! #print startmenu();
! my $template = gettemplate("modwebsites.tmpl");
+ my @websitesloop;
for (my $i = 0; $i < $count; $i++) {
! my %website;
! $website{'biblionumber'}=$biblionumber;
! $website{'websitenumber'}=$websites[$i]->{'websitenumber'};
! $website{'title'}=$websites[$i]->{'title'};
! $website{'description'}=$websites[$i]->{'description'};
! $website{'url'}=$websites[$i]->{'url'};
! push (@websitesloop, \%website);
} # for
! $template->param( biblionumber => $biblionumber,
! websitesloop =>
address@hidden);
! print "Content-Type: text/html\n\n", $template->output;
Index: newimember.pl
===================================================================
RCS file: /cvsroot/koha/koha/newimember.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** newimember.pl 13 Oct 2002 07:34:08 -0000 1.3
--- newimember.pl 16 Dec 2002 00:26:18 -0000 1.4
***************
*** 4,7 ****
--- 4,8 ----
#script to print confirmation screen, then if accepted calls itself to insert
data
+ #modified 2002/12/16 by address@hidden : Templating
***************
*** 28,31 ****
--- 29,33 ----
use CGI;
use Date::Manip;
+ use HTML::Template;
my %env;
***************
*** 34,38 ****
#or insert data
my $insert=$input->param('insert');
! print $input->header;
#get rest of data
my %data;
--- 36,41 ----
#or insert data
my $insert=$input->param('insert');
!
! my $template=gettemplate("newimember.tmpl");
#get rest of data
my %data;
***************
*** 67,90 ****
#print $input->Dump;
#print $string;
! print startmenu('member');
! if ($ok ==1){
! print $string;
! } else {
! my $valid=checkdigit(\%env,$data{"cardnumber_institution"});
! if ($valid != 1){
! print "Invalid cardnumber";
! } else {
!
! my @inputs;
! my $i=0;
! while (my ($key, $value) = each %data) {
! $value=~ s/\"/%22/g;
! $inputs[$i]=["hidden","$key","$value"];
! $i++;
! }
! $inputs[$i]=["submit","submit","submit"];
! print mkformnotable("/cgi-bin/koha/insertidata.pl",@inputs);
}
}
! print endmenu('member');
! print endpage();
--- 70,92 ----
#print $input->Dump;
#print $string;
! #print startmenu('member');
!
! $template->param( missingloop => ($ok==1));
! $template->param( string => $string);
! if ($ok !=1) {
! my $valid=checkdigit(\%env,$data{"cardnumber_institution"});
! $template->param( invalid => ($valid !=1));
! if (valid==1){
! my @inputs;
! while (my ($key, $value) = each %data) {
! $value=~ s/\"/%22/g;
! my %line;
! $line{'key'}=$key;
! $line{'value'}=$value;
! push(@inputs, \%line);
! }
! $template->param(inputsloop => address@hidden);
}
}
! print "Content-Type: text/html\n\n", $template->output;
!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha modbib.pl,1.9,1.10 moditem.pl,1.5,1.6 modwebsites.pl,1.2,1.3 newimember.pl,1.3,1.4,
Henri-Damien LAURENT <=
- Prev by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en modbibitem.tmpl,NONE,1.1
- Next by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en modbib.tmpl,NONE,1.1 moditem.tmpl,NONE,1.1 modwebsites.tmpl,NONE,1.1 newimember.tmpl,1.1.1.1,1.2
- Previous by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en modbibitem.tmpl,NONE,1.1
- Next by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en modbib.tmpl,NONE,1.1 moditem.tmpl,NONE,1.1 modwebsites.tmpl,NONE,1.1 newimember.tmpl,1.1.1.1,1.2
- Index(es):