From 36e67fa41e819af47f07a0ad74433a27637961af Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 22 Oct 2002 14:09:03 +0000 Subject: [PATCH] layout enhancements. Split up toolbar in Compose related row and a Navigation related row git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3930 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/read_body.php | 80 ++++++++++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 33 deletions(-) diff --git a/src/read_body.php b/src/read_body.php index a880bc29..77a53162 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -474,9 +474,12 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $topbar_delimiter = ' | '; $urlMailbox = urlencode($mailbox); - $s = '
'; - + $sNav = $sCmp = ''; + $sBar = ''; + $sBar .= ''; + $sBar .= '' . "\n"; + $sBar .= ''; + $sBar .= '' . "\n" . '
' + ._("Navigation").': '; $msgs_url = $base_uri . 'src/'; if (isset($where) && isset($what)) { $msgs_url .= 'search.php?where=' . urlencode($where) . @@ -487,8 +490,8 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $startMessage . '&mailbox=' . $urlMailbox; $msgs_str = _("Message List"); } - $s .= '' . $msgs_str . ''; - $s .= $topbar_delimiter; + $sNav = '' . $msgs_str . ''; + $sNav .= $topbar_delimiter; $delete_url = $base_uri . 'src/delete_message.php?mailbox=' . $urlMailbox . '&message=' . $passed_id . '&'; @@ -498,7 +501,7 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp } else { $delete_url .= 'sort=' . $sort . '&startMessage=' . $startMessage; } - $s .= '' . _("Delete") . ''; + $sNav .= '' . _("Delete") . ''; } $comp_uri = $base_uri . 'src/compose.php' . @@ -521,12 +524,12 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $comp_alt_string = _("Edit Message as New"); } if (isset($comp_alt_uri)) { - $s .= $topbar_delimiter; - $s .= $link_open . $comp_alt_uri . $link_close . $comp_alt_string . ''; + $sCmp .= $link_open . $comp_alt_uri . $link_close . $comp_alt_string . ''; + $sCmp .= $topbar_delimiter; } - $s .= ''; - +// $sNav .= ''; + $sNav .= '    '; if (!(isset($where) && isset($what)) && !$passed_ent_id) { $prev = findPreviousMessage($mbx_response['EXISTS'], $passed_id); $next = findNextMessage($passed_id); @@ -534,23 +537,23 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $uri = $base_uri . 'src/read_body.php?passed_id='.$prev. '&mailbox='.$urlMailbox.'&sort='.$sort. '&startMessage='.$startMessage.'&show_more=0'; - $s .= ''._("Previous").''; + $sNav .= ''._("Previous").''; } else { - $s .= _("Previous"); + $sNav .= _("Previous"); } - $s .= $topbar_delimiter; + $sNav .= $topbar_delimiter; if ($next != -1) { $uri = $base_uri . 'src/read_body.php?passed_id='.$next. '&mailbox='.$urlMailbox.'&sort='.$sort. '&startMessage='.$startMessage.'&show_more=0'; - $s .= ''._("Next").''; + $sNav .= ''._("Next").''; } else { - $s .= _("Next"); + $sNav .= _("Next"); } } else if (isset($passed_ent_id) && $passed_ent_id) { /* code for navigating through attached message/rfc822 messages */ $url = set_url_var($PHP_SELF, 'passed_ent_id',0); - $s .= ''._("View Message").''; + $sNav .= ''._("View Message").''; $entities = array(); $entity_count = array(); $c = 0; @@ -573,37 +576,42 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp . set_url_var($PHP_SELF, 'passed_ent_id', $next_ent_id) . '">' . $next_link . ''; } - $s .= $topbar_delimiter . $prev_link; + $sNav .= $topbar_delimiter . $prev_link; $par_ent_id = $message->parent->entity_id; if ($par_ent_id) { $par_ent_id = substr($par_ent_id,0,-2); - $s .= $topbar_delimiter; + $sNav .= $topbar_delimiter; $url = set_url_var($PHP_SELF, 'passed_ent_id',$par_ent_id); - $s .= ''._("Up").''; + $sNav .= ''._("Up").''; } - $s .= $topbar_delimiter . $next_link; + $sNav .= $topbar_delimiter . $next_link; + } + $sBar .= $sNav . '
' + ._("Compose").': '; - $s .= ''; $comp_action_uri = $comp_uri . '&action=forward'; - $s .= $link_open . $comp_action_uri . $link_close . _("Forward") . ''; - $s .= $topbar_delimiter; + $sCmp .= $link_open . $comp_action_uri . $link_close . _("Forward") . ''; + $sCmp .= $topbar_delimiter; if ($enable_forward_as_attachment) { $comp_action_uri = $comp_uri . '&action=forward_as_attachment'; - $s .= $link_open . $comp_action_uri . $link_close . _("Forward as Attachment") . ''; - $s .= $topbar_delimiter; + $sCmp .= $link_open . $comp_action_uri . $link_close . _("Forward as Attachment") . ''; + $sCmp .= $topbar_delimiter; } $comp_action_uri = decodeHeader($comp_uri . '&action=reply'); - $s .= $link_open . $comp_action_uri . $link_close . _("Reply") . ''; - $s .= $topbar_delimiter; + $sCmp .= $link_open . $comp_action_uri . $link_close . _("Reply") . ''; + $sCmp .= $topbar_delimiter; $comp_action_uri = $comp_uri . '&action=reply_all'; - $s .= $link_open . $comp_action_uri . $link_close . _("Reply All") . ''; - $s .= '
'; + $sCmp .= $link_open . $comp_action_uri . $link_close . _("Reply All") . ''; + + $sBar .= $sCmp .'
'; do_hook("read_body_menu_top"); - echo $s; + echo $sBar; do_hook("read_body_menu_bottom"); } @@ -672,6 +680,10 @@ if (isset($_GET['startMessage'])) { elseif (isset($_POST['startMessage'])) { $startMessage = $_POST['startMessage']; } +if (isset($_GET['view_unsafe_images'])) { + $view_unsafe_images = $_GET['view_unsafe_images']; +} + if (isset($_GET['show_more'])) { $show_more = $_GET['show_more']; } @@ -812,7 +824,7 @@ for ($i = 0; $i < $cnt; $i++) { $messagebody .= '
'; } } - +echo ''; displayPageHeader($color, $mailbox); formatMenuBar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response); formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message, $color, $FirstTimeSee); @@ -847,11 +859,13 @@ if ($attachmentsdisplay) { echo '
'; echo $attachmentsdisplay; echo '
'; - echo ' '; echo ' '; echo ' '; echo ' '; } +echo ''."\n"; + echo ''; /* show attached images inline -- if pref'fed so */ @@ -880,7 +894,7 @@ sqimap_logout($imapConnection); /* sessions are written at the end of the script. it's better to register them at the end so we avoid double session_register calls */ sqsession_register($messages,'messages'); - +echo ''; ?> -- 2.25.1