[LON-CAPA-cvs] cvs: loncom /homework lonsimpleproblemedit.pm structuretags.pm /interface lonaboutme.pm loncommon.pm lonhtmlcommon.pm lonmsgdisplay.pm lonsimplepage.pm lonsyllabus.pm lontemplate.pm /localize/localize de.pm zh.pm

bisitz bisitz@source.lon-capa.org
Thu, 11 Jun 2009 16:48:39 -0000


This is a MIME encoded message

--bisitz1244738919
Content-Type: text/plain

bisitz		Thu Jun 11 16:48:39 2009 EDT

  Modified files:              
    /loncom/homework	lonsimpleproblemedit.pm structuretags.pm 
    /loncom/interface	lonaboutme.pm loncommon.pm lonhtmlcommon.pm 
                     	lonmsgdisplay.pm lonsimplepage.pm lonsyllabus.pm 
                     	lontemplate.pm 
    /loncom/localize/localize	de.pm zh.pm 
  Log:
  Functionslist:
  - Moved sub routines from lontemplate.pm to lonhtmlcommon.pm to allow wider access
  - Renamed sub routine names:
      - start_functionslist -> start_funclist
      - item_functionslist -> add_item_funclist
      - end_functionslist -> end_funclist
  - Added line breaks for HTML source code
  - Added pod documentation to sub routines
  - Adjusted sub routine calls
  
  Changes related to modification of LON-CAPA screen header:
  - Moved functionslists into new standard screen header "head_subbox"
  
  Other changes:
  - Got rid of special style for fieldset legend; adjusted texts
    (lonmsgdisplay.pm, loncommon.pm, de.pm, zh.pm)
  - Added warning/info style to warning/info message for weboutput
    and corrected tex output for "No page information provided" message
    (lonsimplepage.pm)
  - Optimized floating for functions/actions
    (lonmsgdisplay.pm)
  
  
--bisitz1244738919
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20090611164839.txt"

Index: loncom/homework/lonsimpleproblemedit.pm
diff -u loncom/homework/lonsimpleproblemedit.pm:1.22 loncom/homework/lonsimpleproblemedit.pm:1.23
--- loncom/homework/lonsimpleproblemedit.pm:1.22	Mon May 11 16:51:22 2009
+++ loncom/homework/lonsimpleproblemedit.pm	Thu Jun 11 16:48:28 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Problem Parameter Setting "Editor"
 #
