--- loncom/publisher/lonpubmenu.pm 2004/12/10 14:57:47 1.1
+++ loncom/publisher/lonpubmenu.pm 2015/06/09 21:23:27 1.7
@@ -1,6 +1,8 @@
# The LearningOnline Network with CAPA
# Construction Space Buttons for Top Frame
#
+# $Id: lonpubmenu.pm,v 1.7 2015/06/09 21:23:27 damieng Exp $
+#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -27,14 +29,18 @@
package Apache::lonpubmenu;
use Apache::lonlocal;
+use Apache::lonnet;
use Apache::loncommon;
sub handler {
my $r = shift;
- my %lt=&Apache::lonlocal::texthash(
+ my %js_lt=&Apache::lonlocal::texthash(
cnpd => 'Cannot publish directory',
cnrd => 'Cannot retrieve directory',
mcdi => 'Must create new subdirectory inside a directory',
+ );
+ &js_escape(\%js_lt);
+ my %html_lt=&Apache::lonlocal::texthash(
pubr => 'Publish this Resource',
pubd => 'Publish this Directory',
rtrv => 'Retrieve Old Version',
@@ -42,7 +48,7 @@ sub handler {
list => 'List Directory',
uplo => 'Upload file',
dele => 'Delete',
- edit => 'Edit Catalog Information',
+ edit => 'Edit Metadata',
sela => 'Select Action',
nfil => 'New file',
nhtm => 'New HTML file',
@@ -51,6 +57,7 @@ sub handler {
nseq => 'New assembled sequence',
ncrf => 'New custom rights file',
nsty => 'New style file',
+ nlib => 'New library file',
nsub => 'New subdirectory',
renm => 'Rename current file to',
move => 'Move current file to',
@@ -59,17 +66,15 @@ sub handler {
go => 'Go',
prnt => 'Print'
);
+ &html_escape(\%html_lt);
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['disp']);
- my $disp = $ENV{'form.disp'};
+ my $disp = $env{'form.disp'};
# set defaults for parent directory in case frameloc is unable to determine directory
- my $defaultdir = '/priv/'.$ENV{'user.name'}.'/';
- if ($ENV{'request.role'} =~ m#^ca\./[^/]+/([^/]+)#) {
+ my $defaultdir = '/priv/'.$env{'user.name'}.'/';
+ if ($env{'request.role'} =~ m#^ca\./[^/]+/([^/]+)#) {
$defaultdir = '/priv/'.$1.'/';
}
- $r->print(<<"ENDONE");
-
-
-LON-CAPA Publishing Frame
+ my $js=
-
-
+$start_page
@@ -242,14 +249,14 @@ END
');
} else {
$r->print('
');
}
@@ -259,7 +266,7 @@ END
|
|
@@ -267,7 +274,7 @@ END
method="post" enctype="multipart/form-data">
-
+
|
@@ -275,7 +282,7 @@ END
-
+
|
@@ -288,13 +295,13 @@ ENDTWO
-
+
|
ENDDIR
@@ -303,14 +310,14 @@ ENDDIR
|
|
ENDFILE
@@ -321,25 +328,26 @@ ENDFILE
+
@@ -348,8 +356,7 @@ ENDPROBOPS
-
-
+$end_page
ENDPAGE
}
|
---|