*
* Template for viewing a messages list
*
+ * The following variables are available in this template:
+//FIXME: need to clean (and document) this list, it is just a dump of the array keys of $t
+ * $sTemplateID
+ * $icon_theme_path
+ * $javascript_on
+ * $delayed_errors
+ * $frames
+ * $lang
+ * $page_title
+ * $header_tags
+ * $plugin_output
+ * $header_sent
+ * $body_tag_js
+ * $shortBoxName
+ * $sm_attribute_str
+ * $frame_top
+ * $urlMailbox
+ * $startMessage
+ * $hide_sm_attributions
+ * $uri
+ * $text
+ * $onclick
+ * $class
+ * $id
+ * $target
+ * $color
+ * $form_name
+ * $form_id
+ * $page_selector
+ * $page_selector_max
+ * $messagesPerPage
+ * $showall
+ * $end_msg
+ * $align
+ * $iNumberOfMessages
+ * $aOrder
+ * $aFormElements
+ * $sort
+ * $pageOffset
+ * $baseurl
+ * $aMessages
+ * $trash_folder
+ * $sent_folder
+ * $draft_folder
+ * $thread_link_str
+ * $php_self
+ * $mailbox
+ * $enablesort
+ * $icon_theme
+ * $use_icons
+ * $alt_index_colors
+ * $fancy_index_highlite
+ * $compact_paginator
+ * $aErrors
+ *
* @copyright © 1999-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
/** add required includes */
-include_once(SM_PATH . 'templates/util_global.php');
-include_once(SM_PATH . 'templates/util_message_list.php');
+include_once(SM_PATH . 'functions/template/message_list_util.php');
/* retrieve the template vars */
extract($t);
-do_hook('mailbox_index_before');
+if (!empty($plugin_output['mailbox_index_before'])) echo $plugin_output['mailbox_index_before'];
/**
* Calculate string "Viewing message x to y (z total)"
foreach ($aFormElements as $key => $value) {
switch ($value[1]) {
case 'submit':
- if ($key != 'moveButton' && $key != 'delete' && $key != 'undeleteButton') { // add move in a different table cell
+ if ($key != 'moveButton' && $key != 'copyButton' && $key != 'delete' && $key != 'undeleteButton') { // add move in a different table cell
?>
<input type="submit" name="<?php echo $key; ?>" value="<?php echo $value[0]; ?>" class="message_control_button" />
<?php
case 'checkbox':
if ($key != 'bypass_trash') {
?>
- <input type="checkbox" name="<?php echo $key; ?>" /><?php echo $value[0]; ?>
+ <input type="checkbox" name="<?php echo $key; ?>" id="<?php echo $key; ?>" /><label for="<?php echo $key; ?>"><?php echo $value[0]; ?></label>
<?php
}
break;
<?php
if (isset($aFormElements['bypass_trash'])) {
?>
- <input type="checkbox" name="bypass_trash" /><?php echo $aFormElements['bypass_trash'][0]; ?>
+ <input type="checkbox" name="bypass_trash" id="bypass_trash" /><label for="bypass_trash"><?php echo $aFormElements['bypass_trash'][0]; ?></label>
<?php
}
if (isset($aFormElements['undeleteButton'])) {
</td>
<?php
} // if (isset($aFormElements['delete']))
- if (isset($aFormElements['moveButton'])) {
+ if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton'])) {
?>
<td class="message_control_move">
<select name="targetMailbox">
<?php echo $aFormElements['targetMailbox'][0];?>
</select>
+<?php if (isset($aFormElements['moveButton'])) { ?>
<input type="submit" name="moveButton" value="<?php echo $aFormElements['moveButton'][0]; ?>" class="message_control_button" />
+<?php }
+ if (isset($aFormElements['copyButton'])) { ?>
+ <input type="submit" name="copyButton" value="<?php echo $aFormElements['copyButton'][0]; ?>" class="message_control_button" />
+<?php } ?>
</td>
<?php
?>
</table>
<?php
- do_hook('mailbox_form_before');
+ //FIXME: no hooks in templates!
+ do_hook('mailbox_form_before', $null);
?>
</td>
</tr>
</tr>
<tr>
<td>
- <?php do_hook('mailbox_index_after');?>
+ <?php /* FIXME: no hooks in templates!! */ do_hook('mailbox_index_after', $null); ?>
</td>
</tr>
</table>