--- loncom/interface/lonmsgdisplay.pm 2008/12/05 19:38:32 1.100 +++ loncom/interface/lonmsgdisplay.pm 2008/12/07 19:29:29 1.101 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.100 2008/12/05 19:38:32 schafran Exp $ +# $Id: lonmsgdisplay.pm,v 1.101 2008/12/07 19:29:29 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2263,29 +2263,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 +2331,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('' - .'' + .'' .$actionlist - .'
' + $r->print('
' + .'
' + .'' .&mt('Currently available actions (will open extra window):') - .'
'); + .'' + .'' + ); } } + my ($tonum,$tolist,$cclist,$bcclist,$groupcclist,%recipients); if ($content{'recipid'}) { $tonum = &retrieve_recips('display',\%content,\%recipients);