'
- .&Apache::loncommon::CSTR_pageheader()));
+ .&Apache::loncommon::CSTR_pageheader('','',$heading,$diraction)));
my $esc_thisdisfn = &Apache::loncommon::escape_single($thisdisfn);
- my $doctitle = 'LON-CAPA '.&mt('Authoring Space');
+ my $doctitle = 'LON-CAPA '.&mt($title);
my $newname = &mt('New Name');
my $pubdirscript=(<
@@ -481,20 +517,52 @@ ENDPUBDIRSCRIPT
$r->print($pubdirscript);
}
+sub diractions {
+ my ($thisdisfn) = @_;
+ my %lt=&Apache::lonlocal::texthash(
+ acti => 'Actions for current directory',
+ sela => 'Select Action',
+ pubd => 'Publish this Directory',
+ prnt => 'Print contents of directory',
+ edit => 'Edit Metadata',
+ dedr => 'Delete Directory',
+ );
+ return <
+$lt{'acti'}
+
+
+
+
+END
+
+}
+
sub dircontrols {
- my ($r,$uname,$udom,$thisdisfn) = @_;
+ my ($r,$uname,$udom,$thisdisfn, $current_disk_usage, $disk_quota) = @_;
my %lt=&Apache::lonlocal::texthash(
cnpd => 'Cannot publish directory',
cnrd => 'Cannot retrieve directory',
mcdi => 'Must create new subdirectory inside a directory',
pubr => 'Publish this Resource',
- pubd => 'Publish this Directory',
- dedr => 'Delete Directory',
rtrv => 'Retrieve Old Version',
list => 'List Directory',
uplo => 'Upload file',
dele => 'Delete',
- edit => 'Edit Metadata',
sela => 'Select Action',
nfil => 'New file',
nhtm => 'New HTML file',
@@ -511,54 +579,54 @@ sub dircontrols {
copy => 'Copy current file to',
type => 'Type Name Here',
go => 'Go',
- prnt => 'Print contents of directory',
- crea => 'Create a new directory or LON-CAPA document',
- qs => 'Quick Search',
+ crea => 'Create a new subdirectory or document',
+ qs => 'Quick name search',
cs => 'Case Sensitive',
re => 'Regular Expression',
- acti => 'Actions for current directory',
updc => 'Upload a new document',
pick => 'Please select an action to perform using the new filename',
+ shcu => 'Shortcuts',
);
+ my %js_lt = &Apache::lonlocal::texthash(
+ nanf => 'Name of New File',
+ nans => 'Name of New Subdirectory',
+ psfn => 'Please specify file name',
+ );
+ &js_escape(\%js_lt);
my $mytype = $lt{'type'}; # avoid conflict with " and ' in javascript
+ # Calculate free space in bytes.
+ # $disk_quota is in MB and $current_disk_usage is in kB
+ my $free_space = 1024 * ((1024 * $disk_quota) - $current_disk_usage);
$r->printf(<
-
-
-
-
+
+
-
-
-
-
+
-
-
-
-
-
END
}
@@ -611,26 +712,26 @@ END
sub resourceactions {
my ($r,$uname,$udom,$thisdisfn) = @_;
$r->print(<
+
-
+
-
+
-
+
-
+
-
+
END
@@ -708,7 +809,7 @@ sub putdirectory {
} else {
$actionitem =
'