[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-devel] CVS: koha/C4 Output.pm,1.6.2.5,1.6.2.6
From: |
Pat Eyler |
Subject: |
[Koha-devel] CVS: koha/C4 Output.pm,1.6.2.5,1.6.2.6 |
Date: |
Thu Apr 25 12:54:11 2002 |
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv10386
Modified Files:
Tag: rel-1-2
Output.pm
Log Message:
found (and fixed) an error in &mkformnotable while adding tests
Index: Output.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Output.pm,v
retrieving revision 1.6.2.5
retrieving revision 1.6.2.6
diff -C2 -r1.6.2.5 -r1.6.2.6
*** Output.pm 25 Apr 2002 17:33:16 -0000 1.6.2.5
--- Output.pm 25 Apr 2002 19:45:46 -0000 1.6.2.6
***************
*** 273,277 ****
}
if ($inputs[$i][0] eq 'radio') {
! $string.="<input type=radio name=$inputs[1]
value=$inputs[$i][2]>$inputs[$i][2]";
}
if ($inputs[$i][0] eq 'text') {
--- 273,277 ----
}
if ($inputs[$i][0] eq 'radio') {
! $string.="<input type=radio name=$inputs[$i][1]
value=$inputs[$i][2]>$inputs[$i][2]";
}
if ($inputs[$i][0] eq 'text') {
***************
*** 292,295 ****
--- 292,302 ----
sub mkform2{
+ # FIXME
+ # no POD and no tests yet. Once tests are written,
+ # this function can be cleaned up with the following steps:
+ # turn the while loop into a foreach loop
+ # pull the nested if,elsif structure back up to the main level
+ # pull the code for the different kinds of inputs into separate
+ # functions
my ($action,%inputs)address@hidden;
my $string="<form action=$action method=post>\n";
***************
*** 349,352 ****
--- 356,368 ----
}
+ =pod
+
+ =head2 &endpage
+
+ &endpage does not expect any arguments, it returns the string:
+ </body></html>\n
+
+ =cut
+
sub endpage() {
***************
*** 354,357 ****
--- 370,385 ----
}
+ =pod
+
+ =head2 &mklink
+
+ &mklink expects two arguments, the url to link to and the text of the link.
+ It returns this string:
+ <a href="$url">$text</a>
+ where $url is the first argument and $text is the second.
+
+ =cut
+
+
sub mklink($$) {
my ($url,$text)address@hidden;
***************
*** 360,377 ****
}
sub mkheadr {
my ($type,$text)address@hidden;
my $string;
if ($type eq '1'){
! $string="<FONT SIZE=6><em>$text</em></FONT><br>";
}
! if ($type eq '2'){
! $string="<FONT SIZE=6><em>$text</em></FONT>";
! }
! if ($type eq '3'){
! $string="<FONT SIZE=6><em>$text</em></FONT><p>";
! }
! return ($string);
}
sub center() {
--- 388,441 ----
}
+ =pod
+
+ =head2 &mkheadr
+
+ &mkeadr expects two strings, a type and the text to use in the header.
+ types are:
+
+ =over
+
+ =item 1 ends with <br>
+
+ =item 2 no special ending tag
+
+ =item 3 ends with <p>
+
+ =back
+
+ Other than this, the return value is the same:
+ <FONT SIZE=6><em>$text</em></FONT>$string
+ Where $test is the text passed in and $string is the tag generated from
+ the type value.
+
+ =cut
+
+
sub mkheadr {
+ # FIXME
+ # would it be better to make this more generic by accepting an optional
+ # argument with a closing tag instead of a numeric type?
+
my ($type,$text)address@hidden;
my $string;
if ($type eq '1'){
! $string="<br>";
! } elsif ($type eq '3') {
! $string="<p>";
! } else {
! $string="";
}
! return ("<FONT SIZE=6><em>$text</em></FONT>$string");
}
+
+ =pod
+
+ =head2 ¢er and &endcenter
+
+ ¢er and &endcenter take no arguments and return html tags <CENTER> and
+ </CENTER> respectivley.
+
+ =cut
sub center() {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-devel] CVS: koha/C4 Output.pm,1.6.2.5,1.6.2.6,
Pat Eyler <=