From b5e94525a0ec0e28b83d30c584e2cddbd8c600d6 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 10 Mar 2007 05:48:35 +0000 Subject: [PATCH] Templatize (un)collapse buttons; move all templates to default_advanced, since default template does not use preview_pane plugin. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12332 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/preview_pane/functions.php | 27 +++------- .../default_advanced/collapse_buttons.tpl | 50 +++++++++++++++++++ .../empty_frame.tpl | 0 3 files changed, 57 insertions(+), 20 deletions(-) create mode 100644 plugins/preview_pane/templates/default_advanced/collapse_buttons.tpl rename plugins/preview_pane/templates/{default => default_advanced}/empty_frame.tpl (100%) diff --git a/plugins/preview_pane/functions.php b/plugins/preview_pane/functions.php index 4afe4716..43e139a3 100644 --- a/plugins/preview_pane/functions.php +++ b/plugins/preview_pane/functions.php @@ -88,7 +88,7 @@ function preview_pane_open_close_buttons_do() if (!show_preview_pane()) return; - global $data_dir, $username, $base_uri; + global $data_dir, $username, $base_uri, $oTemplate; $previewPane_vertical_split = getPref($data_dir, $username, 'previewPane_vertical_split', 0); if ($previewPane_vertical_split) { @@ -106,26 +106,13 @@ function preview_pane_open_close_buttons_do() $previewPane_size = getPref($data_dir, $username, 'previewPane_size', 300); + $oTemplate->assign('previewPane_size', $previewPane_size); + $oTemplate->assign('base_uri', $base_uri); + $oTemplate->assign('split', $split); + $oTemplate->assign('down_arrow', $down_arrow); + $oTemplate->assign('up_arrow', $up_arrow); - $output = "\n\n" - . '
' - . '' - . '' - . '' - . '
'; + $output = $oTemplate->fetch('plugins/preview_pane/collapse_buttons.tpl'); return array('provider_link_before' => $output); diff --git a/plugins/preview_pane/templates/default_advanced/collapse_buttons.tpl b/plugins/preview_pane/templates/default_advanced/collapse_buttons.tpl new file mode 100644 index 00000000..0ac48e84 --- /dev/null +++ b/plugins/preview_pane/templates/default_advanced/collapse_buttons.tpl @@ -0,0 +1,50 @@ + + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package plugins + * @subpackage preview_pane + * + */ + + +// retrieve the template vars +// +extract($t); + + +?> +
+ + + +
diff --git a/plugins/preview_pane/templates/default/empty_frame.tpl b/plugins/preview_pane/templates/default_advanced/empty_frame.tpl similarity index 100% rename from plugins/preview_pane/templates/default/empty_frame.tpl rename to plugins/preview_pane/templates/default_advanced/empty_frame.tpl -- 2.25.1