Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.402 and 1.403

version 1.402, 2022/05/24 18:21:43 version 1.403, 2022/05/29 20:37:21
Line 79  sub coursepreflink { Line 79  sub coursepreflink {
    my ($text,$category)=@_;     my ($text,$category)=@_;
    if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) {     if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) {
        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')) ||
              (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self'))) {
            $target ='';             $target ='';
        }         }
        if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'})) {  
            $target = ' target="'.$env{'request.deeplink.target'}.'"';  
        }  
        return '<a'.$target.' href="'.&HTML::Entities::encode("/adm/courseprefs?phase=display&actions=$category",'<>&"').'"><span class="LC_setting">'.$text.'</span></a>';         return '<a'.$target.' href="'.&HTML::Entities::encode("/adm/courseprefs?phase=display&actions=$category",'<>&"').'"><span class="LC_setting">'.$text.'</span></a>';
    } else {     } else {
       return '';        return '';
Line 109  sub direct_parm_link { Line 107  sub direct_parm_link {
     $part=&entity_encode($part);      $part=&entity_encode($part);
     if (($symb) && (&Apache::lonnet::allowed('opa')) && ($target ne 'tex')) {      if (($symb) && (&Apache::lonnet::allowed('opa')) && ($target ne 'tex')) {
         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')) ||
               (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self'))) {
             $target='';              $target='';
         }          }
         if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'})) {  
             $target = ' target="'.$env{'request.deeplink.target'}.'"';  
         }  
         return "<a".$target." href=\"/adm/parmset?symb=$symb&amp;filter=$filter&amp;part=$part\"><span class=\"LC_setting\">$linktext</span></a>";          return "<a".$target." href=\"/adm/parmset?symb=$symb&amp;filter=$filter&amp;part=$part\"><span class=\"LC_setting\">$linktext</span></a>";
     } else {      } else {
         return $linktext;          return $linktext;
Line 1876  loncommon::help_open_topic() to generate Line 1872  loncommon::help_open_topic() to generate
 text to include in the link in the optional help item ($topic_help) on the right  text to include in the link in the optional help item ($topic_help) on the right
 side of the breadcrumbs row.  side of the breadcrumbs row.
   
   =item $links_target
   
   optionally includes the target (_top, _parent or _self) for (i) initial
   $menulink item in the breadcrumbs (if present), (ii) return to last location
   (if present), and (iii) help item at the right side of breadcrumbs menu, 
   created by loncommon::help_open_topic() or loncommon::help_open_menu().
   
 =back  =back
   
 =back  =back
Line 1907  returns: nothing Line 1910  returns: nothing
           
     sub breadcrumbs {      sub breadcrumbs {
         my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt,           my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt, 
             $CourseBreadcrumbs,$topic_help,$topic_help_text,$crstype) = @_;              $CourseBreadcrumbs,$topic_help,$topic_help_text,$links_target) = @_;
         #          #
         $css_class ||= 'LC_breadcrumbs';          $css_class ||= 'LC_breadcrumbs';
   
Line 1951  returns: nothing Line 1954  returns: nothing
                 }                  }
             }              }
             my $target = '_top';              my $target = '_top';
             if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {              if ($links_target) {
                   $target = $links_target;
               } elsif ((($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) ||
                   (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self'))) {
                 $target='';                  $target='';
             }              }
             if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'})) {  
                 $target = $env{'request.deeplink.target'};  
             }  
             $menulink =  {  href   =>'/adm/menu',              $menulink =  {  href   =>'/adm/menu',
                             title  =>'Go to main menu',                              title  =>'Go to main menu',
                             target =>$target,                              target =>$target,
Line 1977  returns: nothing Line 1980  returns: nothing
                             title => &mt('Back to most recent content resource'),                              title => &mt('Back to most recent content resource'),
                             class => 'LC_menubuttons_link',                              class => 'LC_menubuttons_link',
                           };                            };
             if ($env{'request.noversionuri'} eq '/adm/searchcat') {              if ($links_target) {
                 $hashref->{'target'} = '_top';                  $hashref->{'target'} = $links_target;
                 if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {  
                     $hashref->{'target'} = '_parent';  
                 }  
                 if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self')) {  
                     $hashref->{'target'} = '_parent';  
                 }  
             }              }
             $links=&htmltag( 'a','<img src="/res/adm/pages/tolastloc.png" alt="'.$alttext.'" class="LC_icon" />',              $links=&htmltag( 'a','<img src="/res/adm/pages/tolastloc.png" alt="'.$alttext.'" class="LC_icon" />',
                              $hashref);                               $hashref);
Line 2035  returns: nothing Line 2032  returns: nothing
         if ($faq ne '' || $component_help ne '' || $bug ne '') {          if ($faq ne '' || $component_help ne '' || $bug ne '') {
             $icons .= &Apache::loncommon::help_open_menu($component,              $icons .= &Apache::loncommon::help_open_menu($component,
                                                          $component_help,                                                           $component_help,
                                                          $faq,$bug);                                                           $faq,$bug,'','','','',
                                                            $links_target);
         }          }
         if ($topic_help && $topic_help_text) {          if ($topic_help && $topic_help_text) {
            $icons .= ' '.&Apache::loncommon::help_open_topic($topic_help,&mt($topic_help_text),'',             $icons .= ' '.&Apache::loncommon::help_open_topic($topic_help,&mt($topic_help_text),'',
                                                              undef,600);                                                               undef,600,'',$links_target);
         }          }
         #          #
   

Removed from v.1.402  
changed lines
  Added in v.1.403


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