'
+ '
'
.$content
.'
'
}
@@ -4486,9 +4590,9 @@ Returns: HTML div with CSTR path and rec
sub CSTR_pageheader {
# this is for resources; directories have customtitle, and crumbs
# and select recent are created in lonpubdir.pm
- my ($uname,$thisdisfn)=
- ($env{'request.filename'} =~ m|^/home/([^/]+)/public_html/(.*)|);
- my $formaction='/priv/'.$uname.'/'.$thisdisfn;
+ my ($udom,$uname,$thisdisfn)=
+ ($env{'request.filename'} =~ m|^/home/httpd/html/priv/([^/]+)/([^/]+)/(.*)$|);
+ my $formaction='/priv/'.$udom.'/'.$uname.'/'.$thisdisfn;
$formaction=~s/\/+/\//g;
my $parentpath = '';
@@ -4562,9 +4666,6 @@ Inputs:
=item * $bgcolor, used to override the bgcolor on a webpage to a specific value
-=item * $no_inline_link, if true and in remote mode, don't show the
- 'Switch To Inline Menu' link
-
=item * $args, optional argument valid values are
no_auto_mt_title -> prevents &mt()ing the title arg
inherit_jsmath -> when creating popup window in a page,
@@ -4582,7 +4683,7 @@ other decorations will be returned.
sub bodytag {
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,
- $no_nav_bar,$bgcolor,$no_inline_link,$args)=@_;
+ $no_nav_bar,$bgcolor,$args)=@_;
my $public;
if ((($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public'))
@@ -4624,8 +4725,6 @@ sub bodytag {
}
if (!$realm) { $realm=' '; }
-# Set messages
- my $messages=&domainlogo($domain);
my $extra_body_attr = &make_attr_string($forcereg,\%design);
@@ -4643,7 +4742,7 @@ sub bodytag {
} else {
$name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'});
}
-
+
my $titleinfo = '
'.$title.'
';
#
# Extra info if you are the DC
@@ -4659,8 +4758,6 @@ sub bodytag {
$role = '
('.$role.')' if $role;
&get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']);
- if ($env{'environment.remote'} eq 'off') {
- # No Remote
if ($no_nav_bar || $env{'form.inhibitmenu'} eq 'yes') {
return $bodytag;
}
@@ -4702,7 +4799,7 @@ sub bodytag {
$bodytag .= Apache::lonmenu::serverform();
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
if ($env{'request.state'} eq 'construct') {
- $bodytag .= &Apache::lonmenu::innerregister($forcereg,'',
+ $bodytag .= &Apache::lonmenu::innerregister($forcereg,
$args->{'bread_crumbs'});
} elsif ($forcereg) {
$bodytag .= &Apache::lonmenu::innerregister($forcereg);
@@ -4715,40 +4812,6 @@ sub bodytag {
}
return $bodytag;
- }
-
-#
-# Top frame rendering, Remote is up
-#
-
- my $imgsrc = $img;
- if ($img =~ /^\/adm/) {
- $imgsrc = &lonhttpdurl($img);
- }
- my $upperleft='
';
-
- # Explicit link to get inline menu
- my $menu= ($no_inline_link?''
- :'
'.&mt('Switch to Inline Menu Mode').'');
-
- if ($dc_info) {
- $dc_info = qq|
($dc_info)|;
- }
-
- $bodytag .= qq|
$name $role
-
$realm $dc_info
| unless $env{'form.inhibitmenu'};
- return(<
-$upperleft |
- $messages |
-
-$titleinfo $dc_info $menu |
-
-
-ENDBODY
}
sub dc_courseid_toggle {
@@ -4780,22 +4843,8 @@ sub make_attr_string {
delete($attr_ref->{$key});
}
}
- $attr_ref->{'onload'} =
- &Apache::lonmenu::loadevents(). $on_load;
- $attr_ref->{'onunload'}=
- &Apache::lonmenu::unloadevents().$on_unload;
- }
-
-# Accessibility font enhance
- if ($env{'browser.fontenhance'} eq 'on') {
- my $style;
- foreach my $key (keys(%{$attr_ref})) {
- if (lc($key) eq 'style') {
- $style.=$attr_ref->{$key}.';';
- delete($attr_ref->{$key});
- }
- }
- $attr_ref->{'style'}=$style.'; font-size: x-large;';
+ $attr_ref->{'onload'} = $on_load;
+ $attr_ref->{'onunload'}= $on_unload;
}
my $attr_string;
@@ -4893,6 +4942,7 @@ sub standard_css {
$env{'browser.type'} eq 'safari' ) ? '0 2px 0 2px'
: '0 3px 0 4px';
+
return < legend {
#LC_nav_bar {
float: left;
+ background-color: $pgbg_or_bgcolor;
margin: 0 0 2px 0;
}
@@ -6121,6 +6140,7 @@ fieldset > legend {
padding: 0;
font-weight: bold;
text-align: center;
+ background-color: $pgbg_or_bgcolor;
}
#LC_nav_bar em {
@@ -6128,19 +6148,10 @@ fieldset > legend {
font-style: normal;
}
-/* Preliminary fix to hide nav_bar inside bookmarks window */
-#LC_bookmarks #LC_nav_bar {
- display:none;
-}
-
ol.LC_primary_menu {
float: right;
margin: 0;
-}
-
-span.LC_new_message{
- font-weight:bold;
- color: darkred;
+ background-color: $pgbg_or_bgcolor;
}
ol#LC_PathBreadcrumbs {
@@ -6163,6 +6174,11 @@ ol.LC_primary_menu a {
text-decoration: none;
}
+ol.LC_primary_menu a.LC_new_message {
+ font-weight:bold;
+ color: darkred;
+}
+
ol.LC_docs_parameters {
margin-left: 0;
padding: 0;
@@ -6195,6 +6211,7 @@ ul#LC_secondary_menu {
padding: 0;
margin: 0;
width: 100%;
+ text-align: left;
}
ul#LC_secondary_menu li {
@@ -6211,7 +6228,7 @@ ul.LC_TabContent {
background: $sidebg;
border-bottom: solid 1px $lg_border_color;
list-style:none;
- margin: 0 -10px;
+ margin: -1px -10px 0 -10px;
padding: 0;
}
@@ -6234,7 +6251,7 @@ ul.LC_TabContent li {
padding: 0 16px 0 10px;
background-color:$tabbg;
border-bottom:solid 1px $lg_border_color;
- border-right: solid 1px $font;
+ border-left: solid 1px $font;
}
ul.LC_TabContent .right {
@@ -6304,7 +6321,7 @@ ul.LC_TabContentBigger li a {
text-align: center;
display: block;
text-decoration: none;
- outline: none;
+ outline: none;
}
ul.LC_TabContentBigger li.active a {
@@ -6328,16 +6345,15 @@ ul.LC_TabContentBigger li.active b {
background:url('/adm/lonIcons/tabbgright.gif') right top no-repeat;
color:$font;
border: 0;
- cursor:default;
}
+
ul.LC_CourseBreadcrumbs {
background: $sidebg;
- line-height: 32px;
+ height: 2em;
padding-left: 10px;
- margin: 0 0 10px 0;
+ margin: 0;
list-style-position: inside;
-
}
ol#LC_MenuBreadcrumbs,
@@ -6379,6 +6395,11 @@ ol#LC_PathBreadcrumbs li a {
padding: 0 10px 10px 10px;
}
+.LC_DocsBox {
+ border: solid 1px $lg_border_color;
+ padding: 0 0 10px 10px;
+}
+
.LC_AboutMe_Image {
float:left;
margin-right:10px;
@@ -6499,14 +6520,6 @@ a#LC_content_toolbar_firsthomework {
background-image:url(/res/adm/pages/open-first-problem.gif);
}
-a#LC_content_toolbar_launchnav {
- background-image:url(/res/adm/pages/start-navigation.gif);
-}
-
-a#LC_content_toolbar_closenav {
- background-image:url(/res/adm/pages/close-navigation.gif);
-}
-
a#LC_content_toolbar_everything {
background-image:url(/res/adm/pages/show-all.gif);
}
@@ -6591,10 +6604,8 @@ ul.LC_funclist li {
line-height: 150%;
}
-.ui-accordion .LC_advanced_toggle {
- float: right;
- font-size: 90%;
- padding: 0px 4px
+.LC_hidden {
+ display: none;
}
END
@@ -6648,8 +6659,8 @@ sub headtag {
if (!$args->{'frameset'}) {
$result .= &Apache::lonhtmlcommon::htmlareaheaders();
}
- if ($args->{'force_register'}) {
- $result .= &Apache::lonmenu::registerurl(1);
+ if ($args->{'force_register'} && $env{'request.noversionuri'} !~ m{^/res/adm/pages/}) {
+ $result .= Apache::lonxml::display_title();
}
if (!$args->{'no_nav_bar'}
&& !$args->{'only_body'}
@@ -6675,7 +6686,7 @@ ADDMETA
$result .= ' LON-CAPA '.$title.''
.''
.$head_extra;
- return $result;
+ return $result.'';
}
=pod
@@ -6728,43 +6739,6 @@ sub xml_begin {
=pod
-=item * &endheadtag()
-
-Returns a uniform for LON-CAPA web pages.
-
-Inputs: none
-
-=cut
-
-sub endheadtag {
- return '';
-}
-
-=pod
-
-=item * &head()
-
-Returns a uniform complete .. section for LON-CAPA web pages.
-
-Inputs:
-
-=over 4
-
-$title - optional title for the page
-
-$head_extra - optional extra HTML to put inside the
-
-=back
-
-=cut
-
-sub head {
- my ($title,$head_extra,$args) = @_;
- return &headtag($title,$head_extra,$args).&endheadtag();
-}
-
-=pod
-
=item * &start_page()
Returns a complete .. section for LON-CAPA web pages.
@@ -6802,14 +6776,12 @@ $args - additional optional args support
skip_phases -> hash ref of
head -> skip the generation
body -> skip all generation
- no_inline_link -> if true and in remote mode, don't show the
- 'Switch To Inline Menu' link
no_auto_mt_title -> prevent &mt()ing the title arg
inherit_jsmath -> when creating popup window in a page,
should it have jsmath forced on by the
current page
bread_crumbs -> Array containing breadcrumbs
- bread_crumbs_components -> if exists show it as headline else show only the breadcrumbs
+ bread_crumbs_component -> if exists show it as headline else show only the breadcrumbs
=back
@@ -6820,6 +6792,14 @@ $args - additional optional args support
sub start_page {
my ($title,$head_extra,$args) = @_;
#&Apache::lonnet::logthis("start_page ".join(':',caller(0)));
+#SD
+#I don't see why we copy certain elements of %$args to %head_args
+#head args is passed to headtag() and this routine only reads those
+#keys that are needed. There doesn't happen any writes or any processing
+#of other keys.
+#proposal: just pass $args to headtag instead of \%head_args and delete
+#marked lines
+#<- MARK
my %head_args;
foreach my $arg ('redirect','force_register','domain','function',
'bgcolor','frameset','no_nav_bar','only_body',
@@ -6828,13 +6808,16 @@ sub start_page {
$head_args{$arg} = $args->{$arg};
}
}
+#MARK ->
$env{'internal.start_page'}++;
my $result;
+
if (! exists($args->{'skip_phases'}{'head'}) ) {
- $result.=
- &xml_begin().
- &headtag($title,$head_extra,\%head_args).&endheadtag();
+ $result .=
+ &xml_begin() . &headtag($title,$head_extra,\%head_args);
+#replace prev line by
+# &xml_begin() . &headtag($title, $head_extra, $args);
}
if (! exists($args->{'skip_phases'}{'body'}) ) {
@@ -6848,8 +6831,7 @@ sub start_page {
$args->{'function'}, $args->{'add_entries'},
$args->{'only_body'}, $args->{'domain'},
$args->{'force_register'}, $args->{'no_nav_bar'},
- $args->{'bgcolor'}, $args->{'no_inline_link'},
- $args);
+ $args->{'bgcolor'}, $args);
}
}
@@ -6865,14 +6847,10 @@ sub start_page {
# $result .= &build_functionlist();
#}
- # Don't add anything more if only_body wanted
- return $result if $args->{'only_body'};
+ # Don't add anything more if only_body wanted or in const space
+ return $result if $args->{'only_body'}
+ || $env{'request.state'} eq 'construct';
- #Breadcrumbs for Construction Space provided by &bodytag.
- if (($env{'environment.remote'} eq 'off') && ($env{'request.state'} eq 'construct')) {
- return $result;
- }
-
#Breadcrumbs
if (exists($args->{'bread_crumbs'}) or exists($args->{'bread_crumbs_component'})) {
&Apache::lonhtmlcommon::clear_breadcrumbs();
@@ -6893,28 +6871,6 @@ sub start_page {
return $result;
}
-
-=pod
-
-=item * &head()
-
-Returns a complete 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