Permalink
Browse files

Templating moditem, modbib, modwebsites, newimember

  • Loading branch information...
1 parent ffbe400 commit 12a8d67c2115bc713d66cb0a2e286459a75b186f hdl committed Dec 16, 2002
@@ -0,0 +1,72 @@
+<TMPL_INCLUDE Name="cat-top.inc">
+
+<a href="modwebsites.pl?biblionumber=<TMPL_VAR Name="biblionumber">">Modify Website Links</a>
+<form action="updatebiblio.pl" method="post" name="f">
+<input type="hidden" name="biblionumber" value="<TMPL_VAR Name="biblionumber">">
+<input type="hidden" name="biblioitemnumber" value="<TMPL_VAR Name="biblioitemnumber">">
+<table border="0" cellspacing="0" cellpadding="5">
+<tr valign="top">
+<td>Author</td>
+<td><input type="text" name="author" value="<TMPL_VAR Name="author">"></td>
+</tr>
+<tr valign="top">
+<td>Title</td>
+<td><input type="text" name="title" value="<TMPL_VAR Name="title">"></td>
+</tr>
+<tr valign="top">
+<td>Abstract</td>
+<td><textarea name="abstract" cols="40" rows="4"><TMPL_VAR Name="abstract"></textarea></td>
+</tr>
+<tr valign="top">
+<td>Subject</td>
+<td><textarea name="subject" cols="40" rows="4"><TMPL_VAR Name="subject"></textarea>
+<a href="javascript:Dopop()">...</a>
+</td>
+</tr>
+<tr valign="top">
+<td>Copyright Date</td>
+<td><input type="text" name="copyrightdate" value="<TMPL_VAR Name="copyrightdate">"></td>
+</tr>
+<tr valign="top">
+<td>Series Title</td>
+<td><input type="text" name="seriestitle" value="<TMPL_VAR Name="seriestitle">"></td>
+</tr>
+<tr valign="top">
+<td>Additional Author</td>
+<td><input type="text" name="additionalauthor" value="<TMPL_VAR Name="additionalauthor">"></td>
+</tr>
+<tr valign="top">
+<td>Subtitle</td>
+<td><input type="text" name="subtitle" value="<TMPL_VAR Name="subtitle">"></td>
+</tr>
+<tr valign="top">
+<td>Unititle</td>
+<td><input type="text" name="unititle" value="<TMPL_VAR Name="untitle">"></td>
+</tr>
+<tr valign="top">
+<td>Notes</td>
+<td><textarea name="notes" cols="40" rows="4"><TMPL_VAR Name="notes"></textarea></td>
+</tr>
+<tr valign="top">
+<td>Serial</td>
+<td><input type="text" name="serial" value="<TMPL_VAR Name="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>
+
+<TMPL_INCLUDE Name="cat-bottom.inc">
@@ -0,0 +1,47 @@
+<TMPL_INCLUDE Name="cat-top.inc">
+
+<FONT SIZE=6><em><TMPL_VAR Name="title"> (<TMPL_VAR Name="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="<TMPL_VAR Name="barcode">" size=40></td></tr>
+<input type=hidden name=Class value="<TMPL_VAR Name="classification">">
+<input type=hidden name=Publisher value="<TMPL_VAR Name="publisher">">
+<input type=hidden name=ISBN value="<TMPL_VAR Name="isbn">">
+<input type=hidden name=Publication Year value="<TMPL_VAR Name="publicationyear">">
+<input type=hidden name=Pages value="<TMPL_VAR Name="pages">">
+<input type=hidden name=Illustrations value="<TMPL_VAR Name="illustration">">
+<tr valign=top bgcolor=white><td>ItemNotes</td><td><textarea name=ItemNotes cols=40 rows=4><TMPL_VAR Name="itemnotes"></textarea></td></tr>
+<input type=hidden name=Volume value="<TMPL_VAR Name="volumeddesc">">
+<tr valign=top bgcolor=white><td>Home Branch</td><td><input type=text name=Home Branch value="<TMPL_VAR Name="homebranch">" size=40></td></tr>
+<tr valign=top bgcolor=white>
+
+<td>Lost</td>
+<td>
+<input type=radio name=Lost value=1 <TMPL_IF Name="itemlost"> checked </TMPL_IF> >
+Yes
+<input type=radio name=Lost value=0 <TMPL_UNLESS Name="itemlost"> checked </TMPL_UNLESS> >
+No
+</td>
+</tr>
+<tr valign=top bgcolor=white>
+<td>Cancelled</td>
+<td><input type=radio name=withdrawn value=1 <TMPL_IF Name="withdrawn"> checked </TMPL_IF> >
+Yes
+<input type=radio name=withdrawn value=0 <TMPL_UNLESS Name="withdrawn"> checked </TMPL_UNLESS> >
+No
+</td>
+</tr>
+<input type=hidden name=bibnum value="<TMPL_VAR Name="biblionumber">">
+<input type=hidden name=bibitemnum value="<TMPL_VAR Name="biblioitemnumber">">
+<input type=hidden name=itemnumber value="<TMPL_VAR Name="itemnumber">">
+<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>
+
+
+<TMPL_INCLUDE Name="cat-bottom.inc">
@@ -0,0 +1,51 @@
+<TMPL_INCLUDE Name="maint-top.inc">
+<p>
+<a href="detail.pl?type=intra&bib=<TMPL_VAR Name="biblionumber">">Return to Details Page</a>
+EOF
+
+<TMPL_LOOP Name="websitesloop">
+<p>
+<form action="updatewebsite.pl" method="post">
+<input type="hidden" name="biblionumber" value="<TMPL_VAR Name="biblionumber">">
+<input type="hidden" name="websitenumber" value="<TMPL_VAR Name="websitenumber">">
+<table>
+<tr valign="top">
+<td>Title</td>
+<td><input type="text" name="title" value="<TMPL_VAR Name="title">"></td>
+</tr>
+<tr valign="top">
+<td>Description</td>
+<td><textarea name="description" cols="40" rows="4"><TMPL_VAR Name="description"></textarea></td>
+</tr>
+<tr valign="top">
+<td>URL</td>
+<td><input type="text" name="url" value="<TMPL_VAR Name="url">"></td>
+</tr>
+</table>
+<input type="submit" value="Update this Website Link"> <input type="submit" name="delete" value="Delete this Website link">
+</form>
+</TMPL_LOOP>
+
+<p>
+<h2><b>Add another Website Link</b></h2>
+<form action="addwebsite.pl" method="post">
+<input type="hidden" name="biblionumber" value="<TMPL_VAR Name="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
+
+<TMPL_INCLUDE Name="maint-bottom.inc">
@@ -1,30 +1,18 @@
-<HTML>
+<TMPL_INCLUDE NAME="members-top.inc">
-<TMPL_VAR NAME=startmenumember>
-
-<TMPL_IF NAME=missingloop>
- The following compulsary fields have been left blank. Please push the back button and try again.<p>
- <UL>
- <TMPL_LOOP NAME=missingloop>
- <LI><TMPL_VAR NAME=name>
- </TMPL_LOOP>
- </UL><p>
-</TMPL_IF>
-
-<TMPL_IF NAME=invalidcardnumber>
-Invalid cardnumber.<p>
+<TMPL_IF NAME="missingloop">
+ <TMPL_VAR Name="string">
+<TMPL_ELSE>
+ <TMPL_IF NAME=invalid>
+ Invalid cardnumber.<p>
+ <TMPL_ELSE>
+ <form action="/cgi-bin/koha/insertidata.pl" method=post>
+ <TMPL_LOOP NAME=inputsloop>
+ <input type=hidden name="<TMPL_VAR NAME="key">" value="<TMPL_VAR NAME="value">">
+ </TMPL_LOOP>
+ <input type=submit name=submit value=submit>
+ </form>
+ </TMPL_IF>
</TMPL_IF>
-<TMPL_IF NAME=inputsloop>
- <form action="/cgi-bin/koha/insertidata.pl" method=post>
- <TMPL_LOOP NAME=inputsloop>
- <input type=hidden name="<TMPL_VAR NAME=name>" value="<TMPL_VAR NAME=value>">
- </TMPL_LOOP>
- <input type=submit name=submit value=submit>
- </form>
-</TMPL_IF>
-
-<TMPL_VAR NAME=endmenumember>
-
-</body>
-</HTML>
+<TMPL_INCLUDE NAME="members-bottom.inc">
View
@@ -5,6 +5,7 @@
#script to modify/delete biblios
#written 8/11/99
# modified 11/11/99 by chris@katipo.co.nz
+# modified 12/16/2002 by hdl@ifrance.com : templating
# Copyright 2000-2002 Katipo Communications
@@ -29,6 +30,7 @@
use C4::Search;
use CGI;
use C4::Output;
+use HTML::Template;
my $input = new CGI;
@@ -45,11 +47,12 @@
print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=$bibnum");
} # if
-print $input->header;
+#print $input->header;
# my ($analytictitle) = &analytic($biblionumber,'t');
# my ($analyticauthor) = &analytic($biblionumber,'a');
-print startpage();
-print startmenu('catalogue');
+#print startpage();
+#print startmenu('catalogue');
+my $template = gettemplate("modbib.tmpl");
# have to get all subtitles, subjects and additional authors
$sub = join("|", map { $_->{'subject'} } @{$subject});
@@ -74,79 +77,21 @@
$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();
+$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 {
my ($inp)=@_;
Oops, something went wrong.

0 comments on commit 12a8d67

Please sign in to comment.