--- loncom/interface/lonmsgdisplay.pm 2009/08/13 16:58:36 1.124.4.1 +++ 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.124.4.1 2009/08/13 16:58:36 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.126 2009/06/11 16:48:33 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -173,7 +173,6 @@ sub folderlist { $formhash{'select_form_order'} = ['','critical',@userorder,'sent','trash']; my $output = qq||; my %show = ('select_form_order' => [10,20,50,100,200], map {$_=>$_} (10,20,50,100,200)); @@ -241,7 +239,7 @@ function folder_choice(targetform,caller '.$lt{'actn'}.'
'. &Apache::loncommon::select_form('view','folderaction',%actions).'
'. - ' + ' @@ -249,7 +247,7 @@ function folder_choice(targetform,caller '. + '" onClick="javascript:folder_choice(this.form,'."'new'".');" />'. '

'.&mt('Name').'
'. '
@@ -297,11 +295,11 @@ sub scrollbuttons { } return ''.&mt('Page').': '. - ''. - ''. - ' of '.$maxdis. - ''. - '
'. + ''. + ''. + ' of '.$maxdis. + ''. + '
'. &mt('[_1] messages: showing messages [_2] through [_3] of [_4].',$status,$first,$finish,$total).''; } # =============================================================== Status Change @@ -524,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; @@ -536,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; @@ -549,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; @@ -624,8 +631,9 @@ sub disgroup { if (ref($access_status) eq 'HASH') { $access_status->{$status} = $$numitems{$status}; } - $r->print('
'.$lt{$status}. - '
'. + $r->print('
'. + ''.$lt{$status}.''. + ''. ''. ''. @@ -672,7 +680,6 @@ sub disgroup { sub group_check_uncheck { my $output = qq| |; } @@ -985,7 +991,6 @@ sub disfolder { my $jscript = &Apache::loncommon::check_uncheck_jscript(); $r->print(< -// + ENDDISHEADER - my $fsqs='&folder='.$folder; + my $fsqs='&folder='.$folder; my @temp=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus); my $totalnumber=$#temp+1; if ($totalnumber < 1) { @@ -1132,7 +1137,7 @@ ENDDISHEADER foreach my $item ($localsenttime,$dis_name,$dis_domain,$shortsubj) { $r->print(''.(($status eq 'new')?'':''). ''. - $item.(($status eq 'new')?'':'').''); + $item.(($status eq 'new')?'':'').''); } my $showstatus; my %statushash = &get_msgstatus_types(); @@ -1351,7 +1356,6 @@ sub compout { $sendmode = ''."\n"; $broadcast_js = qq| |; @@ -1422,9 +1425,7 @@ function courseRecipients() { my $jscript = &Apache::loncommon::check_uncheck_jscript(); $r->print(<<"ENDREPSCRIPT"); ENDREPSCRIPT } @@ -1693,7 +1694,7 @@ sub additional_rec_row { my $bcc = &mt('Bcc:'); my $exmpl = &mt('username:domain,username:domain,...'); my $output = <<"ENDADD"; -
$lt->{'ad'} ($exmpl): + @@ -1876,7 +1877,7 @@ sub facetoface { return; } my $crstype = &Apache::loncommon::course_type(); - my $leaders = ($crstype eq 'Community') ? 'coordinators and leaders' + my $leaders = ($crstype eq 'Group') ? 'coordinators and leaders' : 'faculty and staff'; &printheader($r, '/adm/email?recordftf=query', @@ -1963,7 +1964,7 @@ sub examblock { $r->print('Not allowed'); return; } - my $usertype = (&Apache::loncommon::course_type() eq 'Community') ? 'members' + my $usertype = (&Apache::loncommon::course_type() eq 'Group') ? 'members' : 'students'; my %lt=&Apache::lonlocal::texthash( 'comb' => 'Communication Blocking', @@ -2332,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; @@ -2353,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( @@ -2379,22 +2367,31 @@ sub displaymessage { ,$symb ,'check')); } + } + +# Print functionlist and actionlist in page header + my $functions='
'; -# Print actions + # Functionlist + $functions.=&Apache::lonhtmlcommon::start_funclist(); + foreach my $item (@functionlist) { + $functions.=&Apache::lonhtmlcommon::add_item_funclist($item); + } + $functions .= &Apache::lonhtmlcommon::end_funclist(); + + # 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'}) { @@ -2741,7 +2738,6 @@ sub recipients_link { $body =~ s{\n}{}g; $r->print(< -// + ENDJS @@ -3223,7 +3219,7 @@ sub handler { 'recordftf','sortedby','block','folder','startdis','interdis', 'showcommentbaseurl','dismode','group','subject','text','ref', 'msgstatus']); - $sqs='&sortedby='.$env{'form.sortedby'}; + $sqs='&sortedby='.$env{'form.sortedby'}; # ------------------------------------------------------ They checked for email unless ($env{'form.block'}) { @@ -3244,7 +3240,7 @@ sub handler { unless ($folder) { $folder=''; } else { - $sqs.='&folder='.&escape($folder); + $sqs.='&folder='.&escape($folder); } # ------------------------------------------------------------ Get Display Mode @@ -3276,7 +3272,7 @@ sub handler { $startdis++; } my $postedstartdis=$startdis+1; - $sqs.='&startdis='.$postedstartdis; + $sqs.='&startdis='.$postedstartdis; # --------------------------------------------------------------- Render Output
$lt->{'ad'} ($exmpl)
 $lt->{'to'}
 $cc
 $bcc