'
.&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 = '';
@@ -831,6 +845,7 @@ sub sortedmessages {
}
foreach my $msgid (@messages) {
+ next if ($msgid eq '');
my $esc_msgid=&escape($msgid);
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid,$processid,$symb,$error) =
&Apache::lonmsg::unpackmsgid($esc_msgid,$folder,undef,
@@ -970,6 +985,7 @@ 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) {
@@ -1034,48 +1050,50 @@ ENDDISHEADER
$r->print('
'.
'
');
if ($env{'form.sortedby'} eq "revdate") {
- $r->print(''.&mt('Date').'
');
+ $item.(($status eq 'new')?'':'').'');
}
my $showstatus;
my %statushash = &get_msgstatus_types();
@@ -1178,7 +1195,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));
@@ -1237,8 +1254,8 @@ sub compout {
&printheader($r,'/adm/email?compose=multiforward',
'Forwarding Multiple Messages');
if ($multiforward > 1) {
- $r->print(&mt('Each of the [quant,_1,message] you checked'
- .' will be forwarded to the recipient(s) you select below.',$multiforward)
+ $r->print(&mt('Each of the[_1] [quant,_2,message] [_3]you checked'
+ .' will be forwarded to the recipient(s) you select below.','',$multiforward,'')
.' ');
} else {
$r->print(&mt('The message you checked will be forwarded to the recipient(s) you select below.').' ');
@@ -1317,22 +1334,24 @@ sub compout {
if ($group eq '') {
my $studentsel = &discourse(\%access_status);
if ($studentsel) {
- $r->print('
ENDADD
return $output;
}
@@ -1814,7 +1842,7 @@ $content{'sendername'}.':'.
}
# Check to see if there were any messages.
if ($result eq '') {
- my $lctype = lc(&Apache::loncommon::course_type());
+ my $lctype = &mt(lc(&Apache::loncommon::course_type()));
if ($target ne 'tex') {
$r->print("
".&mt('No notes, face-to-face discussion records, critical messages, or broadcast messages in this [_1].',$lctype)."
");
} else {
@@ -1848,7 +1876,7 @@ sub facetoface {
return;
}
my $crstype = &Apache::loncommon::course_type();
- my $leaders = ($crstype eq 'Group') ? 'coordinators and leaders'
+ my $leaders = ($crstype eq 'Community') ? 'coordinators and leaders'
: 'faculty and staff';
&printheader($r,
'/adm/email?recordftf=query',
@@ -1871,21 +1899,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");
-
@@ -2134,7 +2173,7 @@ END
foreach my $block (@{$typeorder}) {
my $blockstatus = '';
if ($blocks->{$block} eq 'on') {
- $blockstatus = 'checked="true"';
+ $blockstatus = 'checked="checked"';
}
$r->print(' ');
}
@@ -2201,7 +2240,7 @@ END
sub blocktype_text {
my %types = &Apache::lonlocal::texthash(
'com' => 'Messaging',
- 'chat' => 'Chat',
+ 'chat' => 'Chat Room',
'boards' => 'Discussion',
'port' => 'Portfolio',
'groups' => 'Groups',
@@ -2263,29 +2302,56 @@ 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('
'.&mt('Functions').':
');
+
+# Functions and Actions
+ my $li_start='• ';
+ my $li_end=' ';
+
+# Prepare available functions
+ my @functionlist;
if (!$content{'noreplies'}) {
- $r->print('
'
+ );
+
+# Prepare available actions
my $symb;
if (defined($content{'symb'})) {
$symb = $content{'symb'};
@@ -2293,34 +2359,49 @@ sub displaymessage {
$symb=&Apache::lonnet::symbread($content{'baseurl'});
}
if ($env{'user.adv'}) {
- my $actionlist='';
+ my @actionlist;
+
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
- $actionlist.='
'.
- &mt('Could not forward [quant,_1,message].',$count).
- ' ');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Could not forward [quant,_1,message].',$count),1);
foreach my $key (keys(%forwardfail)) {
- $r->print(&mt('Could not deliver forwarded message.').' '.
- &mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.').
');
+ $message .= ' '.&mt('Could not deliver forwarded message.').' '.
+ &mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.')';
}
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
}
&Apache::loncommunicate::menu($r);
} else {
@@ -3421,10 +3516,13 @@ sub handler {
my $showfolder = $env{'form.newfolder'};
my ($makeresult,$warning) = &makefolder($env{'form.newfolder'});
if ($makeresult eq 'ok') {
- $r->print(&mt('Mail folder "[_1]" created.',$showfolder).' ');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" created.',$showfolder));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
} else {
- $r->print(&mt('Creation failed.').' '.$makeresult.' '.
- $warning);
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Creation failed.').' '.$makeresult.' '.$warning,1);
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);
@@ -3436,10 +3534,14 @@ sub handler {
my $showfolder = '';
my $delresult = &deletefolder($folder);
if ($delresult eq 'ok') {
- $r->print(&mt('Mail folder "[_1]" deleted.',$folder).' ');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" deleted.',$folder));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$env{'form.folder'} = '';
} else {
- $r->print(&mt('Deletion failed.').' '.$delresult.' ');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Deletion failed.').' '.$delresult,1);
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);
@@ -3449,9 +3551,13 @@ sub handler {
my $showfolder = $env{'form.renamed'};
my $renresult = &renamefolder($folder);
if ($renresult eq 'ok') {
- $r->print(&mt('Mail folder "[_1]" renamed "[_2]".',$folder,$showfolder).' ');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
} else {
- $r->print(&mt('Renaming failed.').' '.$renresult.' ');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Renaming failed.').' '.$renresult,1);
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);