add squirrelmail attribution to the bottom of message list,
[squirrelmail.git] / templates / default / message_list.tpl
index 712ab353cfda96e537c0fba76c7f579f132e2d43..ce79d63592fcf11c2c8ead45be31c31a63784ed0 100644 (file)
@@ -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
@@ -131,7 +132,8 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16];
                        * $this is the Template class object.
                        */
                       $paginator_str = $this->fetch('paginator.tpl');
-                      echo $paginator_str . $thread_link_str ."\n"; ?>
+                      echo $paginator_str . '<small>[<a href="' . $thread_link_uri
+                                          . '">' . $thread_name . '</a>]</small>'; ?>
 <!-- end paginator and thread link string -->
               </td>
 <!-- message count string -->
@@ -254,29 +256,31 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16];
 
 <!-- Message headers start -->
 <?php
+
             $i = 0;
             $iColCnt = count($aOrder);
             $sLine = '';
 
+
             // this stuff does the auto row highlighting on mouseover
             //
             if ($javascript_on && $fancy_index_highlite) {
-
                 $mouseoverColor = $color[5];
-
-                // set this to an empty string to turn off extra
-                // highlighting of checked rows
-                //
-                //$clickedColor = '';
-                $clickedColor = (!empty($color[16])) ? $color[16] : $color[2];
-
                 $checkbox_javascript = ' onclick="this.checked = !this.checked;"';
+                // $clickedColor is defined at top of this file
             } else {
                 $checkbox_javascript = '';
             }
+
+
+            /**
+              * main message iteration loop
+              */
             foreach ($aMessages as $iUid => $aMsg) {
+
                 echo $sLine;
 
+
 /**
 * Display message header row in messages list
 *
@@ -333,7 +337,7 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16];
     // 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\', \'' . $class . '\', \'mouse_over\', \'clicked\');" onmousedown="setPointer(this, ' . $i . ', \'click\', \'' . $class . '\', \'mouse_over\', \'clicked\');"';
     }
     // this does the auto-checking of the checkbox no matter
     // where on the row you click
@@ -395,7 +399,6 @@ if ($class != 'even' && $class != 'odd')
         $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) {
@@ -411,7 +414,7 @@ if ($class != 'even' && $class != 'odd')
             <?php
             } else {
                 echo '<td class="col_check">';
-                $checked = ($checkall) ? " checked=checked " : " ";
+                $checked = ($checkall) ? ' checked=checked ' : '';
                 echo "<input type=\"checkbox\" name=\"msg[".$i."]\" id=\"".$form_id."_msg$i\" value=\"$iUid\" $checked/></td>";
             }
             break;
@@ -431,8 +434,8 @@ if ($class != 'even' && $class != 'odd')
                             'parentNode.parentNode, ' . $i . ', \'click\', \''. $class. '\', \'mouse_over\', \'' .
                              $clickedColor .'\');"';
             }
-            $sText .= ">";
-            $sText .= $value . '</a>';
+            $sText .= ">"
+                   . $value . '</a>';
             if ($align['left'] == 'right') {
                 $sText .= str_repeat('&nbsp;&nbsp;',$indent);
             }
@@ -440,14 +443,14 @@ if ($class != 'even' && $class != 'odd')
             break;
           case SQM_COL_SIZE:
           case SQM_COL_FLAGS:
-            $sText = "    <td class=\"col_flags\" $javascript_auto_click>";
-            $sText .= "$value</td>\n";
+            $sText = "    <td class=\"col_flags\" $javascript_auto_click>"
+                   . "$value</td>\n";
             echo $sText;
             break;
           case SQM_COL_INT_DATE:
           case SQM_COL_DATE:
-            $sText = "    <td class=\"col_date\" $javascript_auto_click>";
-            $sText .= $value. "</td>\n";
+            $sText = "    <td class=\"col_date\" $javascript_auto_click>"
+                   . $value. "</td>\n";
             echo $sText;
             break;
           default:
@@ -467,9 +470,8 @@ if ($class != 'even' && $class != 'odd')
             break;
         }
     }
-?>
-                  </tr>
-<?php
+
+            echo '</tr>';
             $sLine = "<tr><td colspan=\"$iColCnt\" class=\"spacer\"></td></tr>\n";
             ++$i;
 
@@ -494,7 +496,15 @@ if ($class != 'even' && $class != 'odd')
               <td>
                 <table class="table_empty" cellspacing="0">
                   <tr>
-                    <td class="links_paginator"><?php echo $paginator_str; ?></td>
+                    <td class="links_paginator"><?php 
+                     /**
+                       * The following line gets the output from a separate 
+                       * template altogether (called "paginator.tpl").
+                       * $this is the Template class object.
+                       */
+                      $paginator_str = $this->fetch('paginator.tpl');
+                      echo $paginator_str; 
+                    ?></td>
                     <td class="message_count"><?php echo $msg_cnt_str; ?></td>
                   </tr>
                 </table>
@@ -504,10 +514,14 @@ if ($class != 'even' && $class != 'odd')
         </td>
       </tr>
       <tr>
-        <td>
-        <?php /* FIXME: no hooks in templates!! */ do_hook('mailbox_index_after', $null); ?>
+        <td align="right">
+<?php if (!empty($plugin_output['mailbox_index_after'])) echo $plugin_output['mailbox_index_after']; ?>
         </td>
       </tr>
     </table>
 </form>
 </div>
+
+<?php if (!$hide_sm_attributions): ?>
+<p class="sqm_squirrelcopyright">&copy; 1999-2007 The SquirrelMail Project Team - <a href="about.php">About SquirrelMail</a></p>
+<?php endif; ?>