X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=templates%2Fdefault_advanced%2Fleft_main.tpl;h=d9b10765cdffb83afdf6a230833433d41793e847;hp=cedc11c7c0796fc7313460e0a971ca5e41df3569;hb=f48a90cae0cc40392dd10b2384d8a5d45bd91984;hpb=4f5c9970bd8eac27af894ec33dd6c973d09059dc diff --git a/templates/default_advanced/left_main.tpl b/templates/default_advanced/left_main.tpl index cedc11c7..d9b10765 100644 --- a/templates/default_advanced/left_main.tpl +++ b/templates/default_advanced/left_main.tpl @@ -67,7 +67,7 @@ * in all folders in this mailbox, * excluding trash folders. * - * @copyright © 1999-2006 The SquirrelMail Project Team + * @copyright © 1999-2009 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -75,19 +75,18 @@ * @author Steve Brown */ -/** include required files */ -include_once(SM_PATH . 'templates/util_global.php'); /* * Recursively parse the mailbox structure to build the navigation tree. * * @param array $box Array containing mailbox data * @param array $settings Array containing perferences, etc, passed to template + * @param string $icon_theme_path * @param integer $indent_factor Counter used to control indent spacing * @since 1.5.2 * @author Steve Brown */ -function buildMailboxTree ($box, $settings, $parent_node=-1) { +function buildMailboxTree ($box, $settings, $icon_theme_path, $parent_node=-1) { static $counter; // stop condition @@ -95,11 +94,10 @@ function buildMailboxTree ($box, $settings, $parent_node=-1) { return ''; } - $image_path = Template::calculate_template_images_directory($settings['templateID']); $out = ''; - if ($box['IsRoot']) { + if ($box['IsRoot']) { // Determine the path to the correct images - $out .= 'mailboxes = new dTree("mailboxes", "'.$image_path.'");'."\n"; + $out .= 'mailboxes = new dTree("mailboxes", "'.$icon_theme_path.'");'."\n"; $out .= 'mailboxes.config.inOrder = true;'."\n"; $counter = -1; } else { @@ -145,21 +143,21 @@ function buildMailboxTree ($box, $settings, $parent_node=-1) { $img_open = ''; switch (true) { case $box['IsInbox']: - $img = $image_path . 'base.png'; - $img_open = $image_path . 'base.png'; + $img = 'base.png'; + $img_open = 'base.png'; break; case $box['IsTrash']: - $img = $image_path . 'trash.png'; - $img_open = $image_path . 'trash.png'; + $img = 'trash.png'; + $img_open = 'trash.png'; break; case $box['IsNoSelect']: case $box['IsNoInferiors']: - $img = $image_path . 'page.png'; - $img_open = $image_path . 'page.png'; + $img = 'page.png'; + $img_open = 'page.png'; break; default: - $img = $image_path . 'folder.png'; - $img_open = $image_path . 'folderopen.png'; + $img = 'folder.png'; + $img_open = 'folderopen.png'; break; } @@ -197,6 +195,11 @@ function buildMailboxTree ($box, $settings, $parent_node=-1) { } } + // Add any extra output that may have been added by plugins, etc + // + if (!empty($box['ExtraOutput'])) + $end .= $box['ExtraOutput']; + $span = ''; $spanend = ''; if ($settings['useSpecialFolderColor'] && $box['IsSpecial']) { @@ -207,11 +210,6 @@ function buildMailboxTree ($box, $settings, $parent_node=-1) { $spanend = ''; } - /** - * NOTE: Plugins would horribly break this advanced tree, so we are - * going to skip that part altogether. - */ - $name = str_replace( array(' ','<','>'), array(' ','<','>'), @@ -228,18 +226,26 @@ function buildMailboxTree ($box, $settings, $parent_node=-1) { } if ($display_folder) { + + if ($box['IsInbox']) { + global $accesskey_folders_inbox; + $accesskey = $accesskey_folders_inbox; + } + else $accesskey = ''; + $out .= 'mailboxes.add('.$counter.', '.$parent_node.', ' . '"'.addslashes($name).'", "'.$url.'", "'.$title.'", ' . '"'.$target.'", ' . - '"'.$img.'", ' . - '"'.$img_open.'"' . + '"'.getIconPath($icon_theme_path, $img).'", ' . + '"'.getIconPath($icon_theme_path, $img_open).'", ' . + '"'.$accesskey.'"' . ');'."\n"; } } $parent_node = $counter; for ($i = 0; $i
- +
@@ -284,7 +291,7 @@ extract($t);

- [] + [target="left">]
@@ -292,21 +299,24 @@ extract($t);

-Open All +   |   -Close All + '; - echo 'Purge Trash'; + echo '' . _("Purge Trash") . ''; } ?>

- +