Explorar el Código

Tweaked printer friendly attachment display. Looked a little odd squished
over on the left. Removed invalid html, and set widths on the "headers".

What do people think of this display? I think it needs css borders rather
than the good ol' html borders.

jangliss hace 19 años
padre
commit
904b465f5e
Se han modificado 2 ficheros con 8 adiciones y 7 borrados
  1. 1 0
      ChangeLog
  2. 7 7
      src/printer_friendly_bottom.php

+ 1 - 0
ChangeLog

@@ -479,6 +479,7 @@ Version 1.5.1 -- CVS
     than 6 (#1339211).
   - Allow double quote to be used in MOTD (#1276959).
   - Prevent right_frame to be set to '//www.example.com'.
+  - Tweak printer friendly attachment view.
 
 Version 1.5.0 - 2 February 2004
 -------------------------------

+ 7 - 7
src/printer_friendly_bottom.php

@@ -260,13 +260,13 @@ function pf_show_attachments($message, $exclude_id, $mailbox, $id) {
         $display_filename = $filename;
 
         // TODO: maybe make it nicer?
-        $attachments .= '<table cellpadding="0" cellspacing="0" border="1"><tr><th colspan="2">'.decodeHeader($display_filename).'</th></tr>' .
-            '<tr border="0">'.
-            html_tag( 'td',_("Size:"), 'right') .
-            html_tag( 'td',show_readable_size($header->size), 'left') .
-            '</tr><tr>' .
-            html_tag( 'td',_("Type:"), 'right') .
-            html_tag( 'td',htmlspecialchars($type0).'/'.htmlspecialchars($type1), 'left') . 
+        $attachments .= '<table cellpadding="1" cellspacing="0" width="100%" border="1"><tr><th colspan="2">'.decodeHeader($display_filename).'</th></tr>' .
+            '<tr>'. 
+            html_tag( 'td',_("Size:"), 'right', '', 'width="25%"') . 
+            html_tag( 'td',show_readable_size($header->size), 'left', '', 'width="75%"') .
+            '</tr><tr>' . "\n" .
+            html_tag( 'td',_("Type:"), 'right', '', 'width="25%"') .
+            html_tag( 'td',htmlspecialchars($type0).'/'.htmlspecialchars($type1), 'left', '', 'width="75%"') . 
             '</tr>';
         if (! empty($description)) {
             $attachments .= $description;