--- loncom/interface/lonmsgdisplay.pm 2008/12/03 21:09:44 1.99 +++ loncom/interface/lonmsgdisplay.pm 2008/12/14 02:45:48 1.104 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.99 2008/12/03 21:09:44 schafran Exp $ +# $Id: lonmsgdisplay.pm,v 1.104 2008/12/14 02:45:48 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -243,9 +243,9 @@ function folder_choice(targetform,caller      '. - '

-
'.&mt('New Folder').'
'. + '
'.&mt('Name').'
'. '
@@ -353,7 +353,7 @@ sub makefolder { } } else { $outcome = - &mt('Error - could not obtain lock on email folders record.'); + &mt('Error - could not obtain lock on message folders record.'); } return ($outcome,$warning); } @@ -559,8 +559,7 @@ sub disgroup { my $result; # Needs to be in a course if (!($env{'request.course.fn'})) { - $result = &mt('Error: you must have a course role selected to be able to send a broadcast -e-mail to a group in the course.'); + $result = &mt('Error: you must have a course role selected to be able to send a broadcast message to a group in the course.'); return $result; } if ($cdom eq '' || $cnum eq '') { @@ -1108,10 +1107,10 @@ ENDDISHEADER } my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime); my $count = $n +1; - $r->print(''.(($status eq 'new')?'':''). + $r->print(''.(($status eq 'new')?'':''). $count.'.'.(($status eq 'new')?'':'').' '. ''); + ' value="'.$origID.'" />'); foreach my $item ($localsenttime,$dis_name,$dis_domain,$shortsubj) { $r->print(''.(($status eq 'new')?'':''). ''. @@ -1287,7 +1286,7 @@ sub compout { $dispcrit= ''.$crithelp.'  '.&mt('Require return receipt?').'  
'. '
'. +&mt('Send copy to permanent e-mail address (if known)').'
'. '
'; } @@ -2263,29 +2262,66 @@ sub displaymessage { # start output &printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'}); my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'}); -# Functions - $r->print(''); + +# Functions and Actions + my $li_start='• '; + my $li_end=' '; + +# Prepare available functions + my $functionlist=''; if (!$content{'noreplies'}) { - $r->print(''); - } - $r->print(''. - ''. - ''. - ''); + $functionlist.=$li_start + .'' + .&mt('Reply') + .'' + .$li_end; + } + $functionlist.=$li_start + .'' + .&mt('Forward') + .'' + .$li_end; + $functionlist.=$li_start + .'' + .&mt('Mark Unread') + .'' + .$li_end; + $functionlist.=$li_start + .'' + .&mt('Delete') + .'' + .$li_end; + $functionlist.=$li_start + .'' + .&mt('Back to Folder Display') + .'' + .$li_end; if ($counter > 0){ - $r->print(''); + $functionlist.=$li_start + .'' + .&mt('Previous') + .'' + .$li_end; } if ($counter < $number_of_messages - 1){ - $r->print(''); - } - $r->print('
'.&mt('Functions').':'.&mt('Reply').''.&mt('Forward').''.&mt('Mark Unread').''.&mt('Delete').''.&mt('Back to Folder Display').''.&mt('Previous').''.&mt('Next').'
'); + $functionlist.=$li_start + .'' + .&mt('Next') + .'' + .$li_end; + } +# Print functions + $r->print('
' + .'
' + .'' + .&mt('Functions') + .'' + .$functionlist + .'
' + .'
' + ); + +# Prepare available actions my $symb; if (defined($content{'symb'})) { $symb = $content{'symb'}; @@ -2294,33 +2330,40 @@ sub displaymessage { } if ($env{'user.adv'}) { my $actionlist=''; + if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { - $actionlist.='' + $actionlist.=$li_start .&Apache::loncommon::track_student_link( &mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check') - .''; + .$li_end; } if (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) { - $actionlist.='' + $actionlist.=$li_start .&Apache::loncommon::pprmlink( &mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check') - .''; + .$li_end; } if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) { - $actionlist.='' + $actionlist.=$li_start .&Apache::loncommon::pgrdlink( &mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check') - .''; + .$li_end; } + +# Print actions if ($actionlist) { - $r->print('' - .'' + $r->print('
' + .'
' + .'' + .&mt('[_1]Currently available actions[_2] (will open extra window):','','') + .'' .$actionlist - .'
' - .&mt('Currently available actions (will open extra window):') - .'
'); + .'' + .'' + ); } } + my ($tonum,$tolist,$cclist,$bcclist,$groupcclist,%recipients); if ($content{'recipid'}) { $tonum = &retrieve_recips('display',\%content,\%recipients); @@ -2356,8 +2399,9 @@ sub displaymessage { if (defined($content{'baseurl'})) { $baseurl = &Apache::lonenc::check_encrypt($content{'baseurl'}); } + $r->print('' .&Apache::lonhtmlcommon::start_pick_box() .&Apache::lonhtmlcommon::row_title(&mt('Subject')) .$content{'subject'}