[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /publisher lonretrieve.pm
raeburn
raeburn@source.lon-capa.org
Fri, 12 Dec 2008 03:57:12 -0000
raeburn Fri Dec 12 03:57:12 2008 EDT
Modified files: (Branch: version_2_8_X)
/loncom/publisher lonretrieve.pm
Log:
- Backport 1.36.
Index: loncom/publisher/lonretrieve.pm
diff -u loncom/publisher/lonretrieve.pm:1.34 loncom/publisher/lonretrieve.pm:1.34.2.1
--- loncom/publisher/lonretrieve.pm:1.34 Wed Dec 6 22:22:39 2006
+++ loncom/publisher/lonretrieve.pm Fri Dec 12 03:57:12 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to retrieve an old version of a file
#
-# $Id: lonretrieve.pm,v 1.34 2006/12/06 22:22:39 albertel Exp $
+# $Id: lonretrieve.pm,v 1.34.2.1 2008/12/12 03:57:12 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -127,18 +127,18 @@
$r->print(&Apache::loncommon::end_data_table_row().
&Apache::loncommon::end_data_table().
'<p>'.'<span class="LC_warning">'.
- &mt('Retrieval of an old version will overwrite the file currently in construction space').'</span></p>');
+ &mt('Retrieval of an old version will overwrite the file currently in construction space.').'</span></p>');
if (!$is_meta) {
$r->print('<p>'.'<span class="LC_warning">'.
- &mt('This will only retrieve the resource, if you want to retrieve the metadata you will need to do that separately.').
+ &mt('This will only retrieve the resource. If you want to retrieve the metadata you will need to do that separately.').
'</span></p>');
}
$r->print('<input type="submit" value="'.&mt('Retrieve version').'" /></form>');
} else {
- $r->print('<h3>'.&mt('No previous versions published.').'</h3>');
+ $r->print('<p class="LC_warning">'.&mt('No previous versions published.').'</p>');
}
- $r->print('<p><a href="/priv/'.$uname.$fn.'">'.&mt('Back to').' '.$fn.
- '</a></p>');
+ $r->print('<p><a href="/priv/'.$uname.$fn.'">'.&mt('Back to [_1]','<span class="LC_filename">'.$fn.'</span>')
+ .'</a></p>');
}
# ---------------------------------- Interface for presenting specified version
@@ -166,25 +166,32 @@
if ($is_meta) { $logname =~ s/\.meta$//; }
$logname = $ctarget.'.log';
unless ($logfile=Apache::File->new('>>'.$logname)) {
- $r->print(
- '<font color=red>'.&mt('No write permission to user directory, FAIL').'</font>');
+ $r->print('<span class="LC_error">'
+ .&mt('No write permission to user directory, FAIL')
+ .'</span>');
}
print $logfile
"\n\n================= Retrieve ".localtime()." ================\n".
"Version: $version\nSource: $csource\nTarget: $ctarget\n";
$r->print('<p>'.&mt('Copying file').': ');
if (copy($csource,$ctarget)) {
- $r->print('ok<p>');
+ $r->print('<span class="LC_success">'
+ .&mt('ok')
+ .'</span>');
print $logfile "Copied sucessfully.\n\n";
} else {
my $error=$!;
- $r->print('fail, '.$error.'<p>');
+ $r->print('<span class="LC_error">'
+ .&mt('Copy failed: [_1]',$error)
+ .'</span>');
print $logfile "Copy failed: $error\n\n";
}
- $r->print('<font size=+2><a href="/priv/'.$uname.$fn.
- '">'.&mt('Back to').' '.$fn.'</a></font>');
+ $r->print('</p>'
+ .'<p><a href="/priv/'.$uname.$fn.'">'
+ .&mt('Back to [_1]',$fn)
+ .'</a></p>');
} else {
- $r->print('<span class="LC_warning">'.&mt('Please pick a version to retrieve').'</span><p>');
+ $r->print('<p class="LC_info">'.&mt('Please pick a version to retrieve:').'</p>');
&phaseone($r,$fn,$uname,$udom);
}
}
@@ -251,7 +258,10 @@
$r->print(&Apache::loncommon::start_page('Retrieve Published Resources'));
- $r->print('<h1>'.&mt('Retrieve previous versions of').' <tt>'.$fn.'</tt></h1>');
+ $r->print('<h1>'
+ .&mt('Retrieve previous versions of [_1]'
+ ,'<span class="LC_filename">'.$fn.'</span>')
+ .'</h1>');
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
$r->print('<h3><span class="LC_diff_coauthor">'.&mt('Co-Author').': '.$uname.