From: stevetruckstuff Date: Mon, 6 Mar 2006 20:58:06 +0000 (+0000) Subject: Adding templates for the note in right_main.php, MOTD, and empty folder notification. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c03e9db075592f5ab297edd0e0d381fe104c11c5;p=squirrelmail.git Adding templates for the note in right_main.php, MOTD, and empty folder notification. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10905 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/right_main.php b/src/right_main.php index 1ad78c92..9135c313 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -288,7 +288,8 @@ if (isset($mail_sent) && $mail_sent == 'yes') { $note = _("Your Message has been sent."); } if (isset($note)) { - echo html_tag( 'div', '' . htmlspecialchars($note) .'', 'center' ) . "
\n"; + $oTemplate->assign('note', htmlspecialchars($note)); + $oTemplate->display('note.tpl'); } if ( sqgetGlobalVar('just_logged_in', $just_logged_in, SQ_SESSION) ) { @@ -296,18 +297,10 @@ if ( sqgetGlobalVar('just_logged_in', $just_logged_in, SQ_SESSION) ) { $just_logged_in = false; sqsession_register($just_logged_in, 'just_logged_in'); - if (strlen(trim($motd)) > 0) { - echo html_tag( 'table', - html_tag( 'tr', - html_tag( 'td', - html_tag( 'table', - html_tag( 'tr', - html_tag( 'td', $motd, 'center' ) - ) , - '', $color[4], 'width="100%" cellpadding="5" cellspacing="1" border="0"' ) - ) - ) , - 'center', $color[9], 'width="70%" cellpadding="0" cellspacing="3" border="0"' ); + $motd = trim($motd); + if (strlen($motd) > 0) { + $oTemplate->assign('motd', $motd); + $oTemplate->display('motd.tpl'); } } } @@ -340,18 +333,7 @@ if ($aMailbox['EXISTS'] > 0) { $oTemplate->display('message_list.tpl'); } else { - $string = '' . _("THIS FOLDER IS EMPTY") . ''; - echo ' '; - echo ' '; - echo '
'; - echo ' '; - echo ' '; - echo '

'; - echo ' '; - echo ' ' . html_tag( 'td', $string."\n", 'left') - . ''; - echo '
'; - echo '
'; + $oTemplate->display('empty_folder.tpl'); } do_hook('right_main_bottom'); diff --git a/templates/default/empty_folder.tpl b/templates/default/empty_folder.tpl new file mode 100644 index 00000000..cfac7199 --- /dev/null +++ b/templates/default/empty_folder.tpl @@ -0,0 +1,27 @@ + +
+ + + + +
+ +
+
\ No newline at end of file diff --git a/templates/default/motd.tpl b/templates/default/motd.tpl new file mode 100644 index 00000000..19fcaf9a --- /dev/null +++ b/templates/default/motd.tpl @@ -0,0 +1,30 @@ + + +
+ + + + +
+ +
+
+ diff --git a/templates/default/note.tpl b/templates/default/note.tpl new file mode 100644 index 00000000..4780abda --- /dev/null +++ b/templates/default/note.tpl @@ -0,0 +1,25 @@ + +
+
+ +
+
+
diff --git a/templates/default/stylesheet.tpl b/templates/default/stylesheet.tpl index a0722897..83ec53cc 100644 --- a/templates/default/stylesheet.tpl +++ b/templates/default/stylesheet.tpl @@ -248,6 +248,58 @@ img { text-align:center; } +/* note.tpl defs */ +.sqm_noteWrapper { + text-align:center; + width:100%; +} +.sqm_note { + margin-left:auto; + margin-right:auto; + font-weight:bold; + text-align:center; +} + +/* motd.tpl defs */ +.sqm_motdWrapper { + text-align:center; + width:100%; + margin:1px; +} +.sqm_motd { + margin-left:auto; + margin-right:auto; + text-align:center; + background: ; + width:70%; + padding:0; +} +.sqm_motd td { + text-align:center; + background: ; + padding:5px; +} + +/* empty_folder.tpl defs */ +.sqm_emptyFolderWrapper { + text-align:center; + width:100%; +} +.sqm_emptyFolder { + margin-left:auto; + margin-right:auto; + text-align:center; + background: ; + padding:1; + width:100%; +} +.sqm_emptyFolder td { + text-align:center; + background: ; + padding-top:15px; + padding-bottom:15px; +} + /* page_header.tpl definitions */ .sqm_currentFolder { background: ; diff --git a/templates/default/template.php b/templates/default/template.php index 12a204a5..2219709d 100644 --- a/templates/default/template.php +++ b/templates/default/template.php @@ -16,6 +16,7 @@ * this file, e.g. the template root directory. */ $templates_provided = array ( + 'empty_folder.tpl', 'error_message.tpl', 'footer.tpl', 'left_main.tpl', @@ -23,6 +24,8 @@ $templates_provided = array ( 'message_list.tpl', 'page_header.tpl', 'paginator.tpl', + 'note.tpl', + 'motd.tpl', 'stylesheet.tpl' ); diff --git a/templates/default_advanced/stylesheet.tpl b/templates/default_advanced/stylesheet.tpl index 263fc316..5ee1559e 100644 --- a/templates/default_advanced/stylesheet.tpl +++ b/templates/default_advanced/stylesheet.tpl @@ -286,6 +286,58 @@ img { text-align:center; } +/* note.tpl defs */ +.sqm_noteWrapper { + text-align:center; + width:100%; +} +.sqm_note { + margin-left:auto; + margin-right:auto; + font-weight:bold; + text-align:center; +} + +/* motd.tpl defs */ +.sqm_motdWrapper { + text-align:center; + width:100%; + margin:1px; +} +.sqm_motd { + margin-left:auto; + margin-right:auto; + text-align:center; + background: ; + width:70%; + padding:0; +} +.sqm_motd td { + text-align:center; + background: ; + padding:5px; +} + +/* empty_folder.tpl defs */ +.sqm_emptyFolderWrapper { + text-align:center; + width:100%; +} +.sqm_emptyFolder { + margin-left:auto; + margin-right:auto; + text-align:center; + background: ; + padding:1; + width:100%; +} +.sqm_emptyFolder td { + text-align:center; + background: ; + padding-top:15px; + padding-bottom:15px; +} + /* page_header.tpl definitions */ .sqm_currentFolder { background: ;