[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonhtmlcommon.pm

raeburn raeburn at source.lon-capa.org
Thu May 28 08:27:24 EDT 2015


raeburn		Thu May 28 12:27:24 2015 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  - For 2.11
    - Backport 1.364, 1.365
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.358.2.1 loncom/interface/lonhtmlcommon.pm:1.358.2.2
--- loncom/interface/lonhtmlcommon.pm:1.358.2.1	Mon May 11 17:18:36 2015
+++ loncom/interface/lonhtmlcommon.pm	Thu May 28 12:27:23 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.358.2.1 2015/05/11 17:18:36 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.358.2.2 2015/05/28 12:27:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1660,12 +1660,19 @@
 All inputs can be undef without problems.
 
 Inputs: $component (the text on the right side of the breadcrumbs trail),
-        $component_help
+        $component_help (the help item filename (without .tex extension).
         $menulink (boolean, controls whether to include a link to /adm/menu)
         $helplink (if 'nohelp' don't include the orange help link)
         $css_class (optional name for the class to apply to the table for CSS)
         $no_mt (optional flag, 1 if &mt() is _not_ to be applied to $component
            when including the text on the right.
+        $CourseBreadcrumbs (optional flag, 1 if &breadcrumbs called from &docs_breadcrumbs,
+           because breadcrumbs are being)
+        $topic_help (optional help item to be displayed on right side of the breadcrumbs 
+           row, using loncommon::help_open_topic() to generate the link.
+        $topic_help_text (text to include in the link in the optional help item 
+           on the right side of the breadcrumbs row.
+
 Returns a string containing breadcrumbs for the current page.
 
 =item &clear_breadcrumbs()
@@ -1693,7 +1700,7 @@
     
     sub breadcrumbs {
         my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt, 
-            $CourseBreadcrumbs) = @_;
+            $CourseBreadcrumbs,$topic_help,$topic_help_text) = @_;
         #
         $css_class ||= 'LC_breadcrumbs';
 
@@ -1800,6 +1807,10 @@
                                                          $component_help,
                                                          $faq,$bug);
         }
+        if ($topic_help && $topic_help_text) {
+           $icons .= ' '.&Apache::loncommon::help_open_topic($topic_help,&mt($topic_help_text),'',
+                                                             undef,600);
+        }
         #
 
 		
@@ -1812,7 +1823,7 @@
         }
 
 
-        if ($component) {
+        if (($component) || ($topic_help && $topic_help_text)) {
             $links = &htmltag('span', 
                              ( $no_mt ? $component : mt($component) ).
                              ( $icons ? $icons : '' ),




More information about the LON-CAPA-cvs mailing list