--- loncom/interface/lonmsg.pm 2004/10/26 19:50:15 1.111
+++ loncom/interface/lonmsg.pm 2005/01/01 17:58:48 1.126
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.111 2004/10/26 19:50:15 www Exp $
+# $Id: lonmsg.pm,v 1.126 2005/01/01 17:58:48 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -523,20 +523,31 @@ sub folderlist {
&mt('Folder').': '.
&Apache::loncommon::select_form($folder,'folder',
('' => &mt('INBOX'),'trash' => &mt('TRASH'),
+ 'new' => &mt('New Messages Only'),
+ 'critical' => &mt('Critical'),
'sent' => &mt('Sent Messages'),
map { $_ => $_ } @allfolders)).
- ' '.&mt('Show').' '.
- &Apache::loncommon::select_form($interdis,'interdis',
-(' 10' => '10', ' 20' => '20', ' 50' => '50', '100' => '100', '200' => '200')).
+ ' '.&mt('Show').
+ ''.
'
'.
+ ''.
+ ($folder=~/^(new|critical)/?'':'');
+}
+
+sub scrollbuttons {
+ my ($start,$maxdis,$first,$finish,$total)=@_;
+ unless ($total>0) { return ''; }
+ $start++; $maxdis++;$first++;$finish++;
+ return
''.
''.
- ''.
+ ' of '.$maxdis.
''.
- ''.
- ''.
- &mt('View Critical Messages').''.
- '';
+ '
'.
+ &mt('Messages [_1] through [_2] of [_3]',$first,$finish,$total).'';
}
# =============================================================== Folder suffix
@@ -568,6 +579,10 @@ sub statuschange {
sub makefolder {
my ($newfolder)=@_;
+ if (($newfolder eq 'sent')
+ || ($newfolder eq 'critical')
+ || ($newfolder eq 'trash')
+ || ($newfolder eq 'new')) { return; }
&Apache::lonnet::put('email_folders',{$newfolder => time});
}
@@ -686,7 +701,6 @@ sub discrit {
foreach (sort keys %what) {
my %content=&unpackagemsg($what{$_});
next if ($content{'senderdomain'} eq '');
- $content{'message'}=~s/\n/\
/g;
$result.='
  | +$lt{'da'} | $lt{'us'} | $lt{'do'} | $lt{'su'} |
---|---|---|---|---|
$lt{'op'} | +ENDLINK + foreach ('sendtime','from','fromdom','shortsub') { + $r->print("$msg->{$_} | "); + } + $r->print("