version 1.332, 2009/01/30 11:39:38
|
version 1.334, 2009/02/03 14:16:39
|
Line 2878 ERFORM
|
Line 2878 ERFORM
|
&mt('Editing the Table of Contents for your '.$type))); |
&mt('Editing the Table of Contents for your '.$type))); |
} |
} |
# --------------------------------------------------------- Standard documents |
# --------------------------------------------------------- Standard documents |
$r->print('<table class="LC_docs_documents">'); |
|
|
|
if (($standard) && ($allowed) && (!$forcesupplement)) { |
if (($standard) && ($allowed) && (!$forcesupplement)) { |
$r->print('<tr><td class="LC_docs_document">'); |
|
# '<h2>'.&mt('Main Course Documents'). |
|
# ($allowed?' '.$help{'Main_Course_Documents'}:'').'</h2>'); |
|
my $folder=$env{'form.folder'}; |
my $folder=$env{'form.folder'}; |
if ($folder eq '' || $folder eq 'supplemental') { |
if ($folder eq '' || $folder eq 'supplemental') { |
$folder='default'; |
$folder='default'; |
Line 3037 NASOFORM
|
Line 3032 NASOFORM
|
</form> |
</form> |
NROSTFORM |
NROSTFORM |
|
|
$r->print(<<ENDFORM); |
|
|
|
|
|
<table class="LC_docs_adddocs"> |
|
<!-- <tr> |
|
<th>$lt{'uplm'}</th> |
|
<th>$lt{'impp'}</th> |
|
<th>$lt{'spec'}</th> |
|
</tr> --> |
|
<tr> |
|
<td> |
|
$fileuploadform |
|
</td> |
|
<td> |
|
$simpleeditdefaultform |
|
<hr /> |
|
$recoverform |
|
ENDFORM |
|
unless ($env{'form.pagepath'}) { |
|
$r->print(<<ENDFORM); |
|
<hr /> |
|
$extresourcesform |
|
<br /> |
|
$imspform |
|
ENDFORM |
|
} |
|
$r->print('</td><td>'); |
|
unless ($env{'form.pagepath'}) { |
unless ($env{'form.pagepath'}) { |
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
|
|
|
|
|
|
my $newpageform=(<<NPFORM); |
my $newpageform=(<<NPFORM); |
<form action="/adm/coursedocs" method="post" name="newpage"> |
<form action="/adm/coursedocs" method="post" name="newpage"> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="folderpath" value="$path" /> |
Line 3118 NSYLFORM
|
Line 3084 NSYLFORM
|
NGFFORM |
NGFFORM |
|
|
|
|
my $specialdocumentsform=(<<ENDFORM); |
my $specialdocumentsform=(<<SPDOFORM); |
<br /> |
<br />$newfolderform |
$newfolderform |
<br />$newpageform |
<br /> |
<br />$newsylform |
$newpageform |
<br />$newnavform |
<br /> |
<br />$newsmppageform |
$newsylform |
<br />$newsmpproblemform |
<br /> |
<br />$newdropboxform |
$newnavform |
<br />$newexuploadform |
<br /> |
<br />$newbulform |
$newsmppageform |
<br />$newaboutmeform |
<br /> |
<br />$newaboutsomeoneform |
$newsmpproblemform |
<br />$newgroupfileform |
<br /> |
<br />$newrosterform |
$newdropboxform |
SPDOFORM |
<br /> |
|
$newexuploadform |
|
<br /> |
|
$newbulform |
|
<br /> |
|
$newaboutmeform |
|
<br /> |
|
$newaboutsomeoneform |
|
<br /> |
|
$newgroupfileform |
|
<br /> |
|
$newrosterform |
|
ENDFORM |
|
|
|
$r->print($specialdocumentsform); |
|
|
|
my %orderhash = ( |
my %orderhash = ( |
'aa' => 'New Document', |
'aa' => 'New Document', |
'bb' => 'Published Documents', |
'bb' => 'Published Documents', |
'cc' => 'Special Documents', |
'cc' => 'Special Documents', |
'dd' => 'More Options', |
'dd' => 'More Options', |
'zz' => 'Hide all Option', |
'zz' => 'Hide all Options', |
); |
); |
my %namehash = ( |
my %namehash = ( |
'New Document' => $fileuploadform, |
'New Document' => $fileuploadform, |
'Published Documents' => $simpleeditdefaultform, |
'Published Documents' => $simpleeditdefaultform, |
'Special Documents' => $specialdocumentsform, |
'Special Documents' => $specialdocumentsform, |
'More Options' => $extresourcesform.'<br />'.$imspform.'<br />'.$recoverform, |
'More Options' => $extresourcesform.'<br />'.$imspform.'<br />'.$recoverform, |
'drei' => 'dr', |
|
); |
); |
my $varcd = 'Course Documents'; |
my $tid='1'; |
$r->print(&generate_edit_table($varcd,\%namehash,\%orderhash)); |
my $content='content'; |
|
my $navigation='navigation'; |
|
my $varcd = 'Main Course Documents'; |
|
$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash)); |
} |
} |
if ($env{'form.pagepath'}) { |
if ($env{'form.pagepath'}) { |
$r->print(<<ENDBLOCK); |
|
$newsmpproblemform |
|
<br /> |
|
$newexuploadform |
|
ENDBLOCK |
|
} |
} |
$r->print('</td></tr>'."\n". |
|
'</table>'); |
|
#$r->print(&generate_edit_table(\%namehash,\%orderhash)); |
|
$r->print('</td></tr>'); |
|
} |
} |
# ----------------------------------------------------- Supplemental documents |
# ----------------------------------------------------- Supplemental documents |
if (!$forcestandard) { |
if (!$forcestandard) { |
$r->print('<tr><td class="LC_docs_document">'); |
|
# '<h2>'.&mt('Supplemental Course Documents'). |
|
# ($allowed?' '.$help{'Supplemental'}:'').'</h2>'); |
|
my $folder=$env{'form.folder'}; |
my $folder=$env{'form.folder'}; |
unless ($folder=~/^supplemental/) { |
unless ($folder=~/^supplemental/) { |
$folder='supplemental'; |
$folder='supplemental'; |
Line 3275 SNSFORM
|
Line 3216 SNSFORM
|
</form> |
</form> |
SNAMFORM |
SNAMFORM |
|
|
$r->print(<<ENDSUPFORM); |
|
<ul class="LC_TabContent"> |
|
<li>$lt{'nd'}</li> |
my %suporderhash = ( |
<li>$lt{'sd'}</li> |
'ee' => 'New Document', |
<li>$lt{'hao'}</li> |
'ff' => 'Special Documents', |
</ul> |
'zz' => 'Hide all Options', |
<table class="LC_docs_adddocs"> |
); |
<tr><td> |
|
$supupdocform |
my %supnamehash = ( |
</td> |
'New Document' => $supupdocform, |
<td> |
'Special Documents' => $supnewfolderform.'<br />'.$supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform, |
$supnewfolderform |
); |
<br /> |
|
$supnewextform |
my $tid='2'; |
<br /> |
my $content='content'; |
$supnewsylform |
my $navigation='navigation'; |
<br /> |
my $varscd = 'Supplemental Course Documents'; |
$supnewaboutmeform |
|
</td></tr> |
$r->print(&generate_edit_table($tid,$content,$navigation,$varscd,\%supnamehash,\%suporderhash)); |
</table></td></tr> |
|
ENDSUPFORM |
} |
} |
} |
} |
|
$r->print('</table>'); |
|
if ($allowed) { |
if ($allowed) { |
$r->print(' |
$r->print(' |
<form method="post" name="extimport" action="/adm/coursedocs"> |
<form method="post" name="extimport" action="/adm/coursedocs"> |
Line 3308 ENDSUPFORM
|
Line 3247 ENDSUPFORM
|
<input type="hidden" name="residx" /> |
<input type="hidden" name="residx" /> |
</form>'); |
</form>'); |
} |
} |
|
|
} else { |
} else { |
unless ($upload_result eq 'phasetwo') { |
unless ($upload_result eq 'phasetwo') { |
# -------------------------------------------------------- This is showdoc mode |
# -------------------------------------------------------- This is showdoc mode |
Line 3372 ENDOPTIONFORM
|
Line 3310 ENDOPTIONFORM
|
|
|
|
|
sub generate_edit_table { |
sub generate_edit_table { |
my ($varcd,$namehash_ref,$orderhash_ref) = @_; |
my ($tid,$content,$navigation,$varcd,$namehash_ref,$orderhash_ref) = @_; |
my %namehash = %{$namehash_ref}; #name verlinkt mit id |
my %namehash = %{$namehash_ref}; #name verlinkt mit id |
my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name |
my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name |
my $form; |
my $form; |
|
|
#foreach my $id (keys(%tablehash)){ |
|
$form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt('Upload '.$varcd).'</h4>'; |
|
|
|
$form .= '<ul id="navigation" class="LC_TabContent">'; |
|
|
$form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt($varcd).'</h4>'; |
|
$form .= '<ul id="'.$navigation.$tid.'" class="LC_TabContent">'; |
foreach my $name (sort(keys(%orderhash))){ |
foreach my $name (sort(keys(%orderhash))){ |
if($name eq 'zz'){ |
if($name eq 'zz'){ |
$form .= '<li onclick="javascript:hideAll(this);" class="active">'.&mt($orderhash{$name}).'</li>'; |
$form .= '<li onclick="javascript:hideAll(this, \''.$navigation.$tid.'\' ,\''.$content.$tid.'\');" class="active">'.&mt($orderhash{$name}).'</li>'; |
}else{ |
}else{ |
$form .= '<li onclick="javascript:showPage(this, \''.$orderhash{$name}.'\');">'.&mt($orderhash{$name}).'</li>'; |
$form .= '<li onclick="javascript:showPage(this, \''.$tid.$orderhash{$name}.'\', \''.$navigation.$tid.'\',\''.$content.$tid.'\');">'.&mt($orderhash{$name}).'</li>'; |
} |
} |
} |
} |
$form .= '<div id="content" style="padding: 0 0; margin: 0 0;">'; |
$form .= '<div id="'.$content.$tid.'" style="padding: 0 0; margin: 0 0;">'; |
foreach my $field (keys(%namehash)){ |
foreach my $field (keys(%namehash)){ |
$form .= '<div id="'.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>'; |
$form .= '<div id="'.$tid.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>'; |
} |
} |
$form .= '</div></div>'; |
$form .= '</div></div>'; |
#} |
|
return $form; |
return $form; |
} |
} |
|
|
Line 3598 function markcopy(folderpath,index,oldti
|
Line 3536 function markcopy(folderpath,index,oldti
|
this.document.forms.renameform.submit(); |
this.document.forms.renameform.submit(); |
} |
} |
|
|
function unselectInactive() { |
function unselectInactive(nav) { |
currentNav = document.getElementById('navigation'); |
currentNav = document.getElementById(nav); |
currentLis = currentNav.getElementsByTagName('LI'); |
currentLis = currentNav.getElementsByTagName('LI'); |
for (i = 0; i < currentLis.length; i++) { |
for (i = 0; i < currentLis.length; i++) { |
currentLis[i].className = 'i'; |
currentLis[i].className = 'i'; |
} |
} |
} |
} |
|
|
function hideAll(current) { |
function hideAll(current, nav, data) { |
unselectInactive(); |
unselectInactive(nav); |
current.className = 'active'; |
current.className = 'active'; |
currentData = document.getElementById('content'); |
currentData = document.getElementById(data); |
currentDivs = currentData.getElementsByTagName('DIV'); |
currentDivs = currentData.getElementsByTagName('DIV'); |
for (i = 0; i < currentDivs.length; i++) { |
for (i = 0; i < currentDivs.length; i++) { |
currentDivs[i].style.display = 'none'; |
currentDivs[i].style.display = 'none'; |
} |
} |
} |
} |
|
|
function showPage(current, pageId) { |
function showPage(current, pageId, nav, data) { |
hideAll(current); |
hideAll(current, nav, data); |
unselectInactive(); |
unselectInactive(nav); |
current.className = 'active'; |
current.className = 'active'; |
currentData = document.getElementById(pageId); |
currentData = document.getElementById(pageId); |
currentData.style.display = 'block'; |
currentData.style.display = 'block'; |