'.
&mt("Unable to write to [_1]",
@@ -942,8 +883,11 @@ sub editxmlmode {
my $js =
&Apache::edit::js_change_detection().
&Apache::loncommon::resize_textarea_js().
- &Apache::structuretags::setmode_javascript();
+ &Apache::structuretags::setmode_javascript().
+ &Apache::lonhtmlcommon::dragmath_js("EditMathPopup");
my $only_body = ($env{'environment.remote'} eq 'off')? 0 : 1;
+ my $dragmath_button =
+ &Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1);
my $start_page =
&Apache::loncommon::start_page(&mt("EditXML [_1]",$file),$js,
{'no_auto_mt_title' => 1,
@@ -966,10 +910,12 @@ sub editxmlmode {
+
+ '.$dragmath_button.'
@@ -1086,8 +1032,10 @@ sub get_template_list {
}
my @files = glob($Apache::lonnet::perlvar{'lonIncludes'}.
'/templates/*.'.$glob_extension);
- @files = map {[$_,&mt(&Apache::lonnet::metadata($_, 'title'))]} (@files);
- @files = sort {$a->[1] cmp $b->[1]} (@files);
+ @files = map {[$_,&mt(&Apache::lonnet::metadata($_, 'title')),
+ (&Apache::lonnet::metadata($_, 'category')?&mt(&Apache::lonnet::metadata($_, 'category')):&mt('Miscellaneous')),
+ &mt(&Apache::lonnet::metadata($_, 'help'))]} (@files);
+ @files = sort {$a->[2].$a->[1] cmp $b->[2].$b->[1]} (@files);
my ($midpoint,$seconddiv,$numfiles);
$numfiles = 0;
foreach my $file (@files) {
@@ -1102,16 +1050,28 @@ sub get_template_list {
}
}
my $count = 0;
+ my $currentcategory='';
foreach my $file (@files) {
next if ($file->[1] !~ /\S/);
+ if ($file->[2] ne $currentcategory) {
+ $currentcategory=$file->[2];
+ if ((!$seconddiv) && ($count >= $midpoint)) {
+ $result .= '
'."\n".''."\n";
+ $seconddiv = 1;
+ }
+ $result.='
'.$currentcategory.'
';
+ $count++;
+ }
$result .=
'
'."\n";
- $count ++;
- if ((!$seconddiv) && ($count >= $midpoint)) {
- $result .= ''."\n".''."\n";
- $seconddiv = 1;
+ $file->[1].'';
+ if ($file->[3]) {
+ $result.=&Apache::loncommon::help_open_topic($file->[3]);
}
+ my $filename=$file->[0];
+ $filename=~s/^\/home\/httpd\/html//;
+ $result.='
'.&mt('Example').''."\n";
+ $count ++;
}
if ($numfiles > 0) {
$result .= '
'."\n".''."\n";
@@ -1183,8 +1143,8 @@ sub update_construct_style {
&Apache::lonnet::delenv('construct\\.style');
} elsif ($env{'form.style_file'}
&& $env{'construct.style'} ne $env{'form.style_file'}) {
- &Apache::lonnet::appenv('construct.style' =>
- $env{'form.style_file'});
+ &Apache::lonnet::appenv({'construct.style' =>
+ $env{'form.style_file'}});
}
}
}