From: pdontthink Date: Mon, 1 Jan 2007 00:37:42 +0000 (+0000) Subject: Refactor message list control widgets into their own template file; useful if we... X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=69a023cff70c943d30c800d301204c82a99b9bba;hp=4127171c46d6990dfdc6fd4a4cda39299ff1fbfd;ds=sidebyside Refactor message list control widgets into their own template file; useful if we want to show controls at bottom of message list as well, HOWEVER, note that while most browsers handle it perfectly fine, putting same-named widgets on one page is bad news; I think invalid HTML, so we might try to figure out a way to rename widgets(?). git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12041 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/templates/default/message_list.tpl b/templates/default/message_list.tpl index a8623307..712ab353 100644 --- a/templates/default/message_list.tpl +++ b/templates/default/message_list.tpl @@ -147,69 +147,14 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16]; - - - - - - - - - - -
- - $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 ' '; - } - break; - case 'checkbox': - if ($widget_name != 'bypass_trash') { - echo ' '; - } - break; - case 'hidden': - echo '\n"; - break; - default: break; - } - } -?> - - '; - if (isset($aFormElements['bypass_trash'])) { - echo ' '; - } - if (isset($aFormElements['undeleteButton'])) { - echo ' '; - } -?> - - - -'; - } - if (isset($aFormElements['copyButton'])) { - echo ''; - } -?> - -
+ fetch('message_list_controls.tpl'); + echo $message_list_controls ."\n"; ?> diff --git a/templates/default/message_list_controls.tpl b/templates/default/message_list_controls.tpl new file mode 100644 index 00000000..bd650ed2 --- /dev/null +++ b/templates/default/message_list_controls.tpl @@ -0,0 +1,144 @@ + + + + + + + + + + + +
+ + $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 ' '; + } + break; + case 'checkbox': + if ($widget_name != 'bypass_trash') { + echo ' '; + } + break; + case 'hidden': + echo '\n"; + break; + default: break; + } + } +?> + + '; + if (isset($aFormElements['bypass_trash'])) { + echo ' '; + } + if (isset($aFormElements['undeleteButton'])) { + echo ' '; + } +?> + + + +'; + } + if (isset($aFormElements['copyButton'])) { + echo ''; + } +?> + +
+