--- loncom/publisher/lonpubdir.pm 2019/08/13 16:59:12 1.173 +++ loncom/publisher/lonpubdir.pm 2023/06/11 19:46:01 1.177 @@ -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.177 2023/06/11 19:46:01 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -104,9 +104,14 @@ sub handler { "$londocroot/priv/$udom/$uname"); # expressed in kB my $disk_quota = &Apache::loncommon::get_user_quota($uname,$udom, $cstr,$crstype); # expressed in MB + my $diraction; + if (-d $fn) { + $diraction = &diractions($thisdisfn); + } # Put out the start of page. - &startpage($r, $uname, $udom, $thisdisfn, $current_disk_usage, $disk_quota, $crsauthor); + + &startpage($r, $uname, $udom, $thisdisfn, $current_disk_usage, $disk_quota, $crsauthor, $diraction); if (!-d $fn) { if (-e $fn) { @@ -361,7 +366,7 @@ my $result = " + + + %s + + $lt{'cs'} + $lt{'re'} + - +END + $r->print(< - + $lt{'updc'} - + @@ -592,7 +626,7 @@ sub dircontrols { - + $lt{'crea'} @@ -619,41 +653,51 @@ sub dircontrols { $lt{'nbt'}: $lt{'nlib'}: $lt{'nsub'}: - + - Quickactions: + $lt{'shcu'}: - + - + - + - + @@ -661,18 +705,6 @@ sub dircontrols { - - - $lt{'qs'} - - - - %s - - $lt{'cs'} - $lt{'re'} - - END } @@ -680,26 +712,26 @@ END sub resourceactions { my ($r,$uname,$udom,$thisdisfn) = @_; $r->print(< + - + - + - + - + - + END @@ -777,7 +809,7 @@ sub putdirectory { } else { $actionitem = ''. + '" action="/adm/publish">'. ''. ''.&mt('Select action').''. ''.&mt('Open').''. @@ -796,7 +828,7 @@ sub putdirectory { ''. ''.$actionitem.''. - ''. + ''. $disfilename.''. ''.($kaputt?&Apache::lonhtmlcommon::authorbombs($targetdir.'/'.$disfilename.'/'):'').$Apache::lonpublisher::metadatafields{'title'}); if ($Apache::lonpublisher::metadatafields{'subject'} ne '') { @@ -941,10 +973,10 @@ sub putresource { } } if ($filename=~/\.(problem|exam|quiz|assess|survey|form|library|xml|html|htm|xhtml|xhtm|sty)$/) { - $editlink.=' ('.&mt('Clean Up').')'; + $editlink.=' ('.&mt('Clean Up').')'; } if ($filename=~/\.(zip|tar|bz2|gz|tar.gz|tar.bz2|tgz)$/) { - $editlink=' ('.&mt('Decompress').')'; + $editlink=' ('.&mt('Decompress').')'; } my $publish_button = (-e $resdir.'/'.$filename) ? &mt('Re-publish') : &mt('Publish'); my $pub_select = ''; @@ -954,7 +986,7 @@ sub putresource { '').''. ''.$pub_select.''. ''. - ''. + ''. $filename.''.$editlink2.$editlink. ''. ''.$title.''.