--- loncom/interface/lonsimplepage.pm 2009/06/08 18:04:45 1.83 +++ loncom/interface/lonsimplepage.pm 2009/07/10 15:05:28 1.85 @@ -1,7 +1,7 @@ # The LearningOnline Network # Simple Page Editor # -# $Id: lonsimplepage.pm,v 1.83 2009/06/08 18:04:45 bisitz Exp $ +# $Id: lonsimplepage.pm,v 1.85 2009/07/10 15:05:28 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -182,7 +182,7 @@ sub handler { my $msg = &mt('You do not currently have rights to view this group.'); if ($target ne 'tex') { - $r->print("

$msg

". + $r->print('

'.$msg.'

'. &Apache::loncommon::end_page()); } else { $r->print('\textbf{'.$msg.'}\end{document}'); @@ -253,37 +253,45 @@ sub handler { &Apache::lonnet::put($db_name,\%syllabus,$dom,$crs); } -#---Print help Text - if($target ne 'tex'){ - if ($allowed) { - $r->print(&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes'))); - } - } #---Print Function if ($target ne 'tex') { if ($allowed || $privileged) { - $r->print(&Apache::lontemplate::start_functionslist()); + my $functions=&Apache::lonhtmlcommon::start_funclist(); if ($allowed) { - $r->print(&Apache::lontemplate::item_functionslist( - ''.&mt('Show Student View').'' - .&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'))); + $functions.=&Apache::lonhtmlcommon::add_item_funclist( + '' + .&mt('Show Student View').'' + .&Apache::loncommon::help_open_topic( + 'Uploaded_Templates_PublicView')); } elsif ($privileged) { my $edittext = &mt('Edit'); if ($group ne '') { $edittext = &mt('Edit Group Homepage'); } - $r->print(&Apache::lontemplate::item_functionslist( - ''.$edittext.'')); + $functions.=&Apache::lonhtmlcommon::add_item_funclist( + '' + .$edittext.''); if ($group ne '') { if ($group_edit_perm) { - $r->print(&Apache::lontemplate::item_functionslist( - '' - .&mt('Edit Group Settings').'')); + $functions.=&Apache::lonhtmlcommon::add_item_funclist( + '' + .&mt('Edit Group Settings') + .''); } } } - $r->print(&Apache::lontemplate::end_functionslist()); + $functions.=&Apache::lonhtmlcommon::end_funclist(); + $r->print(&Apache::loncommon::head_subbox($functions)); + } + } + +#---Print help Text + if($target ne 'tex'){ + if ($allowed) { + $r->print(&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes'))); } } @@ -296,8 +304,8 @@ sub handler { &Apache::lonnet::allowuploaded('/adm/smppg', $syllabus{'uploaded.photourl'}); - $image=''; + $image=''.&mt('Image').''; if ($target eq 'tex') { $image=&Apache::lonxml::xmlparse($r,'tex',$image); } @@ -305,19 +313,20 @@ sub handler { if ($allowed) { $r->print( - '
'. + ''. ''. '

'.&mt('Upload a Photo').'

'. ''. ''. - '
'. + '
'. ''); if ($syllabus{'uploaded.photourl'}) { - $r->print('' ); + $r->print(''); } } if ($allowed) { - $r->print($image.'
 
'); + $r->print($image.''); } foreach my $field (sort(keys(%syllabusfields))) { @@ -392,7 +401,12 @@ sub handler { if ($group ne '') { &display_group_links($r,$target,$group,'view',$refarg,%groupinfo); } else { - $r->print('

'.&mt('No page information provided.').'

'); + my $text=&mt('No page information provided.'); + if ($target ne 'tex') { + $r->print('

'.$text.'

'); + } else { + $r->print($text) + } } } if ($env{'form.grade_target'} ne 'tex') {