[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

weird list formatting



Howdy,

The appended patch makes the lists on the security pages look nicer.
When generating definition lists, it looks kind of stupid to print a -
after the title and followed by nothing.  I verified that the main and
vote pages don't look any different.

It also speeds up the listing of votes by not processing the rest of the
file once it finds the vote status.

Matt

Index: english/template/debian/recent_list.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/template/debian/recent_list.wml,v
retrieving revision 1.49
diff -u -r1.49 recent_list.wml
--- english/template/debian/recent_list.wml	2000/12/04 22:47:29	1.49
+++ english/template/debian/recent_list.wml	2000/12/07 02:47:51
@@ -141,13 +141,13 @@
 		$listhead = '<OL>';
 		$listfoot = '</OL>';
 		$elemhead = '<LI>';
-		$elemfoot = '';
+		$elemfoot = '- ';
 	}
 	elsif ($format =~ bullet) {
 		$listhead = '<UL>';
 		$listfoot = '</UL>';
 		$elemhead = '<LI>';
-		$elemfoot = '';
+		$elemfoot = '- ';
 	}
 	elsif ($format =~ list) {
 		$listhead = '<DL>';
@@ -159,7 +159,7 @@
 		$listhead = '';
 		$listfoot = '';
 		$elemhead = '';
-		$elemfoot = '';
+		$elemfoot = '- ';
 	}
 
 	$str=$listhead;
@@ -229,7 +229,7 @@
 			if ($title && $date && $desc) {
 				$date = newsdate($date);
 				$title =~ s/DSA-\d{3}-\d{1}//;
-				$str1 = "$elemhead<tt>[$date]</tt> <strong><a href=\"$year/$base\">$title</a></strong> - $elemfoot$desc<br>\n";
+				$str1 = "$elemhead<tt>[$date]</tt> <strong><a href=\"$year/$base\">$title</a></strong> $elemfoot$desc<br>\n";
 				last;
 			}
 			elsif ($title && $date) {
@@ -245,6 +245,7 @@
 				 elsif ( $status eq "F" ) { $str1 .= "<finished>"; }
 				 else { $str1 .= "other"; }
 				$str1 .= "<br>\n";
+				last;
 			}
 		}
 		$str .= $str1;

Attachment: pgpnUjfNGIORX.pgp
Description: PGP signature


Reply to: