--- loncom/publisher/lonpubdir.pm 2019/08/13 16:59:12 1.173 +++ loncom/publisher/lonpubdir.pm 2023/07/13 21:41:40 1.179 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Authoring Space Directory Lister # -# $Id: lonpubdir.pm,v 1.173 2019/08/13 16:59:12 raeburn Exp $ +# $Id: lonpubdir.pm,v 1.179 2023/07/13 21:41:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -104,8 +104,8 @@ sub handler { "$londocroot/priv/$udom/$uname"); # expressed in kB my $disk_quota = &Apache::loncommon::get_user_quota($uname,$udom, $cstr,$crstype); # expressed in MB - # Put out the start of page. + &startpage($r, $uname, $udom, $thisdisfn, $current_disk_usage, $disk_quota, $crsauthor); if (!-d $fn) { @@ -128,7 +128,7 @@ sub handler { } # Put out actions for directory, browse/upload + new file page. - &dircontrols($r,$uname,$udom,$thisdisfn, $current_disk_usage, $disk_quota); + &dircontrols($r,$uname,$udom,$thisdisfn,$current_disk_usage,$disk_quota,$crsauthor); &resourceactions($r,$uname,$udom,$thisdisfn); # Put out form used for printing/deletion etc. my $numdir = 0; @@ -247,8 +247,13 @@ my $result = " + + + %s +
+ + + - +END + my %fileoptions = ( + none => "$lt{'sela'}:", + newfile => "$lt{'nfil'}:", + newhtmlfile => "$lt{'nhtm'}:", + newproblemfile => "$lt{'nprb'}:", + newdir => "$lt{'nsub'}:", + ); + $fileoptions{'select_form_order'} = ['none','newfile','newhtmlfile','newproblemfile']; + if ($crsauthor) { + push(@{$fileoptions{'select_form_order'}},'newdir'); + } else { + my %extraoptions = ( + newpagefile => "$lt{'npag'}:", + newsequencefile => "$lt{'nseq'}:", + newrightsfile => "$lt{'ncrf'}:", + newstyfile => "$lt{'nsty'}:", + newtaskfile => "$lt{'nbt'}:", + newlibraryfile => "$lt{'nlib'}:", + ); + %fileoptions = (%fileoptions,%extraoptions); + push(@{$fileoptions{'select_form_order'}},('newpagefile','newsequencefile', + 'newrightsfile','newstyfile', + 'newtaskfile','newlibraryfile', + 'newdir')); + } + my $selectbox = &Apache::loncommon::select_form('none','action',\%fileoptions); + $r->print(< -
+
$lt{'updc'} - +
@@ -592,7 +602,7 @@ sub dircontrols {
- +
$lt{'crea'} @@ -607,53 +617,51 @@ sub dircontrols { } } -    + $selectbox  
- Quickactions: + $lt{'shcu'}: - + file icon - + problem icon - + web page icon - + folder icon @@ -661,18 +669,6 @@ sub dircontrols {
-
-
- $lt{'qs'} - - - - %s -
- - -
-
END } @@ -680,26 +676,26 @@ END sub resourceactions { my ($r,$uname,$udom,$thisdisfn) = @_; $r->print(< +
-
+
-
+
-
+
-
+
-
+
END @@ -777,7 +773,7 @@ sub putdirectory { } else { $actionitem = '
'. + '" action="/adm/publish">'. '