-# $Id: lonsimpleproblemedit.pm,v 1.22 2009/05/11 16:51:22 bisitz Exp $
+# $Id: lonsimpleproblemedit.pm,v 1.23 2009/06/11 16:48:28 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -222,18 +222,14 @@
 					     $spell_header));
     if ($symb) {
 	$r->print('<h1>'.&Apache::lonnet::gettitle($symb).'</h1>');
-        $r->print('<p class="LC_warning">'
-                 .&mt('Note: it can take up to 10 minutes for changes to take effect for all users.')
-                 .&Apache::loncommon::help_open_topic('Caching')
-                 .'</p>'
-        );
         my $displaylink = &get_parent_uri($symb);
         if ($displaylink ne '') {
-            $r->print(&Apache::lontemplate::start_functionslist()
-                     .&Apache::lontemplate::item_functionslist(
-                          '<a href="'.$displaylink.'">'.&mt('Student View').'</a>')
-                     .&Apache::lontemplate::end_functionslist()
-            );
+            my $functions=&Apache::lonhtmlcommon::start_funclist()
+                         .&Apache::lonhtmlcommon::add_item_funclist(
+                              '<a href="'.$displaylink.'">'
+                             .&mt('Student View').'</a>')
+                             .&Apache::lonhtmlcommon::end_funclist();
+            $r->print(&Apache::loncommon::head_subbox($functions));
         } else {
             $r->print('<p class="LC_error">'
                      .&mt('An error occurred retrieving the link to this problem.')
@@ -243,6 +239,11 @@
                      .'</p>'
             );
         }
+        $r->print('<p class="LC_warning">'
+                 .&mt('Note: it can take up to 10 minutes for changes to take effect for all users.')
+                 .&Apache::loncommon::help_open_topic('Caching')
+                 .'</p>'
+        );
 
 	$r->print('<table border="2" bgcolor="#FFFFFF" width="100%"><tr><td>'.
                   &rawrendering($symb).
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.450 loncom/homework/structuretags.pm:1.451
--- loncom/homework/structuretags.pm:1.450	Tue Jun  9 16:33:55 2009
+++ loncom/homework/structuretags.pm	Thu Jun 11 16:48:28 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.450 2009/06/09 16:33:55 bisitz Exp $
+# $Id: structuretags.pm,v 1.451 2009/06/11 16:48:28 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2051,15 +2051,16 @@
         my $url=$env{'request.noversionuri'};
         $url=~s/\?.*$//;
 	my ($symb) = &Apache::lonnet::whichuser();
-#       Warning make more sense and is more important on edit screen
+#       Warning makes more sense and is more important on edit screen
 #       $result='<p class="LC_warning">'
 #              .&mt('Note: it can take up to 10 minutes for changes to take effect for all users.')
 #              .&Apache::loncommon::help_open_topic('Caching')
 #              .'</p>';
-        $result.=&Apache::lontemplate::start_functionslist()
-                .&Apache::lontemplate::item_functionslist(
-                     '<a href="'.$url.'/smpedit?symb='.&escape($symb).'">'.&mt('Edit').'</a>')
-                .&Apache::lontemplate::end_functionslist();
+        $result.=&Apache::lonhtmlcommon::start_funclist()
+                .&Apache::lonhtmlcommon::add_item_funclist(
+                     '<a href="'.$url.'/smpedit?symb='.&escape($symb).'">'
+                    .&mt('Edit').'</a>')
+                .&Apache::lonhtmlcommon::end_funclist();
 
     }
     return $result;
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.137 loncom/interface/lonaboutme.pm:1.138
--- loncom/interface/lonaboutme.pm:1.137	Mon Jun  8 18:04:45 2009
+++ loncom/interface/lonaboutme.pm	Thu Jun 11 16:48:33 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Personal Information Page
 #
-# $Id: lonaboutme.pm,v 1.137 2009/06/08 18:04:45 bisitz Exp $
+# $Id: lonaboutme.pm,v 1.138 2009/06/11 16:48:33 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -203,7 +203,6 @@
                    ($env{'user.domain'} eq $cdom));
     if ($forcestudent or $target eq 'tex') { $allowed=0; }
 
-
 # --------------------------------------- There is such a user, get environment
 
     if ($target ne 'tex') {
@@ -218,7 +217,56 @@
         }
         my $start_page = &Apache::loncommon::start_page('Personal Information Page',$rss_link,$args);
         $r->print($start_page);
+   }
+
+#----------------Print Functions
+    if ($target ne 'tex') {
+        my $functions=&Apache::lonhtmlcommon::start_funclist();
+        if ($allowed) {
+            my $query_string = &build_query_string(
+                                   {'forcestudent' => '1',
+                                    'popup' => $env{'form.popup'}});
+            $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                            '<a href="'.$r->uri.$query_string.'">'
+                           .&mt('Show Public View').'</a>'
+                           .&Apache::loncommon::help_open_topic(
+                                'Uploaded_Templates_PublicView'));
+        } elsif ($privleged) {
+            my $query_string = &build_query_string(
+                                   {'forceedit' => '1',
+                                    'popup' => $env{'form.popup'}});
+            $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                            '<a href="'.$r->uri.$query_string.'">'
+                            .&mt('Edit').'</a>');
+        }
+        $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                        &Apache::lontemplate::send_message($r,$cnum,$cdom));
+
+        if ($env{'request.course.id'} &&
+            &Apache::lonnet::allowed('srm',$env{'request.course.id'}) &&
+            &in_course($cdom,$cnum)) {
+            if (&Apache::lonnet::allowed('vsa', $env{'request.course.id'}) ||
+                &Apache::lonnet::allowed('vsa', $env{'request.course.id'}.'/'.$env{'request.course.sec'})) {
+                $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                     &Apache::loncommon::track_student_link(
+                         'View recent activity by this student',$cnum,$cdom));
+            }
+            if (&Apache::lonnet::allowed('vgr', $env{'request.course.id'}) ||
+                &Apache::lonnet::allowed('vgr', $env{'request.course.id'}.'/'.$env{'request.course.sec'})) {
+                $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                    &Apache::loncommon::slot_reservations_link(
+                        'Slot reservation history',$cnum,$cdom));
+            }
+            $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                           &Apache::loncommon::noteswrapper(
+                               &mt('Add Records'),$cnum,$cdom));
+        }
+        $functions.=&Apache::lonhtmlcommon::end_funclist();
+        $r->print(&Apache::loncommon::head_subbox($functions));
+    }
 
