From: John T. <ta...@us...> - 2001-03-28 19:47:38
|
Update of /cvsroot/twiki/twiki/lib/TWiki In directory usw-pr-cvs1:/tmp/cvs-serv32427/lib/TWiki Modified Files: Attach.pm Log Message: Now uses new table rendering for output. Index: Attach.pm =================================================================== RCS file: /cvsroot/twiki/twiki/lib/TWiki/Attach.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Attach.pm 2001/03/27 21:47:40 1.2 --- Attach.pm 2001/03/28 19:47:34 1.3 *************** *** 18,23 **** $noviewableAttachmentCount = 0; - # FIXME Switch to using templates - # First do rows of attachment table $_[0] =~ s/(%FILEATTACHMENT\{)([^\}]*)(}%)/&formatAttachments( $1, $2, $3, "", $theWeb, $theTopic )/geo; --- 18,21 ---- *************** *** 73,86 **** if ( $attrCmd eq "Start" && $viewableAttachmentCount > 0 ) { $showAttr = TWiki::extractNameValuePair( $attributes, "view" ); ! $row .= "<br>\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"4\">\n"; ! $row .= " <tr BGCOLOR=\"#=99CCCC\"><th>FileAttachment:</th><th>Action:</th><th>Size:</th><th>Date:</th>"; ! $row .= " <th>Who:</th><th>Comment:</th>"; if ( $showAttr ) { ! $row .= " <th title=\"h : hidden, d : deleted, - none\">Attrib:</th>"; } - $row .= " </tr>\n"; } elsif ( $attrCmd eq "End" ) { if ( $viewableAttachmentCount > 0 ) { - $row .= "</table>\n"; } if ( $showAttr ) { --- 71,81 ---- if ( $attrCmd eq "Start" && $viewableAttachmentCount > 0 ) { $showAttr = TWiki::extractNameValuePair( $attributes, "view" ); ! $row .= "| *FileAttachment:* | *Action:* | *Size:* | *Date:* | *Who:* | *Comment:* |"; if ( $showAttr ) { ! #$row .= " <th title=\"h : hidden, d : deleted, - none\">Attrib:</th>"; ! $row .= " *Attrib:* |"; } } elsif ( $attrCmd eq "End" ) { if ( $viewableAttachmentCount > 0 ) { } if ( $showAttr ) { *************** *** 101,118 **** if ( ! $attrAttr || ( $showAttr && $attrAttr =~ /^[$showAttr]*$/ ) ) { $viewableAttachmentCount++; - $row .= "<tr>\n"; my $fileIcon = TWiki::Attach::filenameToIcon( $file ); - $row .= " <td>$fileIcon <a href=\"%SCRIPTURL%/viewfile/$theWeb/$theTopic?rev=$attrVersion&filename=$file\">$file</a></td>\n"; - $row .= " <td><a href=\"%SCRIPTURL%/attach/$theWeb/$theTopic?filename=$file&revInfo=1\">action</a></td>\n"; - $row .= " <td> $attrSize </td>\n"; - $row .= " <td> $attrDate </td>\n"; - $row .= " <td> $attrUser </td>\n"; $attrComment = $attrComment || " "; ! $row .= " <td> $attrComment </td>\n"; if ( $showAttr ) { $attrAttr = $attrAttr || "-"; ! $row .= " <td>$attrAttr</td>\n"; } - $row .= "</tr>\n"; } else { $noviewableAttachmentCount++; --- 96,108 ---- if ( ! $attrAttr || ( $showAttr && $attrAttr =~ /^[$showAttr]*$/ ) ) { $viewableAttachmentCount++; my $fileIcon = TWiki::Attach::filenameToIcon( $file ); $attrComment = $attrComment || " "; ! $row .= "| $fileIcon <a href=\"%SCRIPTURL%/viewfile/$theWeb/$theTopic?rev=$attrVersion&filename=$file\">$file</a> \\\n"; ! $row .= " | <a href=\"%SCRIPTURL%/attach/$theWeb/$theTopic?filename=$file&revInfo=1\">action</a> \\\n"; ! $row .= " | $attrSize | $attrDate | $attrUser | $attrComment |"; if ( $showAttr ) { $attrAttr = $attrAttr || "-"; ! $row .= " $attrAttr |"; } } else { $noviewableAttachmentCount++; |