".
- "$text";
+ my $output;
+ if ($component_help) {
+ if (!$text) {
+ $output=&help_open_topic($component_help,undef,$stayOnPage,
+ $width,$height);
+ } else {
+ my $help_text;
+ $help_text=&unescape($topic);
+ $output=''.
+ &help_open_topic($component_help,$help_text,$stayOnPage,
+ $width,$height).' | ';
+ }
}
+ my $banner_link = &update_help_link($topic,$component_help,$faq,$bug,$stayOnPage);
+ return $output.$banner_link;
+}
+
+sub top_nav_help {
+ my ($text) = @_;
+ $text = &mt($text);
+ my $stay_on_page =
+ ($env{'environment.remote'} eq 'off' );
+ my $link = ($stay_on_page) ? "javascript:helpMenu('display')"
+ : "javascript:helpMenu('open')";
+ my $banner_link = &update_help_link(undef,undef,undef,undef,$stay_on_page);
+
+ my $title = &mt('Get help');
+
+ return <<"END";
+$banner_link
+ $text
+END
+}
+
+sub help_menu_js {
+ my ($text) = @_;
+
+ my $stayOnPage =
+ ($env{'environment.remote'} eq 'off' );
+
+ my $width = 620;
+ my $height = 600;
+ my $helptopic=&general_help();
+ my $details_link = '/adm/help/'.$helptopic.'.hlp';
my $nothing=&Apache::lonhtmlcommon::javascript_nothing();
- my $html=&Apache::lonxml::xmlbegin();
- my $helpicon=&lonhttpdurl("/adm/lonIcons/helpgateway.gif");
- $template .= <<"ENDTEMPLATE";
-
-
+
ENDTEMPLATE
- if ($component_help) {
- if (!$text) {
- $template=&help_open_topic($component_help,undef,$stayOnPage,
- $width,$height).' '.$template;
- } else {
- my $help_text;
- $help_text=&Apache::lonnet::unescape($topic);
- $template=''.
- &help_open_topic($component_help,$help_text,$stayOnPage,
- $width,$height).' | '.$template.
- ' | ';
- }
- }
- if ($text ne '') { $template.=' |