Diff for /loncom/interface/loncommon.pm between versions 1.1377 and 1.1380

version 1.1377, 2022/02/16 16:28:49 version 1.1380, 2022/05/29 03:19:00
Line 1307  sub help_open_topic { Line 1307  sub help_open_topic {
   
     # Add the text      # Add the text
     my $target = ' target="_top"';      my $target = ' target="_top"';
     if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {      if ((($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) ||
         $target = '';          (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self'))) {
           if (($env{'request.noversionuri'} eq '/adm/searchcat') &&
               ($env{'form.phase'} =~ /^(sort|run_search)$/)) {
               $target = ' target="_parent"';
           } else {
               $target = '';
           }
     }      }
     if ($text ne "") {      if ($text ne "") {
  $template.='<span class="LC_help_open_topic">'   $template.='<span class="LC_help_open_topic">'
                   .'<a'.$target.' href="'.$link.'">'                    .'<a'.$target.' href="'.$link.'">'
                   .$text.'</a>';                    .$text.'</a>';
Line 1520  sub help_open_bug { Line 1526  sub help_open_bug {
     if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {      if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {
         $target = '';          $target = '';
     }      }
       if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'})) {
           $target = ' target="'.$env{'request.deeplink.target'}.'"';
       }
     # Add the text      # Add the text
     if ($text ne "")      if ($text ne "")
     {      {
Line 6224  sub head_subbox { Line 6233  sub head_subbox {
 Input: (optional) filename from which breadcrumb trail is built.  Input: (optional) filename from which breadcrumb trail is built.
        In most cases no input as needed, as $env{'request.filename'}         In most cases no input as needed, as $env{'request.filename'}
        is appropriate for use in building the breadcrumb trail.         is appropriate for use in building the breadcrumb trail.
          frameset flag
          If page header is being requested for use in a frameset, then
          the second (option) argument -- frameset will be true, and
          the target attribute set for links should be target="_parent".
   
 Returns: HTML div with CSTR path and recent box  Returns: HTML div with CSTR path and recent box
          To be included on Authoring Space pages           To be included on Authoring Space pages
Line 6231  Returns: HTML div with CSTR path and rec Line 6244  Returns: HTML div with CSTR path and rec
 =cut  =cut
   
 sub CSTR_pageheader {  sub CSTR_pageheader {
     my ($trailfile) = @_;      my ($trailfile,$frameset) = @_;
     if ($trailfile eq '') {      if ($trailfile eq '') {
         $trailfile = $env{'request.filename'};          $trailfile = $env{'request.filename'};
     }      }
Line 6264  sub CSTR_pageheader { Line 6277  sub CSTR_pageheader {
         $title = &mt('Authoring Space');          $title = &mt('Authoring Space');
     }      }
   
     my ($target,$crumbtarget) = (' target="_top"','_top'); #FIXME lonpubdir: target="_parent"      my ($target,$crumbtarget) = (' target="_top"','_top');
     if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {      if ($frameset) {
           $target = ' target="_parent"';
           $crumbtarget = '_parent';
       } elsif (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {
         $target = '';          $target = '';
         $crumbtarget = '';          $crumbtarget = '';
       } elsif (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'})) {
           $target = ' target="'.$env{'request.deeplink.target'}.'"';
           $crumbtarget = $env{'request.deeplink.target'};
     }      }
   
     my $output =      my $output =
Line 6285  sub CSTR_pageheader { Line 6304  sub CSTR_pageheader {
     }      }
   
     if ($crsauthor) {      if ($crsauthor) {
         $output .= '</form>'.&Apache::lonmenu::constspaceform();          $output .= '</form>'.&Apache::lonmenu::constspaceform($frameset);
     } else {      } else {
         $output .=          $output .=
              '<br />'               '<br />'
             #FIXME lonpubdir: &Apache::lonhtmlcommon::crumbs($uname.$thisdisfn.'/',$crumbtarget,'/priv','','+1',1)."</b></tt><br />"              #FIXME lonpubdir: &Apache::lonhtmlcommon::crumbs($uname.$thisdisfn.'/',$crumbtarget,'/priv','','+1',1)."</b></tt><br />"
             .&Apache::lonhtmlcommon::select_recent('construct','recent','this.form.action=this.form.recent.value;this.form.submit()')              .&Apache::lonhtmlcommon::select_recent('construct','recent','this.form.action=this.form.recent.value;this.form.submit()')
             .'</form>'              .'</form>'
             .&Apache::lonmenu::constspaceform();              .&Apache::lonmenu::constspaceform($frameset);
     }      }
     $output .= '</div>';      $output .= '</div>';
   
Line 6512  sub bodytag { Line 6531  sub bodytag {
   
         unless ($args->{'no_primary_menu'}) {          unless ($args->{'no_primary_menu'}) {
             my ($left,$right) = Apache::lonmenu::primary_menu($crstype,$ltimenu,$menucoll,$menuref,              my ($left,$right) = Apache::lonmenu::primary_menu($crstype,$ltimenu,$menucoll,$menuref,
                                                               $args->{'links_disabled'});                                                                $args->{'links_disabled'},
                                                                 $args->{'links_target'});
   
             if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {              if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {
                 if ($dc_info) {                  if ($dc_info) {
Line 6545  sub bodytag { Line 6565  sub bodytag {
                 $bodytag .= Apache::lonmenu::secondary_menu($httphost,$ltiscope,$ltimenu,                  $bodytag .= Apache::lonmenu::secondary_menu($httphost,$ltiscope,$ltimenu,
                                                             $args->{'no_primary_menu'},                                                              $args->{'no_primary_menu'},
                                                             $menucoll,$menuref,                                                              $menucoll,$menuref,
                                                             $args->{'links_disabled'});                                                              $args->{'links_disabled'},
                                                               $args->{'links_target'});
             }              }
             $bodytag .= Apache::lonmenu::serverform();              $bodytag .= Apache::lonmenu::serverform();
             $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');              $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
Line 9226  $args - additional optional args support Line 9247  $args - additional optional args support
              links_disabled -> Links in primary and secondary menus are disabled               links_disabled -> Links in primary and secondary menus are disabled
                                (Can enable them once page has loaded - see lonroles.pm                                 (Can enable them once page has loaded - see lonroles.pm
                                for an example).                                 for an example).
                links_target   -> Target for links, e.g., _parent (optional).
   
 =back  =back
   
Line 9454  sub menucoll_in_effect { Line 9476  sub menucoll_in_effect {
                 }                  }
             }              }
             if ($deeplink ne '') {              if ($deeplink ne '') {
                 my ($state,$others,$listed,$scope,$protect,$display) = split(/,/,$deeplink);                  my ($state,$others,$listed,$scope,$protect,$display,$target) = split(/,/,$deeplink);
                 if ($display =~ /^\d+$/) {                  if ($display =~ /^\d+$/) {
                     $deeplinkmenu = 1;                      $deeplinkmenu = 1;
                     $menucoll = $display;                      $menucoll = $display;

Removed from v.1.1377  
changed lines
  Added in v.1.1380


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