version 1.35, 2003/07/05 10:07:12
|
version 1.38, 2003/09/21 03:30:02
|
Line 165 sub getEffectiveUrl {
|
Line 165 sub getEffectiveUrl {
|
$fn=~s|^/~(\w+)|/home/$1/public_html|; |
$fn=~s|^/~(\w+)|/home/$1/public_html|; |
} |
} |
} |
} |
|
$fn=~s/\/+/\//g; |
return $fn; |
return $fn; |
} |
} |
# |
# |
Line 189 sub startpage {
|
Line 190 sub startpage {
|
$r->print(&Apache::loncommon::bodytag(undef,undef,undef,1)); |
$r->print(&Apache::loncommon::bodytag(undef,undef,undef,1)); |
my $pubdirscript=(<<ENDPUBDIRSCRIPT); |
my $pubdirscript=(<<ENDPUBDIRSCRIPT); |
<script> |
<script> |
|
// Store directory location for menu bar to find |
|
|
|
parent.lastknownpriv='/~$uname/$thisdisfn/'; |
|
|
|
// Confirmation dialogues |
|
|
function pubdir(theform) { |
function pubdir(theform) { |
if (confirm('Publish complete directory?')) { |
if (confirm('Publish complete directory?')) { |
theform.submit(); |
theform.submit(); |
Line 311 sub putresource {
|
Line 318 sub putresource {
|
$thisdisfn.'/'.$filename.'" target=cat>Retrieve</a>'; |
$thisdisfn.'/'.$filename.'" target=cat>Retrieve</a>'; |
} |
} |
my $editlink=''; |
my $editlink=''; |
if ($filename=~/\.(xml|html|htm|xhtml|xhtm)$/) { |
my $editlink2=''; |
|
if ($filename=~/\.(xml|html|htm|xhtml|xhtm|sty)$/) { |
$editlink=' (<a href="'.$linkdir.'/'.$filename.'?forceedit=1" target="_top">Edit</a>)'; |
$editlink=' (<a href="'.$linkdir.'/'.$filename.'?forceedit=1" target="_top">Edit</a>)'; |
} |
} |
if ($filename=~/\.(problem|exam|quiz|assess|survey|form|library)$/) { |
if ($filename=~/\.(problem|exam|quiz|assess|survey|form|library)$/) { |
$editlink=' (<a href="'.$linkdir.'/'.$filename.'?forceedit=1" target="_top">EditXML</a>)'; |
$editlink=' (<a href="'.$linkdir.'/'.$filename.'?forceedit=1" target="_top">EditXML</a>)'; |
|
$editlink2=' (<a href="'.$linkdir.'/'.$filename.'?forceColoredit=1" target="_top">Edit</a>)'; |
} |
} |
$r->print('<tr bgcolor="'.$bgcolor.'">'. |
$r->print('<tr bgcolor="'.$bgcolor.'">'. |
'<td><a target="_parent" href="/adm/publish?filename=/~'. |
'<td><a target="_parent" href="/adm/publish?filename=/~'. |
Line 323 sub putresource {
|
Line 332 sub putresource {
|
'</td>'. |
'</td>'. |
'<td>'. |
'<td>'. |
'<a href="'.$linkdir.'/'.$filename.'" target="_top">'. |
'<a href="'.$linkdir.'/'.$filename.'" target="_top">'. |
$filename.'</a>'.$editlink. |
$filename.'</a>'.$editlink2.$editlink. |
'</td>'. |
'</td>'. |
'<td>'.$title.'</td>'. |
'<td>'.$title.'</td>'. |
'<td>'.$status.'</td>'. |
'<td>'.$status.'</td>'. |