[LON-CAPA-cvs] cvs: loncom /interface lonmsgdisplay.pm

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Fri, 06 Jun 2008 22:50:42 -0000


bisitz		Fri Jun  6 18:50:42 2008 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  - Wrapped critical messages output in standard LON-CAPA tables
  - Separated "From" and "Date"
  - Changed style for confirm message from critical to warning (fits better)
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.87 loncom/interface/lonmsgdisplay.pm:1.88
--- loncom/interface/lonmsgdisplay.pm:1.87	Fri Jun  6 13:46:15 2008
+++ loncom/interface/lonmsgdisplay.pm	Fri Jun  6 18:50:41 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.87 2008/06/06 17:46:15 bisitz Exp $
+# $Id: lonmsgdisplay.pm,v 1.88 2008/06/06 22:50:41 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -741,15 +741,23 @@
     foreach my $key (sort(keys(%what))) {
         my %content=&Apache::lonmsg::unpackagemsg($what{$key});
         next if ($content{'senderdomain'} eq '');
-        $result.='<hr />'.&mt('From').': <b>'.
-&Apache::loncommon::aboutmewrapper(
- &Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).'</b> ('.
-$content{'sendername'}.':'.
-            $content{'senderdomain'}.') '.$content{'time'}.
-            '<br />'.&mt('Subject').': '.$content{'subject'}.
-            '<br /><pre>'.
-              &Apache::lontexconvert::msgtexconverted($content{'message'}).
-            '</pre><div class="LC_error">';
+        $result .= &Apache::lonhtmlcommon::start_pick_box()
+                  .&Apache::lonhtmlcommon::row_title(&mt('From'),undef,'LC_oddrow_value')
+                  .'<b>'.&Apache::loncommon::aboutmewrapper(
+                   &Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).'</b>'
+                  .' ('.$content{'sendername'}.':'.$content{'senderdomain'}.')'
+                  .&Apache::lonhtmlcommon::row_closure(1)
+                  .&Apache::lonhtmlcommon::row_title(&mt('Date'),undef,'LC_evenrow_value')
+                  .$content{'time'}
+                  .&Apache::lonhtmlcommon::row_closure(1)
+                  .&Apache::lonhtmlcommon::row_title(&mt('Subject'),undef,'LC_oddrow_value')
+                  .$content{'subject'}
+                  .&Apache::lonhtmlcommon::row_closure(1)
+                  .&Apache::lonhtmlcommon::row_title(&mt('Message'),undef,'LC_evenrow_value')
+                  .'<pre>'.&Apache::lontexconvert::msgtexconverted($content{'message'}).'</pre>'
+                  .&Apache::lonhtmlcommon::row_closure()
+                  .&Apache::lonhtmlcommon::row_title('',undef,'LC_oddrow_value')
+                  .'<div class="LC_warning">';
         my ($rec_button,$reprec_button);
         $rec_button = &mt('Move to Inbox');
         if (!$content{'noreplies'}) {
@@ -764,12 +772,17 @@
         } else {
             $result .= &mt('Access to other pages will be prevented until you have moved the message to your inbox.'); 
         }
-        $result .= '</div><br />'.
-            '<input type="submit" name="rec_'.$key.'" value="'.$rec_button.'" />';
+        $result .= '</div>'
+                  .&Apache::lonhtmlcommon::row_closure(1)
+                  .&Apache::lonhtmlcommon::row_title('',undef,'LC_evenrow_value')
+                  .'<input type="submit" name="rec_'.$key.'" value="'.$rec_button.'" />';
         if (!$content{'noreplies'}) {
-            $result .= '<input type="submit" name="reprec_'.$key.'" '.
-                  'value="'.$reprec_button.'" />';
+            $result .= '<input type="submit" name="reprec_'.$key.'" '
+                      .'value="'.$reprec_button.'" />'
         }
+        $result .= &Apache::lonhtmlcommon::row_closure(1)
+                  .&Apache::lonhtmlcommon::end_pick_box()
+                  .'<br />';
     }
     # Check to see if there were any messages.
     if ($result eq '') {