<!-- start message list form control -->
<tr class="message_list_controls">
<td>
- <table class="table_empty" cellspacing="0">
- <tr>
- <td class="message_control_buttons">
-
-<?php
- foreach ($aFormElements as $widget_name => $widget_attrs) {
- switch ($widget_attrs['type']) {
- case 'submit':
- if ($widget_name != 'moveButton' && $widget_name != 'copyButton' && $widget_name != 'delete' && $widget_name != 'undeleteButton') { // add these later in another table cell
- echo '<input type="submit" name="' . $widget_name . '" value="' . $widget_attrs['value'] . '" class="message_control_button" /> ';
- }
- break;
- case 'checkbox':
- if ($widget_name != 'bypass_trash') {
- echo '<input type="checkbox" name="' . $widget_name . '" id="' . $widget_name . '" /><label for="' . $widget_name . '">' . $widget_attrs['value'] . '</label> ';
- }
- break;
- case 'hidden':
- echo '<input type="hidden" name="'.$widget_name.'" value="'. $widget_attrs['value']."\">\n";
- break;
- default: break;
- }
- }
-?>
- </td>
- <td class="message_control_delete">
-<?php
- if (isset($aFormElements['delete'])) {
- echo '<input type="submit" name="delete" value="' . $aFormElements['delete']['value'] . '" class="message_control_button" /> ';
- if (isset($aFormElements['bypass_trash'])) {
- echo '<input type="checkbox" name="bypass_trash" id="bypass_trash" /><label for="bypass_trash">' . $aFormElements['bypass_trash']['value'] . '</label> ';
- }
- if (isset($aFormElements['undeleteButton'])) {
- echo '<input type="submit" name="undeleteButton" value="' . $aFormElements['undeleteButton']['value'] . '" class="message_control_button" /> ';
- }
-?>
-
- </td>
-
-<?php
- } // if (isset($aFormElements['delete']))
- if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton'])) {
-?>
- <td class="message_control_move">
- <select name="targetMailbox">
- <?php echo $aFormElements['targetMailbox']['options_list'];?>
- </select>
-<?php
- if (isset($aFormElements['moveButton'])) {
- echo '<input type="submit" name="moveButton" value="' . $aFormElements['moveButton']['value'] . '" class="message_control_button" />';
- }
- if (isset($aFormElements['copyButton'])) {
- echo '<input type="submit" name="copyButton" value="' . $aFormElements['copyButton']['value'] . '" class="message_control_button" />';
- }
-?>
-
- </td>
-
-<?php
- } // if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton']))
-?>
- </tr>
- </table>
+ <?php
+ /**
+ * The following line gets the output from a separate
+ * template altogether (called "message_list_controls.tpl").
+ * $this is the Template class object.
+ */
+ $message_list_controls = $this->fetch('message_list_controls.tpl');
+ echo $message_list_controls ."\n"; ?>
</td>
</tr>
<!-- end message list form control -->
<!-- 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
*
// 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
$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) {
<?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;
'parentNode.parentNode, ' . $i . ', \'click\', \''. $class. '\', \'mouse_over\', \'' .
$clickedColor .'\');"';
}
- $sText .= ">";
- $sText .= $value . '</a>';
+ $sText .= ">"
+ . $value . '</a>';
if ($align['left'] == 'right') {
$sText .= str_repeat(' ',$indent);
}
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:
break;
}
}
-?>
- </tr>
-<?php
+
+ echo '</tr>';
$sLine = "<tr><td colspan=\"$iColCnt\" class=\"spacer\"></td></tr>\n";
++$i;
<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>
</tr>
<tr>
<td>
- <?php /* FIXME: no hooks in templates!! */ do_hook('mailbox_index_after', $null); ?>
+<?php if (!empty($plugin_output['mailbox_index_after'])) echo $plugin_output['mailbox_index_after']; ?>
</td>
</tr>
</table>