+# Print Privacy Note
+    if ($target ne 'tex') {
         #Print Privacy Note
         if ($allowed) {
             $r->print('<div class="LC_info">'
@@ -227,9 +275,11 @@
                 .'</div>'
             );
         }
+    }
 
 #Print last modified
 
+    if ($target ne 'tex') {
         my $lastmod;
         if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) {
             $lastmod=$syllabus{'uploaded.lastmodified'};
@@ -246,37 +296,6 @@
         }
     }
 
-#----------------Print Functions
-    if ($target ne 'tex') {
-         $r->print(&Apache::lontemplate::start_functionslist());
-         if ($allowed) {
-             my $query_string = &build_query_string({'forcestudent' => '1','popup' => $env{'form.popup'}});
-             $r->print(&Apache::lontemplate::item_functionslist(
-                 '<a href="'.$r->uri.$query_string.'">'.&mt('Show Public View').'</a>'
-                 .&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView')));
-         } elsif ($privleged) {
-             my $query_string = &build_query_string({'forceedit' => '1','popup' => $env{'form.popup'}});
-             $r->print(&Apache::lontemplate::item_functionslist(
-                 '<a href="'.$r->uri.$query_string.'">'. &mt('Edit').'</a>'));
-         }
-         $r->print(&Apache::lontemplate::item_functionslist(
-             &Apache::lontemplate::send_message($r,$cnum,$cdom)));
-
-         if ($env{'request.course.id'} && &Apache::lonnet::allowed('srm',$env{'request.course.id'}) && &in_course($cdom,$cnum)) {
-             if (&Apache::lonnet::allowed('vsa', $env{'request.course.id'}) || &Apache::lonnet::allowed('vsa', $env{'request.course.id'}.'/'.$env{'request.course.sec'})) {
-                     $r->print(&Apache::lontemplate::item_functionslist(
-                         &Apache::loncommon::track_student_link('View recent activity by this student',$cnum,$cdom)));
-             }
-             if (&Apache::lonnet::allowed('vgr', $env{'request.course.id'}) ||
-                 &Apache::lonnet::allowed('vgr', $env{'request.course.id'}.'/'.$env{'request.course.sec'})) {
-                 $r->print(&Apache::lontemplate::item_functionslist(
-                     &Apache::loncommon::slot_reservations_link('Slot reservation history',$cnum,$cdom)));
-             }
-             $r->print(&Apache::lontemplate::item_functionslist(
-                            &Apache::loncommon::noteswrapper(&mt('Add Records'),$cnum,$cdom)));
-         }
-         $r->print(&Apache::lontemplate::end_functionslist());
-    }
 #------Print Headtitle
      if ($target ne 'tex') {
         $r->print('<div class="LC_Box">');
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.842 loncom/interface/loncommon.pm:1.843
--- loncom/interface/loncommon.pm:1.842	Wed Jun 10 13:32:38 2009
+++ loncom/interface/loncommon.pm	Thu Jun 11 16:48:33 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.842 2009/06/10 13:32:38 droeschl Exp $
+# $Id: loncommon.pm,v 1.843 2009/06/11 16:48:33 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4873,10 +4873,6 @@
   font-size: small;
 }
 
-.LC_mail_functions {
-    font-weight: bold;
-}
-
 table.LC_data_table,
 table.LC_mail_list {
   border: 1px solid #000000;
@@ -6246,7 +6242,7 @@
 	background-color:transparent;
 }
 
-ul.LC_functionslist li {
+ul.LC_funclist li {
   float: left;
   white-space: nowrap;
   height: 35px; /* at least as high as heighest list item */
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.223 loncom/interface/lonhtmlcommon.pm:1.224
--- loncom/interface/lonhtmlcommon.pm:1.223	Wed Jun 10 13:32:38 2009
+++ loncom/interface/lonhtmlcommon.pm	Thu Jun 11 16:48:33 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.223 2009/06/10 13:32:38 droeschl Exp $
+# $Id: lonhtmlcommon.pm,v 1.224 2009/06/11 16:48:33 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2205,6 +2205,105 @@
     return $div->(join('', @categories), {class => "LC_columnSection"});
 }
 
+##############################################
+##############################################
+
+=pod
+
+=item &start_funclist
+
+Start list of available functions
+
+Typically used to offer a simple list of available functions
+at top or bottom of page.
+All available functions/actions for the current page
+should be included in this list.
+
+If the optional headline text is not provided, a default text will be used.
+
+
+Related routines:
+=over 4
+add_item_funclist
+end_funclist
+=back
+
+
+Inputs: (optional) headline text
+
+Returns: HTML code with function list start
+
+=cut
+
+##############################################
+##############################################
+
+sub start_funclist {
+    my($legendtext)=@_;
+    $legendtext=&mt('Functions') if !$legendtext;
+    return "<fieldset>\n<legend>$legendtext</legend>\n"
+          .'<ul class="LC_funclist">'."\n";
+}
+
+
+##############################################
+##############################################
+
+=pod
+
+=item &add_item_funclist
+
+Adds an item to the list of available functions
+
+Related routines:
+=over 4
+start_funclist
+end_funclist
+=back
+
+Inputs: content item with text and link to function
+
+Returns: HTML code with list item for funclist
+
+=cut
+
+##############################################
+##############################################
+
+sub add_item_funclist {
+    my($content) = @_;
+    return '<li>'.$content.'</li>'."\n";
+}
+
+##############################################
+##############################################
+
+=pod
+
+=item &end_funclist
+
+End list of available functions
+
+Related routines:
+=over 4
+start_funclist
+add_item_funclist
+=back
+
+Inputs: ./.
+
+Returns: HTML code with function list end
+
+=cut
+
+##############################################
+##############################################
+
+sub end_funclist {
+    my($r)=@_;
+    return "</ul>\n</fieldset>\n";
+}
+
 1;
 
 __END__
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.125 loncom/interface/lonmsgdisplay.pm:1.126
--- loncom/interface/lonmsgdisplay.pm:1.125	Fri Jun  5 12:49:50 2009
+++ loncom/interface/lonmsgdisplay.pm	Thu Jun 11 16:48:33 2009
@@ -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.126 2009/06/11 16:48:33 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2333,19 +2333,6 @@
                           .&mt('Next')
                           .'</a>');
     }
-# Print functions
-    my $legendtext='<span class="LC_mail_functions">'
-                   .&mt('Functions')
-                   .'</span>';
-    $r->print('<div class="LC_left_float">'
-                     .&Apache::lontemplate::start_functionslist($legendtext)
-    );
-    foreach my $item (@functionlist) {
-        $r->print(&Apache::lontemplate::item_functionslist($item));
-    }
-    $r->print(&Apache::lontemplate::end_functionslist()
-             .'</div>'
-    );
 
 # Prepare available actions
     my $symb;
@@ -2354,8 +2341,8 @@
     } 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 +2367,31 @@
                                      ,$symb
                                      ,'check'));
 	}
