--- loncom/interface/lonmsgdisplay.pm 2010/11/20 13:19:49 1.124.4.12 +++ loncom/interface/lonmsgdisplay.pm 2009/07/26 20:39:46 1.129 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.124.4.12 2010/11/20 13:19:49 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.129 2009/07/26 20:39:46 kalberla Exp $ # # Copyright Michigan State University Board of Trustees # @@ -146,7 +146,7 @@ sub folderlist { ); $actions{'select_form_order'} = ['view','rename','delete']; - my %statushash = &Apache::lonlocal::texthash(&get_msgstatus_types()); + my %statushash = &get_msgstatus_types(); $statushash{'select_form_order'} = ['','new','read','replied','forwarded']; @@ -219,7 +219,8 @@ function folder_choice(targetform,caller |; my %show = ('select_form_order' => [10,20,50,100,200], map {$_=>$_} (10,20,50,100,200)); - + + $output .= '
'. - &mt('You have no critical messages.'). - '
'); if ($msgstatus eq '') { - $r->print(&mt('There are no messages in this folder.')); + $r->print('
'.&Apache::lonhtmlcommon::confirm_success(&mt('Could not deliver message'),1).' '. + &mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus).'
'.$msg.'
'. + &mt('Failed to delete the message.').'
'.$msg."
'); &Apache::loncommunicate::menu($r); &disall($r,($folder?$folder:$dismode),$msgstatus); } elsif ($env{'form.markedaction'} eq 'markedunread') { @@ -3434,9 +3363,7 @@ sub handler { $total ++; } &printheader($r,'','Marked Messages Unread'); - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Marked [quant,_1,message] unread',$total)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Marked [_1] message(s) unread',$total).'
'); &Apache::loncommunicate::menu($r); &disall($r,($folder?$folder:$dismode),$msgstatus); } elsif ($env{'form.markedaction'} eq 'markedmove') { @@ -3459,16 +3386,15 @@ sub handler { push(@failed_msg,$msg); } } - my $message; - if ($failed) { - $message = &Apache::lonhtmlcommon::confirm_success(&mt('Failed to move [quant,_1,message]',$failed),1); - $message .= '
'. - join("
",@failed_msg). - "
+ '.&mt('Failed to move [_1] message(s)',$failed). + '
'. + join("
",@failed_msg). + "
'); } &Apache::loncommunicate::menu($r); &disall($r,($folder?$folder:$dismode),$msgstatus); @@ -3486,16 +3412,15 @@ sub handler { } } &printheader($r,'','Deleted Messages'); - my $message; if ($failed) { - $message = &Apache::lonhtmlcommon::confirm_success(&mt('Failed to delete [quant,_1,message]',$failed),1); - $message .= '
'. + $r->print('
+ '.&mt('Failed to delete [_1] message(s)',$failed). + '
'. join("
'); &Apache::loncommunicate::menu($r); &disall($r,($folder?$folder:$dismode),$msgstatus); } elsif ($env{'form.markunread'}) { @@ -3551,19 +3476,19 @@ sub handler { } if (keys(%forwardok) > 0) { my $count = keys(%forwardok); - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('[quant,_1,message] forwarded.',$count)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(''. + &mt('[quant,_1,message] forwarded.',$count). + ''); } if (keys(%forwardfail) > 0) { my $count = keys(%forwardfail); - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Could not forward [quant,_1,message].',$count),1); + $r->print('
'. + &mt('Could not forward [quant,_1,message].',$count). + ' '); foreach my $key (keys(%forwardfail)) { - $message .= ''.&mt('Could not deliver forwarded message.').' '. - &mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.')'; + $r->print(&mt('Could not deliver forwarded message.').' '. + &mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.').'); } - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); } &Apache::loncommunicate::menu($r); } else { @@ -3587,13 +3512,10 @@ sub handler { my $showfolder = $env{'form.newfolder'}; my ($makeresult,$warning) = &makefolder($env{'form.newfolder'}); if ($makeresult eq 'ok') { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" created.',$showfolder)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Folder "[_1]" created.',$showfolder).''); } else { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Creation failed.').' '.$makeresult.''.$warning,1); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Creation failed.').' '.$makeresult.''. + $warning); $showfolder = $folder; } &Apache::loncommunicate::menu($r); @@ -3605,14 +3527,10 @@ sub handler { my $showfolder = ''; my $delresult = &deletefolder($folder); if ($delresult eq 'ok') { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" deleted.',$folder)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Folder "[_1]" deleted.',$folder).''); $env{'form.folder'} = ''; } else { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Deletion failed.').' '.$delresult,1); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Deletion failed.').' '.$delresult.''); $showfolder = $folder; } &Apache::loncommunicate::menu($r); @@ -3622,13 +3540,9 @@ sub handler { my $showfolder = $env{'form.renamed'}; my $renresult = &renamefolder($folder); if ($renresult eq 'ok') { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder).''); } else { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Renaming failed.').' '.$renresult,1); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Renaming failed.').' '.$renresult.''); $showfolder = $folder; } &Apache::loncommunicate::menu($r);