[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 03 Jul 2004 20:24:12 -0000


albertel		Sat Jul  3 16:24:12 2004 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  -allow help menu link to be named
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.195 loncom/interface/loncommon.pm:1.196
--- loncom/interface/loncommon.pm:1.195	Sat Jul  3 15:12:41 2004
+++ loncom/interface/loncommon.pm	Sat Jul  3 16:24:12 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.195 2004/07/03 19:12:41 albertel Exp $
+# $Id: loncommon.pm,v 1.196 2004/07/03 20:24:12 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -662,7 +662,13 @@
     }
     my $banner_link = "/adm/helpmenu?page=banner&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp";
     my $details_link = "/adm/helpmenu?page=body&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp";
-    my $template .= <<"ENDTEMPLATE";
+    my $template;
+    if ($text ne "") {
+	$template .= 
+  "<table bgcolor='#337733' cellspacing='1' cellpadding='1' border='0'><tr>".
+  "<td bgcolor='#448844'><a href=\"$link\"><font color='#FFFFFF' size='2'>$text</font></a>";
+    }
+    $template .= <<"ENDTEMPLATE";
  <script>
 function helpMenu(caller) {
     if (caller == 'open') {
@@ -682,6 +688,7 @@
  </script>
  <a href="$link" title="$title"><image src="/adm/lonMisc/smallFAQ.gif" border="0" alt="(Help Menu)" /></a>
 ENDTEMPLATE
+    if ($text ne '') { $template.='</td></tr></table>' };
     return $template;
 }