+    }
+
+# Print functionlist and actionlist in page header
+        my $functions='<div class="LC_columnSection">';
 
-# 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):'
-                           ,'<span class="LC_mail_functions">','</span>');
-            $r->print('<div class="LC_left_float">'
-                     .&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()
-                     .'</div>'
-            );
+            $functions.=&Apache::lonhtmlcommon::end_funclist();
         }
-    }
+
+        $functions.='</div>';
+        $r->print(&Apache::loncommon::head_subbox($functions));
+
 
     my ($tonum,$tolist,$cclist,$bcclist,$groupcclist,%recipients);
     if ($content{'recipid'}) {
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.83 loncom/interface/lonsimplepage.pm:1.84
--- loncom/interface/lonsimplepage.pm:1.83	Mon Jun  8 18:04:45 2009
+++ loncom/interface/lonsimplepage.pm	Thu Jun 11 16:48:33 2009
@@ -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.84 2009/06/11 16:48:33 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -182,7 +182,7 @@
             my $msg =
             &mt('You do not currently have rights to view this group.');
             if ($target ne 'tex') {
-                $r->print("<p>$msg</p>".
+                $r->print('<p class="LC_warning">'.$msg.'</p>'.
                 &Apache::loncommon::end_page());
             } else {
                 $r->print('\textbf{'.$msg.'}\end{document}');
@@ -253,37 +253,45 @@
         &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(
-                '<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Student View').'</a>'
-                .&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView')));
+                $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                                '<a href="'.$r->uri.'?forcestudent=1">'
+                               .&mt('Show Student View').'</a>'
+                               .&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(
-                '<a href="'.$r->uri.'?forceedit=edit'.$refarg.'">'.$edittext.'</a>'));
+                $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                                '<a href="'.$r->uri.'?forceedit=edit'.$refarg.'">'
+                               .$edittext.'</a>');
                 if ($group ne '') {
                     if ($group_edit_perm) {
-                        $r->print(&Apache::lontemplate::item_functionslist(
-                        '<a href="/adm/coursegroups?action=modify&amp;refpage=grouplist'
-                        .'&amp;state=pick_task&amp;groupname='.$group.'">'
-                        .&mt('Edit Group Settings').'</a>'));
+                        $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                                        '<a href="/adm/coursegroups'
+                                       .'?action=modify&amp;refpage=grouplist'
+                                       .'&amp;state=pick_task&amp;groupname='
+                                       .$group.'">'
+                                       .&mt('Edit Group Settings')
+                                       .'</a>');
                        }
                     }
             }
