--- loncom/interface/lonmsgdisplay.pm 2009/06/05 12:49:50 1.125
+++ loncom/interface/lonmsgdisplay.pm 2009/06/16 16:49:11 1.127
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.125 2009/06/05 12:49:50 bisitz Exp $
+# $Id: lonmsgdisplay.pm,v 1.127 2009/06/16 16:49:11 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -173,6 +173,7 @@ sub folderlist {
$formhash{'select_form_order'} = ['','critical',@userorder,'sent','trash'];
my $output = qq||;
my %show = ('select_form_order' => [10,20,50,100,200],
map {$_=>$_} (10,20,50,100,200));
@@ -239,7 +241,7 @@ function folder_choice(targetform,caller
'.$lt{'actn'}.' '.
&Apache::loncommon::select_form('view','folderaction',%actions).'
| '.
- '
+ '
|
@@ -247,7 +249,7 @@ function folder_choice(targetform,caller
@@ -295,11 +297,11 @@ sub scrollbuttons {
}
return
''.&mt('Page').': '.
- ''.
- ''.
- ' of '.$maxdis.
- ''.
- ' '.
+ ''.
+ ''.
+ ' / '.$maxdis.' '.
+ ''.
+ ' '.
&mt('[_1] messages: showing messages [_2] through [_3] of [_4].',$status,$first,$finish,$total).'';
}
# =============================================================== Status Change
@@ -680,6 +682,7 @@ sub disgroup {
sub group_check_uncheck {
my $output = qq|
|;
}
@@ -991,6 +995,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) {
@@ -1137,7 +1142,7 @@ ENDDISHEADER
foreach my $item ($localsenttime,$dis_name,$dis_domain,$shortsubj) {
$r->print(''.(($status eq 'new')?'':'').
''.
- $item.(($status eq 'new')?'':'').' | ');
+ $item.(($status eq 'new')?'':'').' | ');
}
my $showstatus;
my %statushash = &get_msgstatus_types();
@@ -1356,6 +1361,7 @@ sub compout {
$sendmode = ''."\n";
$broadcast_js = qq|
|;
@@ -1425,7 +1432,9 @@ function courseRecipients() {
my $jscript = &Apache::loncommon::check_uncheck_jscript();
$r->print(<<"ENDREPSCRIPT");
ENDREPSCRIPT
}
@@ -2333,19 +2342,6 @@ sub displaymessage {
.&mt('Next')
.'');
}
-# Print functions
- my $legendtext=''
- .&mt('Functions')
- .'';
- $r->print(''
- .&Apache::lontemplate::start_functionslist($legendtext)
- );
- foreach my $item (@functionlist) {
- $r->print(&Apache::lontemplate::item_functionslist($item));
- }
- $r->print(&Apache::lontemplate::end_functionslist()
- .'
'
- );
# Prepare available actions
my $symb;
@@ -2354,8 +2350,8 @@ sub displaymessage {
} elsif (defined($content{'baseurl'})) {
$symb=&Apache::lonnet::symbread($content{'baseurl'});
}
- if ($env{'user.adv'}) {
my @actionlist;
+ if ($env{'user.adv'}) {
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
push(@actionlist,&Apache::loncommon::track_student_link(
@@ -2380,22 +2376,31 @@ sub displaymessage {
,$symb
,'check'));
}
+ }
+
+# Print functionlist and actionlist in page header
+ my $functions='';
-# Print actions
+ # Functionlist
+ $functions.=&Apache::lonhtmlcommon::start_funclist();
+ foreach my $item (@functionlist) {
+ $functions.=&Apache::lonhtmlcommon::add_item_funclist($item);
+ }
+ $functions .= &Apache::lonhtmlcommon::end_funclist();
+
+ # Actionlist
if (@actionlist) {
- $legendtext=&mt('[_1]Currently available actions[_2] (will open extra window):'
- ,'
','');
- $r->print('
'
- .&Apache::lontemplate::start_functionslist($legendtext)
- );
+ my $legendtext=&mt('Currently available actions (will open extra window)');
+ $functions.=&Apache::lonhtmlcommon::start_funclist($legendtext);
foreach my $item (@actionlist) {
- $r->print(&Apache::lontemplate::item_functionslist($item));
+ $functions.=&Apache::lonhtmlcommon::add_item_funclist($item);
}
- $r->print(&Apache::lontemplate::end_functionslist()
- .'
'
- );
+ $functions.=&Apache::lonhtmlcommon::end_funclist();
}
- }
+
+ $functions.='
';
+ $r->print(&Apache::loncommon::head_subbox($functions));
+
my ($tonum,$tolist,$cclist,$bcclist,$groupcclist,%recipients);
if ($content{'recipid'}) {
@@ -2742,6 +2747,7 @@ sub recipients_link {
$body =~ s{\n}{}g;
$r->print(<
+//
ENDJS
@@ -3223,7 +3229,7 @@ sub handler {
'recordftf','sortedby','block','folder','startdis','interdis',
'showcommentbaseurl','dismode','group','subject','text','ref',
'msgstatus']);
- $sqs='&sortedby='.$env{'form.sortedby'};
+ $sqs='&sortedby='.$env{'form.sortedby'};
# ------------------------------------------------------ They checked for email
unless ($env{'form.block'}) {
@@ -3244,7 +3250,7 @@ sub handler {
unless ($folder) {
$folder='';
} else {
- $sqs.='&folder='.&escape($folder);
+ $sqs.='&folder='.&escape($folder);
}
# ------------------------------------------------------------ Get Display Mode
@@ -3276,7 +3282,7 @@ sub handler {
$startdis++;
}
my $postedstartdis=$startdis+1;
- $sqs.='&startdis='.$postedstartdis;
+ $sqs.='&startdis='.$postedstartdis;
# --------------------------------------------------------------- Render Output