copyright update
[squirrelmail.git] / templates / default / message_list.tpl
index cbf256d0a3be143d0dcc6fd1258e88101341b5e2..85b4646a43161a5a33a5f8584625d0da02a15794 100644 (file)
@@ -3,11 +3,10 @@
 /**
  * message_list.tpl
  *
- * 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
  *
+ * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  * @subpackage templates
@@ -35,13 +34,13 @@ if ($pageOffset < $end_msg) {
 
 
 if (!($sort & SQSORT_THREAD) && $enablesort) {
-    $aSortSupported = array(SQM_COL_SUBJ =>     array(SQSORT_SUBJ_ASC    , SQSORT_SUBJ_DESC),
-                            SQM_COL_DATE =>     array(SQSORT_DATE_ASC    , SQSORT_DATE_DESC),
-                            SQM_COL_INT_DATE => array(SQSORT_INT_DATE_ASC, SQSORT_INT_DATE_DESC),
-                            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));
+    $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();
 }
@@ -324,7 +323,7 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16];
                 //$clickedColor = '';
                 $clickedColor = (!empty($color[16])) ? $color[16] : $color[2];
 
-                $checkbox_javascript = ' onClick="this.checked = !this.checked;"';
+                $checkbox_javascript = ' onclick="this.checked = !this.checked;"';
             } else {
                 $checkbox_javascript = '';
             }
@@ -454,17 +453,20 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16];
      */
     foreach ($aOrder as $iCol) {
         if (in_array($iCol, $show_label_columns)) {
-            $sLabelStart = '<label for="msg[' . $i . ']">';
+            $sLabelStart = '<label for="'.$form_id."_msg$i\">";
             $sLabelEnd = '</label>';
         } else {
             $sLabelStart = '';
             $sLabelEnd = '';
         }
-        $aCol = (isset($aColumns[$iCol])) ? $aColumns[$iCol] : array();
-        $title  = (isset($aCol['title']))  ? $aCol['title']  : '';
-        $link   = (isset($aCol['link']))   ? $aCol['link']   : '';
-        $value  = (isset($aCol['value']))  ? $aCol['value']  : '';
-        $target = (isset($aCol['target'])) ? $aCol['target'] : '';
+        $aCol       = (isset($aColumns[$iCol]))    ? $aColumns[$iCol]    : array();
+        $title      = (isset($aCol['title']))      ? $aCol['title']      : '';
+        $link       = (isset($aCol['link']))       ? $aCol['link']       : '';
+        $link_extra = (isset($aCol['link_extra'])) ? $aCol['link_extra'] : '';
+        $onclick    = (isset($aCol['onclick']))    ? $aCol['onclick']    : '';
+        $link       = (isset($aCol['link']))       ? $aCol['link']       : '';
+        $value      = (isset($aCol['value']))      ? $aCol['value']      : '';
+        $target     = (isset($aCol['target']))     ? $aCol['target']     : '';
         if ($iCol !== SQM_COL_CHECK) {
             $value = $sLabelStart.$sPre.$value.$sEnd.$sLabelEnd;
         }
@@ -483,8 +485,10 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16];
                 $sText .= str_repeat('&nbsp;&nbsp;',$indent);
             }
             $sText .= "<a href=\"$link\"";
-            if ($target) { $sText .= " target=\"$target\"";}
-            if ($title)  { $sText .= " title=\"$title\""  ;}
+            if ($target)     { $sText .= " target=\"$target\"";   }
+            if ($title)      { $sText .= " title=\"$title\"";     }
+            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\', \'' . $bgcolor . '\', \'' . $mouseoverColor . '\', \'' .