-            $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')));
         }
     }
 
@@ -392,7 +400,12 @@
         if ($group ne '') {
             &display_group_links($r,$target,$group,'view',$refarg,%groupinfo);
         } else {
-            $r->print('<p>'.&mt('No page information provided.').'</p>');
+            my $text=&mt('No page information provided.');
+            if ($target ne 'tex') {
+                $r->print('<p class="LC_info">'.$text.'</p>');
+            } else {
+            $r->print($text)
+            }
         }
     }
     if ($env{'form.grade_target'} ne 'tex') {
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.92 loncom/interface/lonsyllabus.pm:1.93
--- loncom/interface/lonsyllabus.pm:1.92	Mon Jun  8 18:04:46 2009
+++ loncom/interface/lonsyllabus.pm	Thu Jun 11 16:48:33 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.92 2009/06/08 18:04:46 bisitz Exp $
+# $Id: lonsyllabus.pm,v 1.93 2009/06/11 16:48:33 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -162,7 +162,6 @@
                 text=>"Course syllabus"});
             $r->print(&Apache::lonhtmlcommon::breadcrumbs());
         }
-
     }
 # ---------------------------------------------------------- Load syllabus info
     my %syllabus=&Apache::lonnet::dump('syllabus',$cdom,$cnum);
@@ -230,6 +229,24 @@
         }
     }
 
+#--------Functions
+if( $allowed || $privileged) {
+    my $functions=&Apache::lonhtmlcommon::start_funclist();
+    if ($allowed) {
+        $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                        '<a href="'.$r->uri.'?forcestudent=1">'
+                       .&mt('Show Public View').'</a>'
+                       .&Apache::loncommon::help_open_topic(
+                            'Uploaded_Templates_PublicView'));
+        } elsif ($privileged) {
+            $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                            '<a href="'.$r->uri.'?forceedit=1">'
+                           .&mt('Edit').'</a>');
+        }
+        $functions.=&Apache::lonhtmlcommon::end_funclist();
+        $r->print(&Apache::loncommon::head_subbox($functions));
+    }
+
 #---------------------Print External URL Syllabus Info
     if( ($allowed) && ($target ne 'tex') ) {
         my $protocol = $Apache::lonnet::protocol{$homeserver};
@@ -273,21 +290,6 @@
                   :'')
              .'\\\\');
     }
