[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm
bisitz
bisitz at source.lon-capa.org
Wed Jan 30 08:36:29 EST 2013
bisitz Wed Jan 30 13:36:29 2013 EDT
Modified files:
/loncom/interface lonmeta.pm
Log:
Display of Error Messages ("Bombs") and Metadata:
- Correct display of metadata filename / Valid HTML (Typo in rev. 1.248)
- Improved/consistent headlines and paths
- Internationalization: Added missing &mt()-calls
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.248 loncom/interface/lonmeta.pm:1.249
--- loncom/interface/lonmeta.pm:1.248 Fri Nov 9 18:56:50 2012
+++ loncom/interface/lonmeta.pm Wed Jan 30 13:36:29 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.248 2012/11/09 18:56:50 bisitz Exp $
+# $Id: lonmeta.pm,v 1.249 2013/01/30 13:36:29 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -872,7 +872,11 @@
# Set document type
$uri =~ s:/adm/bombs/::;
$uri = &Apache::lonnet::declutter($uri);
- $r->print('<h1>'.&Apache::lonnet::clutter($uri).'</h1>');
+ $r->print(
+ '<p>'.&mt('Folder: [_1]',
+ '<span class="LC_filename">'.&Apache::lonnet::clutter($uri).'</span>')
+ .'</p>'
+ );
my ($domain,$author)=($uri=~/^($match_domain)\/($match_username)\//);
if (!&Apache::lonnet::constructaccess('/priv/'.$domain.'/'.$author.'/')) {
$r->print('<p class="LC_error">'.&mt('Not authorized').'</p>');
@@ -965,7 +969,7 @@
$currentversion :
&mt('information not available')).')';
} else {
- $versiondisplay='Version: '.$currentversion;
+ $versiondisplay=&mt('Version: [_1]',$currentversion);
}
}
# crumbify displayed URL uri target prefix form
@@ -983,7 +987,7 @@
my $table='';
my $title = $content{'title'};
if (! defined($title)) {
- $title = 'Untitled Resource';
+ $title = &mt('Untitled Resource');
}
my @fields;
if ($uploaded) {
@@ -1174,7 +1178,6 @@
&mt('No Assessment Statistical Data is available for this resource').
'</h4>');
}
-
#
# Evaluation Data
$r->print('<h4>'.&mt('Evaluation Data').'</h4>');
@@ -1306,7 +1309,12 @@
my $bombs=&Apache::lonmsg::retrieve_author_res_msg($target);
if ($bombs) {
# Display Bombs, not Metadata
- $r->print("<h1>$disuri</h1>");
+ $r->print(
+ '<h2>'.&mt('Error Messages').'</h2>'
+ .'<p>'.&mt('Folder: [_1]',
+ '<span class="LC_filename">'.$disuri.'</span>')
+ .'</p>'
+ );
my $showbuttons=1;
my $message='';
my $rc='';
@@ -1367,7 +1375,7 @@
# Display Metadata, not Bombs
my $displayfile =
&mt('Metadata for [_1]'
- ,'<span class="LC_filename"'.$disuri.'</span>');
+ ,'<span class="LC_filename">'.$disuri.'</span>');
if ($disuri=~/\/default$/) {
my $dir=$disuri;
$dir=~s/default$//;
@@ -1403,7 +1411,7 @@
}
}
$r->print(<<ENDEDIT);
-<p>$displayfile</p>
+<h2>$displayfile</h2>
<form method="post" action="" name="defaultmeta">
ENDEDIT
my %lt=&fieldnames($file_type);
More information about the LON-CAPA-cvs
mailing list