--- loncom/interface/lonmsgdisplay.pm 2011/12/28 21:49:54 1.159 +++ loncom/interface/lonmsgdisplay.pm 2012/11/30 14:57:17 1.162 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.159 2011/12/28 21:49:54 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.162 2012/11/30 14:57:17 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -222,6 +222,8 @@ function folder_choice(targetform,caller $output .= '
+
+ '.&mt('Folder Actions').' - + +
'.$lt{'fold'}.'
'."\n". @@ -241,7 +243,9 @@ function folder_choice(targetform,caller '" onclick="javascript:folder_choice(this.form,'."'change'".');" />
'.&mt('New Folder').'
'."\n".' +
'.&mt('New Folder').'
'."\n".' '. ''. @@ -877,8 +882,9 @@ sub discrit { '

'. &mt('You have no critical messages.'). '

'. - ''.&mt('Select a course').'
'. - ''.&mt('Communicate').''; + &Apache::lonhtmlcommon::actionbox( + [''.&mt('Select a course').'', + ''.&mt('Communicate').'']); } else { $r->print($header); } @@ -1232,17 +1238,17 @@ ENDDISHEADER # Bottom Functions - $r->print(' + $r->print(' +
+'.&mt('Message Actions').' +
- '."\n". ''."\n"); if (keys(%gotfolders) > 0) { - $r->print(''); } - $r->print(''."\n". - '
-
- '.&mt('Select').' +
'.&mt('Select Messages').'
'."\n". ' '."\n". ' -
'.&mt('Action').'
'."\n". '
'.&mt('Destination folder').'
'); + $r->print('
'.&mt('Destination folder').'
'); my %userfolders; foreach my $key (keys(%gotfolders)) { $userfolders{$key} = $key; @@ -1275,10 +1281,12 @@ ENDDISHEADER $r->print(&Apache::loncommon::select_form('','movetofolder',\%userfolders). '
'. + $r->print(''. '
'); + '
'."\n". + '
'."\n" + ); my $postedstartdis=$startdis+1; $r->print('
'); if ($numblocked > 0) { @@ -1462,9 +1470,12 @@ function courseRecipients() { document.compemail.groupmail.value = document.$formname.groupmail[document.$formname.groupmail.selectedIndex].value; |; } + #typeof(...forminput.length) returns 'undefined' if only one entry exists $broadcast_js .= qq| if (typeof(document.$formname.selectedusers_forminput.length)=="undefined") { - document.compemail.courserecips.value += '_&&&_'+document.$formname.selectedusers_forminput.value; + if (document.$formname.selectedusers_forminput.checked) { + document.compemail.courserecips.value += '_&&&_'+document.$formname.selectedusers_forminput.value; + } } else { for (var i=0; i' + .'' ); &disfacetoface($r,$env{'form.recuname'},$env{'form.recdomain'}); $r->print(<' .&mt('Delete') .''); - push(@functionlist,'' - .&mt('Back to Folder Display') - .''); + +# Prepare available navigation + my @navigationlist; if ($counter > 0){ - push(@functionlist,'' + push(@navigationlist,'' .&mt('Previous') .''); } if ($counter < $number_of_messages - 1){ - push(@functionlist,'' + push(@navigationlist,'' .&mt('Next') .''); } + push(@navigationlist,'' + .&mt('Back to Folder Display') + .''); # Prepare available actions my $symb; @@ -2147,7 +2161,7 @@ sub displaymessage { } elsif (defined($content{'baseurl'})) { $symb=&Apache::lonnet::symbread($content{'baseurl'}); } - my @actionlist; + my @actionlist; if ($env{'user.adv'}) { if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { @@ -2175,7 +2189,7 @@ sub displaymessage { } } -# Print functionlist and actionlist in page header +# Print functionlist, navigationlist, and actionlist in page header my $functions='
'; # Functionlist @@ -2185,10 +2199,18 @@ sub displaymessage { } $functions .= &Apache::lonhtmlcommon::end_funclist(); + # Navigationlist + $functions.=&Apache::lonhtmlcommon::start_funclist( + &mt('Navigation')); + foreach my $item (@navigationlist) { + $functions.=&Apache::lonhtmlcommon::add_item_funclist($item); + } + $functions .= &Apache::lonhtmlcommon::end_funclist(); + # Actionlist if (@actionlist) { - my $legendtext=&mt('Currently available actions (will open extra window)'); - $functions.=&Apache::lonhtmlcommon::start_funclist($legendtext); + $functions.=&Apache::lonhtmlcommon::start_funclist( + &mt('Currently available actions (will open extra window)')); foreach my $item (@actionlist) { $functions.=&Apache::lonhtmlcommon::add_item_funclist($item); }