[interchange-cvs] interchange - heins modified code/SystemTag/warnings.coretag

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Sun Dec 7 08:44:32 EST 2003


User:      heins
Date:      2003-12-07 13:44:32 GMT
Modified:  code/SystemTag warnings.coretag
Log:
* Allow customization of [warnings auto=1] with class, style, extra as in many
  IC tags.

Revision  Changes    Path
1.4       +15 -4     interchange/code/SystemTag/warnings.coretag


rev 1.4, prev_rev 1.3
Index: warnings.coretag
===================================================================
RCS file: /var/cvs/interchange/code/SystemTag/warnings.coretag,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- warnings.coretag	3 Aug 2002 06:01:41 -0000	1.3
+++ warnings.coretag	7 Dec 2003 13:44:32 -0000	1.4
@@ -14,12 +14,23 @@
 	return unless $Vend::Session->{warnings};
 
 	my $out = $opt->{header} || "";
-	$out .= '<ul><li>' if $opt->{auto};
-	if(! length($opt->{joiner})) {
-		$opt->{joiner} = $opt->{auto} ? '<li>' : "\n";
+	if($opt->{auto}) {
+		$opt->{list_container} ||= 'ul';
+		$out .= "<$opt->{list_container}";
+		for(qw/ class style extra /) {
+			next unless $opt->{"list_$_"};
+			$out .= ' ' . $opt->{"list_$_"};
+		}
+		$out .= '>';
+		$opt->{joiner} = '<li>'
+			if ! length($opt->{joiner});
+		$out .= $opt->{joiner};
+	}
+	elsif(! length($opt->{joiner})) {
+		$opt->{joiner} = "\n";
 	}
 	$out .= join $opt->{joiner}, grep /\S/, @{$Vend::Session->{warnings}};
-	$out .= '</ul>' if $opt->{auto};
+	$out .= "</$opt->{list_container}>" if $opt->{auto};
 	$out .= $opt->{footer} if length($opt->{footer});
 	delete $Vend::Session->{warnings} unless $opt->{keep};
 	return $out;








More information about the interchange-cvs mailing list