--- loncom/interface/lonmsgdisplay.pm 2009/03/31 21:04:12 1.120 +++ loncom/interface/lonmsgdisplay.pm 2009/06/11 16:48:33 1.126 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.120 2009/03/31 21:04:12 kaisler Exp $ +# $Id: lonmsgdisplay.pm,v 1.126 2009/06/11 16:48:33 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -522,7 +522,10 @@ sub discourse { \%defaultUsers, 1,"selectedusers",1,'email') ) { - $result .= '
'.&mt('Bcc: course members with current access').'
'; + $result .= '
' + .&mt('Bcc: course members with current access') + .'' + .''; $result .= $tmptext.'

'; if (ref($statushash) eq 'HASH') { $statushash->{'active'} = 1; @@ -534,7 +537,10 @@ sub discourse { \%defaultUsers, 1, "selectedusers",0,'email') ) { - $result .= '
'.&mt('Bcc: course members with expired access').'
'; + $result .= '
' + .&mt('Bcc: course members with expired access') + .'' + .''; $result .= $tmptext.'

'; if (ref($statushash) eq 'HASH') { $statushash->{'previous'} = 1; @@ -547,7 +553,10 @@ sub discourse { \%defaultUsers, 1, "selectedusers",0,'email') ) { - $result .= '
'.&mt('Bcc: course members with future access').'
'; + $result .= '
' + .&mt('Bcc: course members with future access') + .'' + .''; $result .= $tmptext.'
'; if (ref($statushash) eq 'HASH') { $statushash->{'future'} = 1; @@ -622,8 +631,9 @@ sub disgroup { if (ref($access_status) eq 'HASH') { $access_status->{$status} = $$numitems{$status}; } - $r->print('
'.$lt{$status}. - '
'. + $r->print('
'. + ''.$lt{$status}.''. + ''. ''. ''. @@ -762,7 +772,7 @@ sub discrit { .'
' .&mt('Access to other pages will be prevented until you have moved all critical messages to your inbox.') .'

' - .'' + .'' .''; my %what=&Apache::lonnet::dump('critical'); my $result = ''; @@ -1190,7 +1200,7 @@ ENDDISHEADER '" onclick="javascript:validate_checkedaction()"/>'."\n". ''); my $postedstartdis=$startdis+1; - $r->print(''); + $r->print(''); if ($numblocked > 0) { $r->print(&blocked_in_folder($numblocked,$startblock,$endblock, \%setters)); @@ -1684,7 +1694,7 @@ sub additional_rec_row { my $bcc = &mt('Bcc:'); my $exmpl = &mt('username:domain,username:domain,...'); my $output = <<"ENDADD"; -
$lt->{'ad'} ($exmpl): + @@ -1890,21 +1900,23 @@ sub facetoface { 'subm' => 'Retrieve discussion and message records', 'newr' => 'New Record (record is visible to '.lc($crstype).' '.$leaders.')', 'post' => 'Post this Record'); - $r->print(<<"ENDTREC"); -

$lt{'head'}

- - -
$lt->{'ad'} ($exmpl)
 $lt->{'to'}
 $cc
 $bcc
- - - - - -
$lt{'user'}: -$stdbrws -
$lt{'dom'}:$domform
- -ENDTREC + + $r->print('

'.$lt{'head'}.'

' + .'
' + .'' + .&Apache::lonhtmlcommon::start_pick_box() + .&Apache::lonhtmlcommon::row_title($lt{'user'}) + .'' + .' '.$stdbrws + .&Apache::lonhtmlcommon::row_closure() + .&Apache::lonhtmlcommon::row_title($lt{'dom'}) + .$domform + .&Apache::lonhtmlcommon::row_closure(1) + .&Apache::lonhtmlcommon::end_pick_box() + .'
' + .'' + ); + if (($stage ne 'query') && ($env{'form.recdomain'}) && ($env{'form.recuname'})) { chomp($env{'form.newrecord'}); @@ -1913,8 +1925,17 @@ ENDTREC $env{'form.recuname'}, $env{'form.recdomain'}); } - $r->print('

'.&Apache::loncommon::plainname($env{'form.recuname'}, - $env{'form.recdomain'}).'

'); + my $aboutmelink=&Apache::loncommon::aboutmewrapper( + &Apache::loncommon::plainname($env{'form.recuname'} + ,$env{'form.recdomain'}) + ,$env{'form.recuname'},$env{'form.recdomain'}); + $r->print('
' + .'

' + .&mt('Discussion and message records for [_1] ([_2])' + ,$aboutmelink + ,$env{'form.recuname'}.':'.$env{'form.recdomain'}) + .'

' + ); &disfacetoface($r,$env{'form.recuname'},$env{'form.recdomain'}); $r->print(< @@ -2312,19 +2333,6 @@ sub displaymessage { .&mt('Next') .''); } -# Print functions - my $legendtext='' - .&mt('Functions') - .''; - $r->print('
' - .&Apache::lontemplate::start_functionslist($legendtext) - ); - foreach my $item (@functionlist) { - $r->print(&Apache::lontemplate::item_functionslist($item)); - } - $r->print(&Apache::lontemplate::end_functionslist() - .'
' - ); # Prepare available actions my $symb; @@ -2333,8 +2341,8 @@ sub displaymessage { } elsif (defined($content{'baseurl'})) { $symb=&Apache::lonnet::symbread($content{'baseurl'}); } - if ($env{'user.adv'}) { my @actionlist; + if ($env{'user.adv'}) { if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { push(@actionlist,&Apache::loncommon::track_student_link( @@ -2359,22 +2367,31 @@ sub displaymessage { ,$symb ,'check')); } + } + +# Print functionlist and actionlist in page header + my $functions='
'; + + # Functionlist + $functions.=&Apache::lonhtmlcommon::start_funclist(); + foreach my $item (@functionlist) { + $functions.=&Apache::lonhtmlcommon::add_item_funclist($item); + } + $functions .= &Apache::lonhtmlcommon::end_funclist(); -# Print actions + # Actionlist if (@actionlist) { - $legendtext=&mt('[_1]Currently available actions[_2] (will open extra window):' - ,'',''); - $r->print('
' - .&Apache::lontemplate::start_functionslist($legendtext) - ); + my $legendtext=&mt('Currently available actions (will open extra window)'); + $functions.=&Apache::lonhtmlcommon::start_funclist($legendtext); foreach my $item (@actionlist) { - $r->print(&Apache::lontemplate::item_functionslist($item)); + $functions.=&Apache::lonhtmlcommon::add_item_funclist($item); } - $r->print(&Apache::lontemplate::end_functionslist() - .'
' - ); + $functions.=&Apache::lonhtmlcommon::end_funclist(); } - } + + $functions.='
'; + $r->print(&Apache::loncommon::head_subbox($functions)); + my ($tonum,$tolist,$cclist,$bcclist,$groupcclist,%recipients); if ($content{'recipid'}) { @@ -3175,7 +3192,7 @@ sub sendoffmail { &Apache::loncommunicate::menu($r); } } else { - $r->print('

'.&mt('Could not deliver message').' '. + $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).'

'); } }