version 1.19, 2004/07/28 22:30:31
|
version 1.22, 2004/08/24 04:55:49
|
Line 218 sub handler {
|
Line 218 sub handler {
|
# as well as information about the home server directory structure, specifically |
# as well as information about the home server directory structure, specifically |
# the path to the users userfiles directory. |
# the path to the users userfiles directory. |
# |
# |
$r->print('/userfiles/portfolio'.$currentPath.'<br>'); |
|
my $portfolio_root = &Apache::loncommon::propath($ENV{'user.domain'}, |
my $portfolio_root = &Apache::loncommon::propath($ENV{'user.domain'}, |
$ENV{'user.name'}). |
$ENV{'user.name'}). |
'/userfiles/portfolio'; |
'/userfiles/portfolio'; |
Line 251 sub handler {
|
Line 250 sub handler {
|
# Display begins here |
# Display begins here |
# |
# |
############################## |
############################## |
|
$r->print('<table border="0" cellspacing="2" cellpadding="2"><tr valign="middle">'); |
|
$r->print('<td bgcolor="#ccddaa" align="center">'); |
|
my $displayOut = '<form method="post" enctype="multipart/form-data">'; |
|
$displayOut = $displayOut.'<input name="uploaddoc" type="file" />'. |
|
'<input type="hidden" name="currentpath" value="'.$currentPath.'" />'. |
|
'<input type="submit" name="storeupl" value="Upload" />'. |
|
'</form>'; |
|
$r->print($displayOut); |
|
$r->print('</td></tr><tr><td bgcolor="#ccddaa" align="center">'); |
|
my $displayOut = '<form method="post">'; |
|
$displayOut = $displayOut.'<input name="newdir" type="input" />'. |
|
'<input type="hidden" name="currentpath" value="'.$currentPath.'" />'. |
|
'<input type="submit" name="createdir" value="'.&mt("Create Directory").'" />'. |
|
'</form>'; |
|
$r->print($displayOut); |
|
$r->print('</td></tr></table>'); |
my @tree = split (/\//,$currentPath); |
my @tree = split (/\//,$currentPath); |
$r->print('<font size="+2">'.makeAnchor('portfolio','/').'/'); |
$r->print('<font size="+2">'.makeAnchor('/','/')); |
if (@tree > 1){ |
if (@tree > 1){ |
my $newCurrentPath = ''; |
my $newCurrentPath = ''; |
for (my $i = 1; $i< @tree; $i++){ |
for (my $i = 1; $i< @tree; $i++){ |
Line 261 sub handler {
|
Line 276 sub handler {
|
} |
} |
} |
} |
$r->print('</font>'); |
$r->print('</font>'); |
|
&Apache::lonhtmlcommon::store_recent('portfolio',$currentPath,$currentPath); |
|
$r->print('<br /><form method=post action="/adm/portfolio">'. |
|
&Apache::lonhtmlcommon::select_recent('portfolio','currentpath', |
|
'this.form.submit();')); |
|
$r->print("</form>"); |
$r->print('<table border="0" cellspacing="2" cellpadding="2">'. |
$r->print('<table border="0" cellspacing="2" cellpadding="2">'. |
'<tr><th> </th><th>Actions</th><th>Name</th><th>Title</th><th>Status</th><th>Last Modified</th></tr>'); |
'<tr><th>Actions</th><th> </th><th>Name</th><th>Size</th><th>Last Modified</th></tr>'); |
|
my $href_location="/uploaded/$ENV{'user.domain'}/$ENV{'user.name'}/portfolio/$currentPath/"; |
foreach my $line (@dirList) { |
foreach my $line (@dirList) { |
#$strip holds directory/file name |
#$strip holds directory/file name |
#$dom |
#$dom |
my ($fileName,$dom,undef,$testdir,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); |
my ($fileName,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); |
if (($fileName ne '.') && ($fileName ne '..')){ |
if (($fileName ne '.') && ($fileName ne '..')){ |
if ($dirptr&$testdir){ |
if ($dirptr&$testdir){ |
$r->print('<tr bgcolor="#FFAA99"><td><img src="'.$iconpath.'folder_closed.gif"></td>'); |
$r->print('<tr bgcolor="#FFAA99"><td><img src="'.$iconpath.'folder_closed.gif"></td>'); |
Line 274 sub handler {
|
Line 295 sub handler {
|
$r->print('<td>'.makeAnchor($fileName.'/',$currentPath.$fileName.'/').'</td>'); |
$r->print('<td>'.makeAnchor($fileName.'/',$currentPath.$fileName.'/').'</td>'); |
$r->print('</tr>'); |
$r->print('</tr>'); |
}else{ |
}else{ |
$r->print('<tr bgcolor="#CCCCFF"><td><img src="'.$iconpath.'unknown.gif"></td>'); |
$r->print('<tr bgcolor="#CCCCFF">'); |
$r->print('<td>Edit</td>'); |
$r->print('<td> |
$r->print('<td>'.$fileName.'</td>'); |
<select name="action"> |
$r->print('<td>Title Here</td>'); |
<option value=""></option> |
$r->print('<td>Status Here</td>'); |
<option value="delete">'.&mt("Delete").'</option> |
$r->print('<td>Modified Here</td>'); |
<option value="rename">'.&mt("Rename").'</option> |
|
</select> |
|
<input type="submit" name="doit" value="Go" /> |
|
</td>'); |
|
$r->print('<td><img src="'.$iconpath.'unknown.gif"></td>'); |
|
$r->print('<td><a href="'.$href_location.$fileName.'">'. |
|
$fileName.'</a></td>'); |
|
$r->print('<td>'.$size.'</td>'); |
|
$r->print('<td>'.&Apache::lonlocal::locallocaltime($mtime).'</td>'); |
$r->print('</tr>'); |
$r->print('</tr>'); |
} |
} |
} |
} |
Line 289 sub handler {
|
Line 318 sub handler {
|
# $r->print(displayDirectory($currentPath, $currentFile, @dirList)); |
# $r->print(displayDirectory($currentPath, $currentFile, @dirList)); |
# $r->print('</td>><td>'); |
# $r->print('</td>><td>'); |
# $r->print(displayActions($currentPath, $currentFile, $isEmpty)); |
# $r->print(displayActions($currentPath, $currentFile, $isEmpty)); |
$r->print('</table>'); |
$r->print('</table></form>'); |
$r->print('</blockquote>'); |
$r->print('</blockquote>'); |
$r->print("</body>\n</html>\n"); |
$r->print("</body>\n</html>\n"); |
$r->rflush(); |
$r->rflush(); |