version 1.8, 2004/06/28 16:07:47
|
version 1.9, 2004/06/28 16:12:06
|
Line 40 sub makeAnchor {
|
Line 40 sub makeAnchor {
|
my $anchor = '<a href="/adm/portfolio?selectfile='.$fileName.'¤tpath='.$currentPath.'">'.$fileName.'</a>'; |
my $anchor = '<a href="/adm/portfolio?selectfile='.$fileName.'¤tpath='.$currentPath.'">'.$fileName.'</a>'; |
# my $button = ' |
# my $button = ' |
# <form method="POST" action="/adm/portfolio"> |
# <form method="POST" action="/adm/portfolio"> |
# <input type="hidden" name="selectfile" value="'.$fileName.'"> |
# <input type="hidden" name="selectfile" value="'.$fileName.'" /> |
# <input type="submit" value="'.$fileName.'" name="storeupl"> |
# <input type="submit" value="'.$fileName.'" name="storeupl" /> |
# </form> |
# </form> |
# '; |
# '; |
return $anchor; |
return $anchor; |
Line 108 sub displayActions {
|
Line 108 sub displayActions {
|
|
|
$displayOut = $displayOut.'<form method="POST"> |
$displayOut = $displayOut.'<form method="POST"> |
<input type="hidden" name="selectfile" |
<input type="hidden" name="selectfile" |
value="'.$currentFile.'"> |
value="'.$currentFile.'" /> |
<input type="hidden" name="fileaction" value="delete"> |
<input type="hidden" name="fileaction" value="delete" /> |
<center> |
<center> |
<input type="submit" |
<input type="submit" |
|
|
value="Delete '.$currentFile.'"> |
value="Delete '.$currentFile.'" /> |
</center> |
</center> |
</form> |
</form> |
<hr /> |
<hr /> |
<form method="POST"> |
<form method="POST"> |
<input type="hidden" name="selectfile" |
<input type="hidden" name="selectfile" |
value="'.$currentFile.'"> |
value="'.$currentFile.'" /> |
<input type="hidden" name="fileaction" value="rename"> |
<input type="hidden" name="fileaction" value="rename" /> |
<input type="input" name="filenewname" value="Type new name here"> |
<input type="input" name="filenewname" value="Type new name here" /> |
<input type="submit" |
<input type="submit" |
value="Rename '.$currentFile.'"> |
value="Rename '.$currentFile.'" /> |
</form> |
</form> |
<hr>'; |
<hr />'; |
$displayOut = $displayOut.'<hr>Add a file to your portfolio'; |
$displayOut = $displayOut.'<hr />Add a file to your portfolio'; |
# file upload form |
# file upload form |
$displayOut = $displayOut.'<form method="post" enctype="multipart/form-data">'; |
$displayOut = $displayOut.'<form method="post" enctype="multipart/form-data">'; |
$displayOut = $displayOut.'<input name="uploaddoc" type="file">'. |
$displayOut = $displayOut.'<input name="uploaddoc" type="file" />'. |
'<input type="hidden" name="currentpath" value="'.$currentPath.'">'. |
'<input type="hidden" name="currentpath" value="'.$currentPath.'" />'. |
'<input type="submit" name="storeupl" value="Upload">'. |
'<input type="submit" name="storeupl" value="Upload" />'. |
'</form><hr>'; |
'</form><hr>'; |
$displayOut = $displayOut.'<form method="POST"> |
$displayOut = $displayOut.'<form method="POST"> |
<input name="subdir" type="text" > |
<input name="subdir" type="text" /> |
<input type="submit" value="Create Subdirectory"> |
<input type="submit" value="Create Subdirectory" /> |
</form> |
</form> |
'; |
'; |
return $displayOut; |
return $displayOut; |
Line 153 sub handler {
|
Line 153 sub handler {
|
my $isFile; |
my $isFile; |
my $isDir; |
my $isDir; |
# send header |
# send header |
|
# FIXME need to start using |
|
# &Apache::loncommon::content_type() |
$r->content_type('text/html'); |
$r->content_type('text/html'); |
$r->send_http_header; |
$r->send_http_header; |
$r->print('<html><head><title>'. |
$r->print('<html><head><title>'. |
'Portfolio Management'. |
'Portfolio Management'. |
"</title></head>\n"); |
"</title></head>\n"); |
|
|
|
# FIXME need to start using |
|
# &Apache::loncommon::bodytag() |
$r->print(' |
$r->print(' |
<body bgcolor="dogfood"> |
<body bgcolor="dogfood"> |
<blockquote>'); |
<blockquote>'); |
Line 246 sub handler {
|
Line 250 sub handler {
|
############################## |
############################## |
$r->print('<hr /> start '); |
$r->print('<hr /> start '); |
$r->print($udir); |
$r->print($udir); |
$r->print('<table border=1><tr><td>'); |
$r->print('<table border="1"><tr><td>'); |
$r->print(&displayDirectory($currentPath, $currentFile, $isDir, @dirList)); |
$r->print(&displayDirectory($currentPath, $currentFile, $isDir, @dirList)); |
$r->print('</td>><td>'); |
$r->print('</td><td>'); |
$r->print(&displayActions($currentPath, $currentFile, $isDir, $isFile)); |
$r->print(&displayActions($currentPath, $currentFile, $isDir, $isFile)); |
$r->print('</td>></tr></table>'); |
$r->print('</td></tr></table>'); |
$r->print('<br />end display<br /><hr />'); |
$r->print('<br />end display<br /><hr />'); |
$r->print('</blockquote></body>'); |
$r->print('</blockquote></body>'); |
return OK; |
return OK; |