--- loncom/interface/loncommon.pm 2024/10/07 21:20:09 1.1075.2.172 +++ loncom/interface/loncommon.pm 2024/12/29 01:49:56 1.1075.2.175 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1075.2.172 2024/10/07 21:20:09 raeburn Exp $ +# $Id: loncommon.pm,v 1.1075.2.175 2024/12/29 01:49:56 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5810,17 +5810,19 @@ sub bodytag { my $funclist; if (($env{'environment.remote'} eq 'on') && ($env{'request.state'} ne 'construct')) { - $bodytag .= Apache::lonhtmlcommon::scripttag(Apache::lonmenu::utilityfunctions($httphost), 'start')."\n". - Apache::lonmenu::serverform(); - my $forbodytag; - &Apache::lonmenu::prepare_functions($env{'request.noversionuri'}, - $forcereg,$args->{'group'}, - $args->{'bread_crumbs'}, - $advtoolsref,'','',\$forbodytag); - unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') { - $funclist = $forbodytag; + unless ($args->{'switchserver'}) { + $bodytag .= Apache::lonhtmlcommon::scripttag(Apache::lonmenu::utilityfunctions($httphost), 'start')."\n". + Apache::lonmenu::serverform(); + my $forbodytag; + &Apache::lonmenu::prepare_functions($env{'request.noversionuri'}, + $forcereg,$args->{'group'}, + $args->{'bread_crumbs'}, + $advtoolsref,'','',\$forbodytag); + unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') { + $funclist = $forbodytag; + } + $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); } - $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); } else { # if ($env{'request.state'} eq 'construct') { @@ -5917,12 +5919,17 @@ sub bodytag { # Top frame rendering, Remote is up # + my $linkattr; + if ($args->{'links_disabled'}) { + $linkattr = 'class="LCisDisabled" aria-disabled="true"'; + } + my $help=($no_inline_link?'' - :&Apache::loncommon::top_nav_help('Help')); + :&top_nav_help('Help',$linkattr)); # Explicit link to get inline menu my $menu= ($no_inline_link?'' - :''.&mt('Switch to Inline Menu Mode').''); + :''.&mt('Switch to Inline Menu Mode').''); if ($dc_info) { $dc_info = qq|($dc_info)|; @@ -5930,8 +5937,12 @@ sub bodytag { my $name = &plainname($env{'user.name'},$env{'user.domain'}); unless ($public) { + my $class = 'LC_menubuttons_link'; + if ($args->{'links_disabled'}) { + $class .= ' LCisDisabled'; + } $name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'}, - undef,'LC_menubuttons_link'); + undef,$class); } unless ($env{'form.inhibitmenu'}) { @@ -8519,6 +8530,11 @@ $args - additional optional args support no_auto_mt_title -> prevent &mt()ing the title arg bread_crumbs -> Array containing breadcrumbs bread_crumbs_component -> if exists show it as headline else show only the breadcrumbs + bread_crumbs_style -> breadcrumbs are contained within
, + and &standard_css() contains CSS for #LC_breadcrumbs, if you want + to override those values, or add to them, specify the value to + include in the style attribute to include in the div tag by using + bread_crumbs_style (e.g., overflow: visible) bread_crumbs_nomenu -> if true will pass false as the value of $menulink to lonhtmlcommon::breadcrumbs group -> includes the current group, if page is for a @@ -8602,9 +8618,12 @@ sub start_page { } #if bread_crumbs_component exists show it as headline else show only the breadcrumbs if(exists($args->{'bread_crumbs_component'})){ - $result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'},'',$menulink); + $result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'}, + '',$menulink,'', + $args->{'bread_crumbs_style'}); }else{ - $result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink); + $result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink,'', + $args->{'bread_crumbs_style'}); } } elsif (($env{'environment.remote'} eq 'on') && ($env{'form.inhibitmenu'} ne 'yes') &&