-#--------Functions
-    if ($target ne 'tex') {
-        if( $allowed || $privileged) {
-            $r->print(&Apache::lontemplate::start_functionslist());
-        if ($allowed) {
-            $r->print(&Apache::lontemplate::item_functionslist(
-                        '<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Public View').'</a>'
-                       .&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView')));
-        } elsif ($privileged) {
-            $r->print(&Apache::lontemplate::item_functionslist(
-                        '<a href="'.$r->uri.'?forceedit=1">'.&mt('Edit').'</a>'));
-        }
-            $r->print(&Apache::lontemplate::end_functionslist());
-        }
-    }
 #----------------------------Print Headtitle
     if ($target ne 'tex') {
         $r->print('<h1>'.$courseenv{'description'}.'</h1>');
Index: loncom/interface/lontemplate.pm
diff -u loncom/interface/lontemplate.pm:1.36 loncom/interface/lontemplate.pm:1.37
--- loncom/interface/lontemplate.pm:1.36	Mon Jun  8 18:04:46 2009
+++ loncom/interface/lontemplate.pm	Thu Jun 11 16:48:33 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # "Template" Functions to generate html output
 #
-# $Id: lontemplate.pm,v 1.36 2009/06/08 18:04:46 bisitz Exp $
+# $Id: lontemplate.pm,v 1.37 2009/06/11 16:48:33 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -131,23 +131,4 @@
                            &mt('Save All').'" />');
 }
 
-# Functionslist: List of functions
-# Typically used to display a list of available functions at top of page
-sub start_functionslist {
-    my($legendtext)=@_;
-    $legendtext=&mt('Functions') if !$legendtext;
-    return '<fieldset><legend>'.$legendtext.'</legend>'
-          .'<ul class="LC_functionslist">';
-}
-
-sub item_functionslist {
-    my($content) = @_;
-    return '<li>'.$content.'</li>';
-}
-
-sub end_functionslist {
-    my($r)=@_;
-    return '</ul></fieldset>';
-}
-
 1;
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.308 loncom/localize/localize/de.pm:1.309
--- loncom/localize/localize/de.pm:1.308	Mon Jun  8 09:14:13 2009
+++ loncom/localize/localize/de.pm	Thu Jun 11 16:48:38 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.308 2009/06/08 09:14:13 bisitz Exp $
+# $Id: de.pm,v 1.309 2009/06/11 16:48:38 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -10276,8 +10276,8 @@
    'Back to Folder Display'
 => 'Zurück zur Verzeichnisliste',
 
-   '[_1]Currently available actions[_2] (will open extra window):'
-=> '[_1]Verfügbare Aktionen[_2] (öffnen in neuem Fenster):',
+   'Currently available actions (will open extra window)'
+=> 'Verfügbare Aktionen (öffnen in neuem Fenster)',
 
    'There are no ungelesen messages in this folder.' # !
 => 'In diesem Verzeichnis befinden sich keine ungelesenen Nachrichten.',
Index: loncom/localize/localize/zh.pm
diff -u loncom/localize/localize/zh.pm:1.58 loncom/localize/localize/zh.pm:1.59
--- loncom/localize/localize/zh.pm:1.58	Mon Jun  8 09:14:13 2009
+++ loncom/localize/localize/zh.pm	Thu Jun 11 16:48:38 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Chinese Simplified Localization Lexicon
 #
-# $Id: zh.pm,v 1.58 2009/06/08 09:14:13 bisitz Exp $
+# $Id: zh.pm,v 1.59 2009/06/11 16:48:38 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -10346,8 +10346,8 @@
    'Back to Folder Display'
 => '返回文件夹列表',
 
-   'Currently available actions (will open extra window):'
-=> '目前可采取的行动 (在新窗口中打开):',
+   'Currently available actions (will open extra window)'
+=> '目前可采取的行动 (在新窗口中打开)',
 
    'There are no ungelesen messages in this folder.' # !
 => '在此文件夹中没有未阅读邮件。',

--bisitz1244738919--