X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=templates%2Fdefault%2Fmessage_list.tpl;h=01aab28b3a7600c3726f6aac6474206b90c0441c;hp=cb04f12a1398f2c28492d5003598b16ccda61e4a;hb=069a91d353789f95214d40e7f38b4cd0cb240dd7;hpb=2bca4fda62efe475f73eb72f7c41e9df16503e15 diff --git a/templates/default/message_list.tpl b/templates/default/message_list.tpl index cb04f12a..01aab28b 100644 --- a/templates/default/message_list.tpl +++ b/templates/default/message_list.tpl @@ -3,7 +3,7 @@ /** * message_list.tpl * - * Copyright (c) 1999-2004 The SquirrelMail Project Team + * Copyright (c) 1999-2005 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * Template for viewing a messages list @@ -12,6 +12,7 @@ * @package squirrelmail */ +/** add required includes */ include_once(SM_PATH . 'templates/util_message_list.php'); /* retrieve the template vars */ @@ -75,22 +76,30 @@ if (!($javascript_on && $fancy_index_highlite)) { } } +/** + * Check usage of images for attachments, flags and priority + */ +$bIcons = ($use_icons && $icon_theme) ? true : false; + +/** + * Location of icon images + */ +if ($bIcons) { + $sImageLocation = SM_PATH . 'images/themes/' . $icon_theme . '/'; +} + // set this to an empty string to turn off extra // highlighting of checked rows // //$clickedColor = ''; -if (!empty($color[16])) - $clickedColor = $color[16]; -else - $clickedColor = $color[2]; - +$clickedColor = (empty($color[16])) ? $color[2] : $color[16]; ?>
- +
@@ -131,7 +140,7 @@ else case 'submit': if ($key != 'moveButton') { // add move in a different table cell ?> -   +   - + - "; + $sText = " \n"; echo $sText; break; case SQM_COL_INT_DATE: case SQM_COL_DATE: - $sText = " \n"; echo $sText; break; default: - $sText = "
+ '; + } else { + echo ' '; + } + break; case SQM_COL_SIZE: echo _("Size"); break; - case SQM_COL_PRIO: echo '!'; break; - case SQM_COL_ATTACHMENT: echo '+'; break; + case SQM_COL_PRIO: + if ($bIcons) { + echo '!'; + } else { + echo '!'; + } + break; + case SQM_COL_ATTACHMENT: + if ($bIcons) { + echo '+'; + } else { + echo '+'; + } + break; case SQM_COL_INT_DATE: echo _("Received"); break; case SQM_COL_TO: echo _("To"); break; case SQM_COL_CC: echo _("Cc"); break; @@ -284,18 +311,6 @@ else $aColumns = $aMsg['columns']; - /** - * Check usage of images for attachments, flags and priority - * Aaaaaaaaaah fix me. DO NOT USE the string "None" if you mean FALSE, no icon theme - */ - $bIcons = ($use_icons && $icon_theme) ? true : false; - - /** - * Location of icon images - */ - if ($bIcons) { - $sImageLocation = SM_PATH . 'images/themes/' . $icon_theme . '/'; - } /** * Check the flags and set a class var. @@ -391,16 +406,18 @@ else '; $sEnd = ''; - } - if (in_array('deleted',$aFlags) && $aFlags['deleted']) { - $sPre = "" . $sPre; - $sEnd .= ''; - } else { - if (in_array('flagged',$aFlags) && $aFlags['flagged']) { - $sPre = "" . $sPre; + if (isset($aColumns[SQM_COL_FLAGS])) { + if (!in_array('seen',$aFlags)) { + $sPre = ''; $sEnd = ''; + } + if (in_array('deleted',$aFlags) && $aFlags['deleted']) { + $sPre = "" . $sPre; $sEnd .= ''; + } else { + if (in_array('flagged',$aFlags) && $aFlags['flagged']) { + $sPre = "" . $sPre; + $sEnd .= ''; + } } } /** @@ -408,8 +425,7 @@ else * we have to do some php coding to display the columns in the right order */ foreach ($aOrder as $iCol) { - // FIXME: first parameter cannot be an array in PHP < 4.2 - if (in_array($index_order_part, $show_label_columns)) { + if (in_array($iCol, $show_label_columns)) { $sLabelStart = ''; } else { @@ -428,7 +444,7 @@ else switch ($iCol) { case SQM_COL_CHECK: - echo '' ?> + echo '' ?> " id="" value="" /> "; $sText .= "$value"; + $sText = " "; $sText .= $value. "
- +