Diff for /loncom/interface/loncommon.pm between versions 1.961 and 1.962

version 1.961, 2010/03/22 13:24:16 version 1.962, 2010/03/22 20:11:22
Line 4539  Inputs: Line 4539  Inputs:
   
 =item * $bgcolor, used to override the bgcolor on a webpage to a specific value  =item * $bgcolor, used to override the bgcolor on a webpage to a specific value
   
 #SD  
 #RC =item * $no_inline_link, if true and in remote mode, don't show the   
 #RC          'Switch To Inline Menu' link  
 #RC   
 =item * $args, optional argument valid values are  =item * $args, optional argument valid values are
             no_auto_mt_title -> prevents &mt()ing the title arg              no_auto_mt_title -> prevents &mt()ing the title arg
             inherit_jsmath -> when creating popup window in a page,              inherit_jsmath -> when creating popup window in a page,
Line 4560  other decorations will be returned. Line 4556  other decorations will be returned.
   
 sub bodytag {  sub bodytag {
     my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,      my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,
         $no_nav_bar,$bgcolor,$no_inline_link,$args)=@_;          $no_nav_bar,$bgcolor,$args)=@_;
   
     my $public;      my $public;
     if ((($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public'))      if ((($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public'))
Line 4637  sub bodytag { Line 4633  sub bodytag {
     $role = '<span class="LC_nobreak">('.$role.')</span>' if $role;      $role = '<span class="LC_nobreak">('.$role.')</span>' if $role;
     &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']);      &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']);
   
         # No Remote  
         if ($no_nav_bar || $env{'form.inhibitmenu'} eq 'yes') {           if ($no_nav_bar || $env{'form.inhibitmenu'} eq 'yes') { 
             return $bodytag;               return $bodytag; 
         }           } 
Line 4679  sub bodytag { Line 4674  sub bodytag {
             $bodytag .= Apache::lonmenu::serverform();              $bodytag .= Apache::lonmenu::serverform();
             $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');              $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
             if ($env{'request.state'} eq 'construct') {              if ($env{'request.state'} eq 'construct') {
                 $bodytag .= &Apache::lonmenu::innerregister($forcereg,'',                  $bodytag .= &Apache::lonmenu::innerregister($forcereg,
                                 $args->{'bread_crumbs'});                                  $args->{'bread_crumbs'});
             } elsif ($forcereg) {               } elsif ($forcereg) { 
                 $bodytag .= &Apache::lonmenu::innerregister($forcereg);                  $bodytag .= &Apache::lonmenu::innerregister($forcereg);
Line 6570  sub headtag { Line 6565  sub headtag {
     if (!$args->{'frameset'}) {      if (!$args->{'frameset'}) {
  $result .= &Apache::lonhtmlcommon::htmlareaheaders();   $result .= &Apache::lonhtmlcommon::htmlareaheaders();
     }      }
     if ($args->{'force_register'}) {      if ($args->{'force_register'} && $env{'request.noversionuri'} !~ m{^/res/adm/pages/}) {
  $result .= &Apache::lonmenu::registerurl();          $result .= Apache::lonxml::display_title();
     }      }
     if (!$args->{'no_nav_bar'}       if (!$args->{'no_nav_bar'} 
  && !$args->{'only_body'}   && !$args->{'only_body'}
Line 6597  ADDMETA Line 6592  ADDMETA
     $result .= '<title> LON-CAPA '.$title.'</title>'      $result .= '<title> LON-CAPA '.$title.'</title>'
  .'<link rel="stylesheet" type="text/css" href="'.$url.'" />'   .'<link rel="stylesheet" type="text/css" href="'.$url.'" />'
  .$head_extra;   .$head_extra;
     return $result;      return $result.'</head>';
 }  }
   
 =pod  =pod
Line 6654  sub xml_begin { Line 6649  sub xml_begin {
   
 =pod  =pod
   
 =item * &endheadtag()  
   
 Returns a uniform </head> for LON-CAPA web pages.  
   
 Inputs: none  
   
 =cut  
   
 sub endheadtag {  
     return '</head>';  
 }  
   
 =pod  
   
 =item * &head()  
   
 Returns a uniform complete <head>..</head> section for LON-CAPA web pages.  
   
 Inputs:  
   
 =over 4  
   
 $title - optional title for the page  
   
 $head_extra - optional extra HTML to put inside the <head>  
   
 =back  
   
 =cut  
   
 sub head {  
     my ($title,$head_extra,$args) = @_;  
     return &headtag($title,$head_extra,$args).&endheadtag();  
 }  
   
 =pod  
   
 =item * &start_page()  =item * &start_page()
   
 Returns a complete <html> .. <body> section for LON-CAPA web pages.  Returns a complete <html> .. <body> section for LON-CAPA web pages.
Line 6728  $args - additional optional args support Line 6686  $args - additional optional args support
              skip_phases    -> hash ref of                skip_phases    -> hash ref of 
                                     head -> skip the <html><head> generation                                      head -> skip the <html><head> generation
                                     body -> skip all <body> generation                                      body -> skip all <body> generation
 #RC             no_inline_link -> if true and in remote mode, don't show the   
 #RC                                    'Switch To Inline Menu' link  
              no_auto_mt_title -> prevent &mt()ing the title arg               no_auto_mt_title -> prevent &mt()ing the title arg
              inherit_jsmath -> when creating popup window in a page,               inherit_jsmath -> when creating popup window in a page,
                                     should it have jsmath forced on by the                                      should it have jsmath forced on by the
Line 6760  sub start_page { Line 6716  sub start_page {
     if (! exists($args->{'skip_phases'}{'head'}) ) {      if (! exists($args->{'skip_phases'}{'head'}) ) {
  $result.=   $result.=
     &xml_begin().      &xml_begin().
     &headtag($title,$head_extra,\%head_args).&endheadtag();          &headtag($title,$head_extra,\%head_args);
     }      }
           
     if (! exists($args->{'skip_phases'}{'body'}) ) {      if (! exists($args->{'skip_phases'}{'body'}) ) {
Line 6774  sub start_page { Line 6730  sub start_page {
                          $args->{'function'},       $args->{'add_entries'},                           $args->{'function'},       $args->{'add_entries'},
                          $args->{'only_body'},      $args->{'domain'},                           $args->{'only_body'},      $args->{'domain'},
                          $args->{'force_register'}, $args->{'no_nav_bar'},                           $args->{'force_register'}, $args->{'no_nav_bar'},
                          $args->{'bgcolor'},        $args->{'no_inline_link'},                           $args->{'bgcolor'},        $args);
                          $args);  
         }          }
     }      }
   
Line 6820  sub start_page { Line 6775  sub start_page {
     return $result;      return $result;
 }  }
   
   
 =pod  
   
 =item * &head()  
   
 Returns a complete </body></html> section for LON-CAPA web pages.  
   
 Inputs:         $args - additional optional args supported are:  
                  js_ready     -> return a string ready for being used in   
                                  a javascript writeln  
                  html_encode  -> return a string ready for being used in   
                                  a html attribute  
                  frameset     -> if true will start with a <frameset>  
                                  rather than <body>  
                  dicsussion   -> if true will get discussion from  
                                   lonxml::xmlend  
                                  (you can pass the target and parser arguments  
                                   through optional 'target' and 'parser' args  
                                   to this routine)  
   
 =cut  
   
 sub end_page {  sub end_page {
     my ($args) = @_;      my ($args) = @_;
     $env{'internal.end_page'}++;      $env{'internal.end_page'}++;

Removed from v.1.961  
changed lines
  Added in v.1.962


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