--- loncom/publisher/lonpubdir.pm 2011/12/23 14:54:26 1.139
+++ loncom/publisher/lonpubdir.pm 2012/04/24 10:29:53 1.142
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.139 2011/12/23 14:54:26 www Exp $
+# $Id: lonpubdir.pm,v 1.142 2012/04/24 10:29:53 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -524,7 +524,7 @@ sub putresource {
my $css_class='LC_browser_file';
my $title=' ';
my $publish_button=&mt('Publish');
- my $cstr_dir = $r->dir_config('lonDocRoot').'/priv/'.$udom.'/'.$uname.'/'.$thisdisfn.'/';
+ my $cstr_dir = $r->dir_config('lonDocRoot').'/priv'.$thisdisfn;
my $linkfilename=&HTML::Entities::encode('/priv'.$thisdisfn.'/'.$filename,'<>&"');
if (-e $resdir.'/'.$filename) {
@@ -596,11 +596,21 @@ sub putresource {
if (!$meta_same) {
$title = &mt('Metadata Modified').'
'.$title.
- '
'.&mt('Metadata Diffs').'';
- $title.="\n".'
'.&mt('Retrieve Metadata').'';
+ '
'.
+ &Apache::loncommon::modal_link(
+ '/adm/diff?filename='.$linkfilename.'.meta'.'&versiontwo=priv',
+ &mt('Metadata Diffs'),600,500);
+ $title.="\n".'
'.
+ &Apache::loncommon::modal_link(
+ '/adm/retrieve?filename='.$linkfilename.'.meta&inhibitmenu=yes&add_modal=yes',
+ &mt('Retrieve Metadata'),600,500);
}
- $status.="\n".'
'.&mt('Retrieve').'';
+ $status.="\n".'
'.
+ &Apache::loncommon::modal_link(
+ '/adm/retrieve?filename='.$linkfilename.'&inhibitmenu=yes&add_modal=yes',&mt('Retrieve'),600,500);
+ } else {
+ # Allow editing metadata of unpublished resources
+ $title .= ''.&mt('Edit Metadata').'';
}
my $editlink='';
my $editlink2='';