[LON-CAPA-cvs] cvs: loncom /localize/localize de.pm zh.pm /publisher lonretrieve.pm
bisitz
bisitz@source.lon-capa.org
Tue, 11 Aug 2009 15:15:10 -0000
bisitz Tue Aug 11 15:15:10 2009 EDT
Modified files:
/loncom/publisher lonretrieve.pm
/loncom/localize/localize de.pm zh.pm
Log:
Changes related to modification of LON-CAPA screen header:
- Added standard construction space header
- Added breadcrumbs
Other changes:
- "Back to Resource": Don't display filename anymore in link. It's already shown at top of screen.
- Added new link "Back to Directory"
- Wrapped functions at bottom of screen in standard box
- Wording: Retrieve button text - make clearer which version will be retrieved
- Localized time in "Published on" column
Index: loncom/publisher/lonretrieve.pm
diff -u loncom/publisher/lonretrieve.pm:1.40 loncom/publisher/lonretrieve.pm:1.41
--- loncom/publisher/lonretrieve.pm:1.40 Thu May 14 15:11:00 2009
+++ loncom/publisher/lonretrieve.pm Tue Aug 11 15:15:01 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to retrieve an old version of a file
#
-# $Id: lonretrieve.pm,v 1.40 2009/05/14 15:11:00 bisitz Exp $
+# $Id: lonretrieve.pm,v 1.41 2009/08/11 15:15:01 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -152,8 +152,8 @@
my $rmtime=&Apache::lonnet::metadata($resdir.'/'.$filename,'lastrevisiondate');
$r->print(&Apache::loncommon::start_data_table_row().
'<td><input type="radio" name="version" value="'.
- $version.'" /></td><td>'.&mt('Previously published version').' '.$version.'</td><td>'.
- localtime($rmtime).'</td>');
+ $version.'" /></td><td>'.&mt('Previously published version').' '.$version.'</td>'.
+ '<td>'.&Apache::lonlocal::locallocaltime($rmtime).'</td>');
if (!$is_meta) {
$r->print('<td><a href="'.$urldir.$filename.'.meta" target="cat">'.
@@ -175,8 +175,9 @@
my $rmtime=&Apache::lonnet::metadata($resfn,'lastrevisiondate');
$r->print(&Apache::loncommon::start_data_table_row().
'<td><input type="radio" name="version" value="new" /></td>'.
- '<td><b>'.&mt('Currently published version').'</b></td><td>'.localtime($rmtime).
- '</td>');
+ '<td><b>'.&mt('Currently published version').'</b></td>'.
+ '<td>'.&Apache::lonlocal::locallocaltime($rmtime).'</td>'
+ );
if (!$is_meta) {
$r->print('<td><a href="'.$urldir.$main.'.'.$suffix.'.meta" target="cat">'.
&mt('Metadata current version').'</a></td>');
@@ -198,13 +199,25 @@
&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>');
+ $r->print('<input type="submit" value="'.&mt('Retrieve selected Version').'" /></form>');
} else {
$r->print('<p class="LC_warning">'.&mt('No previous versions published.').'</p>');
}
- $r->print('<p><a href="/priv/'.$uname.$fn.'">'
- .&mt('Back to [_1]','<span class="LC_filename">'.$fn.'</span>')
- .'</a></p>');
+
+ my $dir = &Apache::loncommon::authorspace()
+ .&File::Basename::dirname($fn)
+ .'/';
+ $r->print(&Apache::lonhtmlcommon::start_funclist()
+ .&Apache::lonhtmlcommon::add_item_funclist(
+ '<a href="/priv/'.$uname.$fn.'">'
+ .&mt('Back to Resource')
+ .'</a>')
+ .&Apache::lonhtmlcommon::add_item_funclist(
+ '<a href="'.$dir.'">'
+ .&mt('Back to Directory')
+ .'</a>')
+ .&Apache::lonhtmlcommon::end_funclist()
+ );
}
# ---------------------------------- Interface for presenting specified version
@@ -254,7 +267,7 @@
}
$r->print('</p>'
.'<p><a href="/priv/'.$uname.$fn.'">'
- .&mt('Back to [_1]',$fn)
+ .&mt('Back to Resource')
.'</a></p>');
} else {
$r->print('<p class="LC_info">'.&mt('Please pick a version to retrieve:').'</p>');
@@ -321,7 +334,22 @@
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
- $r->print(&Apache::loncommon::start_page('Retrieve Published Resources'));
+ # Breadcrumbs
+ &Apache::lonhtmlcommon::clear_breadcrumbs();
+ &Apache::lonhtmlcommon::add_breadcrumb({
+ 'text' => 'Construction Space',
+ 'href' => &Apache::loncommon::authorspace(),
+ });
+ &Apache::lonhtmlcommon::add_breadcrumb({
+ 'text' => 'Retrieve previous version',
+ 'href' => '',
+ });
+
+ $r->print(&Apache::loncommon::start_page('Retrieve Published Resources')
+ .&Apache::lonhtmlcommon::breadcrumbs()
+ .&Apache::loncommon::head_subbox(
+ &Apache::loncommon::CSTR_pageheader()) # FIXME crumbs broken?
+ );
$r->print('<p>'
.&mt('Retrieve previous versions of [_1]'
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.321 loncom/localize/localize/de.pm:1.322
--- loncom/localize/localize/de.pm:1.321 Wed Aug 5 13:40:24 2009
+++ loncom/localize/localize/de.pm Tue Aug 11 15:15:09 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# German Localization Lexicon
#
-# $Id: de.pm,v 1.321 2009/08/05 13:40:24 bisitz Exp $
+# $Id: de.pm,v 1.322 2009/08/11 15:15:09 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -912,6 +912,9 @@
'Back to Source'
=> 'Zurück zur Quelldatei',
+ 'Back to Resource'
+=> 'Zurück zur Ressource',
+
'File copied.'
=> 'Datei kopiert.',
@@ -1019,12 +1022,15 @@
'Retrieval of an old version will overwrite the file currently in construction space.'
=> 'Das Wiederherstellen einer alten Version überschreibt die derzeit im Konstruktionsbereich vorhandene Datei.',
+ 'Retrieve selected Version'
+=> 'Ausgewählte Version wiederherstellen',
+
+ 'Retrieve previous version'
+=> 'Vorherige Version wiederherstellen',
+
'Retrieve previous versions of [_1]'
=> 'Wiederherstellen vorheriger Versionen von [_1]',
- 'Retrieve Version'
-=> 'Ausgewählte Version wiederherstellen',
-
'Search the contents of this course'
=> 'Kursinhalts-Suche',
Index: loncom/localize/localize/zh.pm
diff -u loncom/localize/localize/zh.pm:1.74 loncom/localize/localize/zh.pm:1.75
--- loncom/localize/localize/zh.pm:1.74 Wed Aug 5 13:40:24 2009
+++ loncom/localize/localize/zh.pm Tue Aug 11 15:15:09 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Chinese Simplified Localization Lexicon
#
-# $Id: zh.pm,v 1.74 2009/08/05 13:40:24 bisitz Exp $
+# $Id: zh.pm,v 1.75 2009/08/11 15:15:09 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -895,6 +895,9 @@
'Back to Source'
=> '回到源文件',
+ 'Back to Resource'
+=> 'Zurück zur Ressource', # '回到资源',
+
'File copied.'
=> '档案复制。',
@@ -1002,12 +1005,15 @@
'Retrieval of an old version will overwrite the file currently in construction space.'
=> 'Das Wiederherstellen einer alten Version überschreibt die derzeit im Konstruktionsbereich vorhandene Datei.',
+ 'Retrieve selected Version'
+=> 'Ausgewählte Version wiederherstellen',
+
+ 'Retrieve previous version'
+=> 'Vorherige Version wiederherstellen',
+
'Retrieve previous versions of [_1]'
=> 'Wiederherstellen vorheriger Versionen von [_1]',
- 'Retrieve Version'
-=> 'Ausgewählte Version wiederherstellen',
-
'Search the contents of this course'
=> '课程内容搜索',