Diff for /loncom/interface/lonhelpmenu.pm between versions 1.28 and 1.29

version 1.28, 2006/06/26 22:09:01 version 1.29, 2006/06/26 22:13:13
Line 37  use LONCAPA; Line 37  use LONCAPA;
   
 sub handler {  sub handler {
     my ($r) = @_;      my ($r) = @_;
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['page','function','faq','bug','topic','component_help','origurl','stayonpage']);      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['page','faq','bug','topic','component_help','origurl','stayonpage']);
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;
   
Line 47  sub handler { Line 47  sub handler {
     my $faq = $env{'form.faq'};      my $faq = $env{'form.faq'};
     my $bug = $env{'form.bug'};      my $bug = $env{'form.bug'};
     my $topic = $env{'form.topic'};      my $topic = $env{'form.topic'};
     my $function = $env{'form.function'};  
     my $component_help = $env{'form.component_help'};      my $component_help = $env{'form.component_help'};
     my $origurl = $env{'form.origurl'};      my $origurl = $env{'form.origurl'};
     my $stayOnPage = $env{'form.stayonpage'};      my $stayOnPage = $env{'form.stayonpage'};
Line 63  sub handler { Line 62  sub handler {
     my $faqbaseurl = $Apache::lonnet::perlvar{'FAQHost'};      my $faqbaseurl = $Apache::lonnet::perlvar{'FAQHost'};
     my $requestmail = $Apache::lonnet::perlvar{'lonSupportEMail'};      my $requestmail = $Apache::lonnet::perlvar{'lonSupportEMail'};
     if ($env{'form.page'} eq 'banner') {      if ($env{'form.page'} eq 'banner') {
         &display_help_banner($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage);          &display_help_banner($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage);
     } elsif ($env{'form.page'} eq 'body') {      } elsif ($env{'form.page'} eq 'body') {
         &display_help_mainpage($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);          &display_help_mainpage($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
     }      }
     return OK;      return OK;
 }  }
   
 sub display_help_banner {  sub display_help_banner {
     my ($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage) = @_;      my ($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage) = @_;
     my $location=&Apache::loncommon::lonhttpdurl("/adm");      my $location=&Apache::loncommon::lonhttpdurl("/adm");
     my $scripttag = '';      my $scripttag = '';
     if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {      if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {
Line 84  function gohelpdesk() { Line 83  function gohelpdesk() {
         actiontype = parent.bodyframe.document.logproblem.action.value;          actiontype = parent.bodyframe.document.logproblem.action.value;
     }      }
     catch(error) {      catch(error) {
         parent.bodyframe.location = "/adm/support?origurl=$displayurl&function=$function";          parent.bodyframe.location = "/adm/support?origurl=$displayurl";
         return;          return;
     }      }
     if (actiontype) {      if (actiontype) {
Line 99  function gohelpdesk() { Line 98  function gohelpdesk() {
                 return;                  return;
             }              }
         }          }
         parent.bodyframe.location = "/adm/support?origurl=$displayurl&function=$function";          parent.bodyframe.location = "/adm/support?origurl=$displayurl";
         return;          return;
     }      }
 }  }
Line 138  SCRIPT_TWO Line 137  SCRIPT_TWO
  'marginheight' => "1");   'marginheight' => "1");
     my $start_page =       my $start_page = 
  &Apache::loncommon::start_page('',$scripttag,   &Apache::loncommon::start_page('',$scripttag,
        {'function'    => $function,         {'add_entries' => \%body_layout,
  'add_entries' => \%body_layout,  
  'only_body'   => 1,});   'only_body'   => 1,});
     $r->print($start_page);      $r->print($start_page);
   
Line 200  END Line 198  END
 }  }
   
 sub display_help_mainpage {  sub display_help_mainpage {
     my ($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail) = @_;      my ($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail) = @_;
   
     my %lt =&Apache::lonlocal::texthash(      my %lt =&Apache::lonlocal::texthash(
         'topp' => 'Topic Page',          'topp' => 'Topic Page',
Line 227  sub display_help_mainpage { Line 225  sub display_help_mainpage {
  'marginheight' => "0");   'marginheight' => "0");
     my $start_page =      my $start_page =
  &Apache::loncommon::start_page('Help Content',undef,   &Apache::loncommon::start_page('Help Content',undef,
        {'function'    => $function,         {'add_entries' => \%body_layout,
  'add_entries' => \%body_layout,  
  'only_body'   => 1,});   'only_body'   => 1,});
     $r->print($start_page);      $r->print($start_page);
     $r->print($lt{'chen'});      $r->print($lt{'chen'});
Line 257  sub display_help_mainpage { Line 254  sub display_help_mainpage {
     if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {      if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {
         $r->print("          $r->print("
           <ul>            <ul>
            <li><a href=\"/adm/support?origurl=".&escape($origurl)."&function=$function\">$lt{'cont'}</a></li>             <li><a href=\"/adm/support?origurl=".&escape($origurl)."\">$lt{'cont'}</a></li>
           </ul>            </ul>
           <p>$lt{'suhr'}");            <p>$lt{'suhr'}");
          unless ($env{'user.adv'}) {           unless ($env{'user.adv'}) {

Removed from v.1.28  
changed lines
  Added in v.1.29


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>