X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=templates%2Fdefault%2Fmessage_list.tpl;h=4e69b1013444e9971bc7b74a3fdb7ead208e8c98;hb=5d0f90f4cf688a471e7d92893a37f0c8932909db;hp=73e6345ab93547a9b363d662ea1bcac46d39f468;hpb=a1d29fb8ec4da41eea13f093cf58f33082b7a84e;p=squirrelmail.git diff --git a/templates/default/message_list.tpl b/templates/default/message_list.tpl index 73e6345a..4e69b101 100644 --- a/templates/default/message_list.tpl +++ b/templates/default/message_list.tpl @@ -19,7 +19,7 @@ * $header_sent * $body_tag_js * $shortBoxName - * $sm_attribute_str + * $provider_link * $frame_top * $urlMailbox * $startMessage @@ -49,7 +49,8 @@ * $trash_folder * $sent_folder * $draft_folder - * $thread_link_str + * $thread_link_uri + * $thread_name * $php_self * $mailbox * $enablesort @@ -57,95 +58,67 @@ * $use_icons * $alt_index_colors * $fancy_index_highlite + * $aSortSupported + * $show_label_columns * $compact_paginator * $aErrors + * $checkall + * $preselected + * $show_personal_names boolean When turned on, all email + * address fields should display + * the personal name and use the + * email address as a tool tip; + * When turned off, this logic + * should be inverted + * $accesskey_mailbox_toggle_selected The access key to use for the toggle all checkbox + * $accesskey_mailbox_thread The access key to use for the Thread/Unthread links * - * @copyright © 1999-2006 The SquirrelMail Project Team + * @copyright 1999-2012 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail * @subpackage templates */ + /** add required includes */ include_once(SM_PATH . 'functions/template/message_list_util.php'); + /* retrieve the template vars */ extract($t); + if (!empty($plugin_output['mailbox_index_before'])) echo $plugin_output['mailbox_index_before']; + /** * Calculate string "Viewing message x to y (z total)" */ $msg_cnt_str = ''; if ($pageOffset < $end_msg) { $msg_cnt_str = sprintf(_("Viewing Messages: %s to %s (%s total)"), - ''.$pageOffset.'', ''.$end_msg.'', $iNumberOfMessages); + '' . $pageOffset . '', + '' . $end_msg . '', + $iNumberOfMessages); } else if ($pageOffset == $end_msg) { - $msg_cnt_str = sprintf(_("Viewing Message: %s (%s total)"), ''.$pageOffset.'', $iNumberOfMessages); -} - - - -if (!($sort & SQSORT_THREAD) && $enablesort) { - $aSortSupported = array(SQM_COL_SUBJ => array(SQSORT_SUBJ_ASC , SQSORT_SUBJ_DESC), - SQM_COL_DATE => array(SQSORT_DATE_DESC , SQSORT_DATE_ASC), - SQM_COL_INT_DATE => array(SQSORT_INT_DATE_DESC, SQSORT_INT_DATE_ASC), - SQM_COL_FROM => array(SQSORT_FROM_ASC , SQSORT_FROM_DESC), - SQM_COL_TO => array(SQSORT_TO_ASC , SQSORT_TO_DESC), - SQM_COL_CC => array(SQSORT_CC_ASC , SQSORT_CC_DESC), - SQM_COL_SIZE => array(SQSORT_SIZE_ASC , SQSORT_SIZE_DESC)); -} else { - $aSortSupported = array(); + $msg_cnt_str = sprintf(_("Viewing Message: %s (%s total)"), + '' . $pageOffset . '', + $iNumberOfMessages); } -// figure out which columns should serve as labels for checkbox: -// we try to grab the two columns before and after the checkbox, -// except the subject column, since it is the link that opens -// the message view -// -// if $javascript_on is set, then the highlighting code takes -// care of this; just skip it -// -$show_label_columns = array(); -$index_order_part = array(); -if (!($javascript_on && $fancy_index_highlite)) { - $get_next_two = 0; - $last_order_part = 0; - $last_last_order_part = 0; - foreach ($aOrder as $index_order_part) { - if ($index_order_part == SQM_COL_CHECK) { - $get_next_two = 1; - if ($last_last_order_part != SQM_COL_SUBJ) - $show_label_columns[] = $last_last_order_part; - if ($last_order_part != SQM_COL_SUBJ) - $show_label_columns[] = $last_order_part; - - } else if ($get_next_two > 0 && $get_next_two < 3 && $index_order_part != SQM_COL_SUBJ) { - $show_label_columns[] = $index_order_part; - $get_next_two++; - } - $last_last_order_part = $last_order_part; - $last_order_part = $index_order_part; - } -} /** * All icon functionality is now handled through $icon_theme_path. * $icon_theme_path will contain the path to the user-selected theme. If it is * NULL, the user and/or admin have turned off icons. -*/ + */ -// set this to an empty string to turn off extra -// highlighting of checked rows -// -//$clickedColor = ''; -$clickedColor = (empty($color[16])) ? $color[2] : $color[16]; ?>
+ @@ -177,76 +158,14 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16]; @@ -254,10 +173,7 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16]; } // if (count($aFormElements)) ?>
@@ -157,11 +130,19 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16];
- - - - - - - - - -
- - $value) { - switch ($value[1]) { - case 'submit': - if ($key != 'moveButton' && $key != 'copyButton' && $key != 'delete' && $key != 'undeleteButton') { // add move in a different table cell -?> -   - -   -\n"; - break; - default: break; - } - } -?> - - - - -   - -   - -   - - - - - - - - -
+ fetch('message_list_controls.tpl'); + echo $message_list_controls ."\n"; ?>
- + @@ -275,44 +191,55 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16]; * this issue. We will use TR/TD w/ another CSS class to work around this. */ ?> + + + + '."\n"; + $checked = ($checkall ? ' checked="checked" ' : ''); + $accesskey = ($accesskey_mailbox_toggle_selected == 'NONE' ? '' + : ' accesskey="' . $accesskey_mailbox_toggle_selected . '" '); + echo '' . "\n"; } else { - $link = $baseurl . "&startMessage=$pageOffset&checkall="; - if (sqgetGlobalVar('checkall',$checkall,SQ_GET)) { - $link .= ($checkall) ? '0' : '1'; - } else { - $link .= '1'; - } - echo ""._("All").''; + $link = $baseurl + . "&startMessage=$pageOffset&checkall=" + . ($checkall ? '0' : '1'); + echo "" . _("All") . ''; } break; - case SQM_COL_FROM: echo _("From")."\n"; break; - case SQM_COL_DATE: echo _("Date")."\n"; break; - case SQM_COL_SUBJ: echo _("Subject")."\n"; break; + case SQM_COL_FROM: + echo '\n"; + break; + case SQM_COL_DATE: echo _("Date") . "\n"; break; + case SQM_COL_SUBJ: echo _("Subject") . "\n"; break; case SQM_COL_FLAGS: echo getIcon($icon_theme_path, 'msg_new.png', ' ', _("Message Flags")) . "\n"; break; - case SQM_COL_SIZE: echo _("Size")."\n"; break; + case SQM_COL_SIZE: echo _("Size") . "\n"; break; case SQM_COL_PRIO: echo getIcon($icon_theme_path, 'prio_high.png', '!', _("Priority")) . "\n"; break; case SQM_COL_ATTACHMENT: echo getIcon($icon_theme_path, 'attach.png', '+', _("Attachment")) . "\n"; break; - case SQM_COL_INT_DATE: echo _("Received")."\n"; break; - case SQM_COL_TO: echo _("To")."\n"; break; - case SQM_COL_CC: echo _("Cc")."\n"; break; - case SQM_COL_BCC: echo _("Bcc")."\n"; break; + case SQM_COL_INT_DATE: echo _("Received") . "\n"; break; + case SQM_COL_TO: + echo '\n"; + break; + case SQM_COL_CC: echo _("Cc") . "\n"; break; + case SQM_COL_BCC: echo _("Bcc") . "\n"; break; default: break; } // add the sort buttons @@ -345,29 +272,34 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16]; $aMsg) { + echo $sLine; + /** * Display message header row in messages list * @@ -402,45 +334,68 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16]; $aColumns[SQM_COL_ATTACHMENT]['value'] = $sValue; } - $class = 'even'; + $class = (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite ? 'clicked_even' : 'even'); + $non_clicked_class = 'even'; + /** * If alternating row colors is set, adapt the CSS class */ if (isset($alt_index_colors) && $alt_index_colors) { if (!($i % 2)) { - $class = 'odd'; + $class = (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite ? 'clicked_odd' : 'odd'); + $non_clicked_class = 'odd'; } } + + /** + * Message Highlighting Functionality + */ if (isset($aMsg['row']['color'])) { - $bgcolor = $aMsg['row']['color']; - $class = 'misc'.$i; + if (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite) { +//FIXME: would be best not to use $color directly here; want to move this to be a CSS style-defined value only, but the problem is that this CSS class is being defined on the fly right here + $bgcolor = $color[16]; + $class = 'clicked_misc'.$i; + } else { + $bgcolor = $aMsg['row']['color']; + $class = 'misc'.$i; + } + $non_clicked_class = 'misc'.$i; + $non_clicked_bgcolor = $aMsg['row']['color']; + } + else + { + $bgcolor = ''; + $non_clicked_bgcolor = ''; } - else $bgcolor = ''; $row_extra = ''; // this stuff does the auto row highlighting on mouseover // if ($javascript_on && $fancy_index_highlite) { - $row_extra .= ' onmouseover="rowOver(\''.$form_id . '_msg' . $i.'\');" onmouseout="setPointer(this, ' . $i . ', \'out\', \'' . $class . '\', \'mouse_over\', \'clicked\');" onmousedown="setPointer(this, ' . $i . ', \'click\', \'' . $class . '\', \'mouse_over\', \'clicked\');"'; + $row_extra = ' onmouseover="rowOver(\''.$form_id . '_msg' . $i.'\');" onmouseout="setPointer(this, ' . $i . ', \'out\', \'' . $non_clicked_class . '\', \'mouse_over\', \'clicked\');" onmousedown="setPointer(this, ' . $i . ', \'click\', \'' . $non_clicked_class . '\', \'mouse_over\', \'clicked\');"'; } // this does the auto-checking of the checkbox no matter // where on the row you click // $javascript_auto_click = ''; + $row_click_extra = ''; + if (!empty($plugin_output['row_click_extra'])) $row_click_extra = $plugin_output['row_click_extra']; if ($javascript_on && $fancy_index_highlite) { // include the form_id in order to show multiple messages lists. Otherwise id isn't unique - $javascript_auto_click = " onMouseDown=\"row_click('$form_id"."_msg$i')\""; + $javascript_auto_click = " onmousedown=\"row_click('$form_id"."_msg$i', event, '$form_name', 'msg[' + $i + ']', '$row_click_extra')\""; } + /* * Message Highlighting requires a unique CSS class declaration for proper * mouseover functionality. There is no harm in doing this when the mouseover * functionality is disabled */ -if ($class != 'even' && $class != 'odd') +if ($class != 'even' && $class != 'odd' + && $class != 'clicked_even' && $class != 'clicked_odd') { ?> + + > ' ?> - " id="" value="" /> + " id="" value="" /> '; - $checked = ($checkall) ? " checked=checked " : " "; echo ""; } break; @@ -518,12 +496,11 @@ if ($class != 'even' && $class != 'odd') if ($onclick) { $sText .= " onclick=\"$onclick\""; } if ($link_extra) { $sText .= " $link_extra"; } if ($javascript_on && $fancy_index_highlite) { - $sText .= " onmousedown=\"row_click('$form_id"."_msg$i'); setPointer(this." . (empty($bold) ? '' : 'parentNode.') . - 'parentNode.parentNode, ' . $i . ', \'click\', \''. $class. '\', \'mouse_over\', \'' . - $clickedColor .'\');"'; + $sText .= " onmousedown=\"row_click('$form_id"."_msg$i', event, '$form_name', 'msg[' + $i + ']', '$row_click_extra'); setPointer(this." . (empty($bold) ? '' : 'parentNode.') . + 'parentNode.parentNode, ' . $i . ', \'click\', \''. $non_clicked_class. '\', \'mouse_over\', \'clicked\');"'; } - $sText .= ">"; - $sText .= $value . ''; + $sText .= ">" + . $value . ''; if ($align['left'] == 'right') { $sText .= str_repeat('  ',$indent); } @@ -531,14 +508,14 @@ if ($class != 'even' && $class != 'odd') break; case SQM_COL_SIZE: case SQM_COL_FLAGS: - $sText = " "; - $sText .= "$value\n"; + $sText = " " + . "$value\n"; echo $sText; break; case SQM_COL_INT_DATE: case SQM_COL_DATE: - $sText = " "; - $sText .= $value. "\n"; + $sText = " " + . $value. "\n"; echo $sText; break; default: @@ -558,9 +535,8 @@ if ($class != 'even' && $class != 'odd') break; } } -?> - -'; $sLine = "\n"; ++$i; @@ -585,7 +561,16 @@ if ($class != 'even' && $class != 'odd') - +
@@ -595,10 +580,14 @@ if ($class != 'even' && $class != 'odd') - - + +
+ + +

© The SquirrelMail Project Team - About SquirrelMail

+