--- loncom/interface/lonmsgdisplay.pm 2010/02/12 15:21:37 1.148 +++ loncom/interface/lonmsgdisplay.pm 2010/02/12 17:22:24 1.149 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.148 2010/02/12 15:21:37 bisitz Exp $ +# $Id: lonmsgdisplay.pm,v 1.149 2010/02/12 17:22:24 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1098,7 +1098,9 @@ ENDDISHEADER if ($lastdis>$#temp) { $lastdis=$#temp; } $r->print(&scrollbuttons($startdis,$number,$firstdis,$lastdis,$totalnumber,$msgstatus)); $r->print('
'. - ''); } else { @@ -1128,7 +1130,7 @@ ENDDISHEADER } else { $r->print(''.&mt('Course').''); } - $r->print(''); } else { @@ -1142,17 +1144,19 @@ ENDDISHEADER my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID, $description,$recv_name,$recv_domain)= @{$temp[$n]}; - if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) { + if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) { + my $class_msgstatus = ''; $count ++; - if ($status eq 'new') { - $r->print(''); - } elsif ($status eq 'read') { - $r->print(''); - } elsif ($status eq 'replied') { - $r->print(''); - } else { - $r->print(''); - } + if ($status eq 'new') { + $class_msgstatus = 'LC_mail_new'; + } elsif ($status eq 'read') { + $class_msgstatus = 'LC_mail_read'; + } elsif ($status eq 'replied') { + $class_msgstatus = 'LC_mail_replied'; + } else { + $class_msgstatus = 'LC_mail_other'; + } + $r->print(&Apache::loncommon::start_data_table_row($class_msgstatus)); my ($dis_name,$dis_domain) = ($fromname,$fromdomain); if ($folder eq 'sent') { if (defined($recv_name) && defined($recv_domain)) { @@ -1184,6 +1188,7 @@ ENDDISHEADER ''. $item.(($status eq 'new')?'':'').''); } + # Description and Status my $showstatus; my %statushash = &get_msgstatus_types(); if ($status eq '') { @@ -1191,18 +1196,27 @@ ENDDISHEADER } else { $showstatus = $statushash{$status}; } - $r->print(''."\n"); - } elsif ($status eq 'deleted') { + $r->print(''); + $r->print(''. + ''); + + $r->print(&Apache::loncommon::end_data_table_row()); + + } elsif ($status eq 'deleted') { # purge - my ($result,$msg) = - &movemsg(&unescape($origID),$folder,'trash'); - - } + my ($result,$msg) = + &movemsg(&unescape($origID),$folder,'trash'); + } } - $r->print("
 '); + &Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_row(). + ' '); if ($env{'form.sortedby'} eq "revdate") { $r->print(''.&mt('Date').''); + $r->print(''); if ($env{'form.sortedby'} eq "revstatus") { $r->print(''.&mt('Status').'
'.(($status eq 'new')?'':'').$description. - (($status eq 'new')?'':'').''. - (($status eq 'new')?'':'').$showstatus. - (($status eq 'new')?'':'').'
'.(($status eq 'new')?'':'').$description. + (($status eq 'new')?'':''). + '  '. + (($status eq 'new')?'':'').&mt($showstatus). + (($status eq 'new')?'':''). + '
\n"); + $r->print(&Apache::loncommon::end_data_table()); + + + # Bottom Functions $r->print('