Try to distinguish summary between inline part and attachment
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 4 Nov 2009 23:46:34 +0000 (16:46 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 6 Nov 2009 20:50:09 +0000 (13:50 -0700)
imp/lib/UI/Message.php
imp/lib/Views/ShowMessage.php
imp/message.php
imp/themes/screen.css

index 3d1f15d..7188001 100644 (file)
@@ -413,16 +413,17 @@ class IMP_UI_Message
      * @param array $summary  Summary information from
      *                        IMP_Summary::getSummary().
      * @param array $display  The fields to display (in this order).
+     * @param boolean $atc    Is this an attachment?
      *
      * @return string  The formatted summary string.
      */
-    public function formatSummary($summary, $display)
+    public function formatSummary($summary, $display, $atc = false)
     {
         $tmp_summary = array();
         foreach ($display as $val) {
             $tmp_summary[] = $summary[$val];
         }
-        return '<div class="mimePartInfo"><div>' . implode(' ', $tmp_summary) . '</div></div>';
+        return '<div class="mimePartInfo' . ($atc ? ' mimePartInfoAtc' : '') . '"><div>' . implode(' ', $tmp_summary) . '</div></div>';
     }
 
     /**
index 9f6fbb9..705b2f1 100644 (file)
@@ -275,7 +275,7 @@ class IMP_Views_ShowMessage
                     }
 
                     if ($GLOBALS['prefs']->getValue('atc_display')) {
-                        $result['msgtext'] .= $imp_ui->formatSummary($imp_contents->getSummary($mime_id, $contents_mask), $part_info_display);
+                        $result['msgtext'] .= $imp_ui->formatSummary($imp_contents->getSummary($mime_id, $contents_mask), $part_info_display, true);
                     }
                 }
                 continue;
index 2f8763c..0ee3c59 100644 (file)
@@ -609,7 +609,7 @@ foreach ($parts_list as $mime_id => $mime_type) {
             }
 
             if ($prefs->getValue('atc_display')) {
-                $msgtext .= $imp_ui->formatSummary($imp_contents->getSummary($mime_id, $contents_mask), $part_info_display);
+                $msgtext .= $imp_ui->formatSummary($imp_contents->getSummary($mime_id, $contents_mask), $part_info_display, true);
             }
         }
         continue;
index a6129a2..24a2c26 100644 (file)
@@ -556,6 +556,13 @@ div.mimeStatusMessage, div.mimePartInfo {
 .mimePartInfo div img {
     vertical-align: bottom;
 }
+.mimePartInfoAtc div {
+    border: 1px dashed;
+    background-image: url("graphics/attachment.png");
+    background-position: 2px 50%;
+    background-repeat: no-repeat;
+    padding-left: 25px;
+}
 
 .mimeStatusMessage table td {
     padding: 0;