--- loncom/interface/londocs.pm 2009/08/28 19:43:16 1.384
+++ loncom/interface/londocs.pm 2009/10/04 13:58:02 1.389
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.384 2009/08/28 19:43:16 raeburn Exp $
+# $Id: londocs.pm,v 1.389 2009/10/04 13:58:02 tempelho Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2744,11 +2744,19 @@ sub create_form_ul {
.$script."\n"
.'// ]]>'."\n"
.''."\n";
- my $brcrum = [{href=>"/adm/createuser",text=>"$type Documents"}];
+
+ # Breadcrumbs
+ &Apache::lonhtmlcommon::clear_breadcrumbs();
+ &Apache::lonhtmlcommon::add_breadcrumb({
+ href=>"/adm/createuser",text=>"$type Documents"});
+
$r->print(&Apache::loncommon::start_page("$type Documents", $script,
- {'force_register' => $showdoc,
- 'bread_crumbs' => $brcrum}).
- &Apache::loncommon::help_open_menu('','',273,'RAT'));
+ {'force_register' => $showdoc,})
+ .&Apache::loncommon::help_open_menu('','',273,'RAT')
+ .&Apache::lonhtmlcommon::breadcrumbs(
+ 'Editing the Table of Contents for your '.$type,
+ 'Docs_Adding_Course_Doc')
+ );
my %allfiles = ();
my %codebase = ();
@@ -2892,7 +2900,7 @@ FIUP
CHBO
my @fileuploada = (
- { pic01 => "$lt{'upld'} $help{'Uploading_From_Harddrive'}" },
+ { '
' => " $help{'Uploading_From_Harddrive'}" },
);
my $fileuploadform=(<
@@ -2918,9 +2926,9 @@ FUFORM
SEDFFORM
my @simpleeditdefaultforma = (
- { pic03 => "$uploadtag$lt{'srch'}" },
- { pic04 => "$lt{'impo'}$help{'Importing_LON-CAPA_Resource'}" },
- { pic05 => "$lt{'book'}" },
+ { '
' => "$uploadtag$lt{'srch'}" },
+ { '
' => "$lt{'impo'}$help{'Importing_LON-CAPA_Resource'}" },
+ { '
' => "$lt{'book'}" },
);
$simpleeditdefaultform .= create_form_ul(create_list_elements(@simpleeditdefaultforma));
$simpleeditdefaultform .=(<
NFFORM
my @newfolderforma= (
- { pic02 => "$newfolderform" }
+ { '
' => "$newfolderform" }
);
@@ -3203,37 +3211,37 @@ NSYLFORM
NGFFORM
@specialdocumentsforma=(
- {pic06=>$newpageform},
- {pic07=>$newsylform},
- {pic08=>$newgroupfileform},
+ {'
'=>$newpageform},
+ {'
'=>$newsylform},
+ {'
'=>$newgroupfileform},
);
}
- push @specialdocumentsforma, ({pic09=>$newnavform},
- {pic10=>$newsmppageform},
- {pic11=>$newsmpproblemform},
- {pic12=>$newdropboxform},
- {pic13=>$newexuploadform},
- {pic14=>$newbulform},
- {pic15=>$newaboutmeform},
- {pic16=>$newaboutsomeoneform},
- {pic17=>$newrosterform},);
+ push @specialdocumentsforma, ({'
'=>$newnavform},
+ {'
'=>$newsmppageform},
+ {'
'=>$newsmpproblemform},
+ {'
'=>$newdropboxform},
+ {'
'=>$newexuploadform},
+ {'
'=>$newbulform},
+ {'
'=>$newaboutmeform},
+ {'
'=>$newaboutsomeoneform},
+ {'
'=>$newrosterform},);
$specialdocumentsform = create_form_ul(create_list_elements(@specialdocumentsforma));
if($env{'form.pagepath'}) {
@specialdocumentsforma=(
- {pic32=>$newsmpproblemform},
- {pic33=>$newexuploadform}
+ {'
'=>$newsmpproblemform},
+ {'
'=>$newexuploadform}
);
$specialdocumentsform= create_form_ul(create_list_elements(@specialdocumentsforma));
}
my @tools = (
- {pic18=>$extresourcesform},
- {pic19=>$imspform},
- {pic20=>$recoverform},
+ {'
'=>$extresourcesform},
+ {'
'=>$imspform},
+ {'
'=>$recoverform},
);
my %orderhash = (
@@ -3245,7 +3253,6 @@ my %orderhash = (
);
my $tid='1';
my $varcd = 'Main Course Documents';
-$r->print(&generate_edit_table($tid,$varcd,\%orderhash));
$hadchanges=0;
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
if ($error) {
@@ -3256,8 +3263,8 @@ $r->print(&generate_edit_table($tid,$var
}
&changewarning($r,'');
- $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
- &mt('Editing the Table of Contents for your '.$type)));
+$r->print(&generate_edit_table($tid,$varcd,\%orderhash));
+
$r->print('');
}
if ($env{'form.pagepath'}) {
@@ -3288,7 +3295,7 @@ $r->print('');
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
my @supupdocform = (
- {pic27=>"$lt{'upld'}$help{'Uploading_From_Harddrive'}"},
+ {'
'=>"$help{'Uploading_From_Harddrive'}"},
);
my $supupdocform=(<
@@ -3318,7 +3325,7 @@ SUPDOCFORM
SNFFORM
- my @supnewfolderforma = ({pic28=>$supnewfolderform});
+ my @supnewfolderforma = ({'
'=>$supnewfolderform});
$supnewfolderform = create_form_ul(create_list_elements(@supnewfolderforma));
@@ -3355,9 +3362,9 @@ SNAMFORM
my @specialdocs = (
- {pic29=>$supnewextform},
- {pic30=>$supnewsylform},
- {pic31=>$supnewaboutmeform},
+ {'
'=>$supnewextform},
+ {'
'=>$supnewsylform},
+ {'
'=>$supnewaboutmeform},
);
my %suporderhash = (
'ee' => ['Upload Document',$supupdocform.' '.$supnewfolderform],
@@ -3367,14 +3374,14 @@ my %suporderhash = (
my $tid='2';
my $varscd = 'Supplemental Course Documents';
-
-$r->print(&generate_edit_table($tid,$varscd,\%suporderhash));
-}
-
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
if ($error) {
$r->print(''.$error.'
');
}
+$r->print(&generate_edit_table($tid,$varscd,\%suporderhash));
+}
+
+
$r->print('');
$r->print('');
@@ -3415,15 +3422,15 @@ sub generate_admin_options {
my $dumpbut=&dumpbutton();
my $exportbut=&exportbutton();
my @list = (
- {pic21=>"$lt{'vc'}$help{'Verify_Content'}"},
- {pic22=>"$lt{'cv'}$help{'Check_Resource_Versions'}"},
+ {'
'=>"$lt{'vc'}$help{'Verify_Content'}"},
+ {'
'=>"$lt{'cv'}$help{'Check_Resource_Versions'}"},
);
if($dumpbut ne ''){
- push @list, {pic23=>$dumpbut};
+ push @list, {'
'=>$dumpbut};
}
- push @list, ({pic24=>$exportbut},
- {pic25=>"$lt{'ls'}"},
- {pic26=>"$lt{'sl'}"},
+ push @list, ({'
'=>$exportbut},
+ {'
'=>"$lt{'ls'}"},
+ {'
'=>"$lt{'sl'}"},
);
return '';
@@ -3442,14 +3449,7 @@ sub generate_edit_table {
$form = '';
$form .= '
';
foreach my $name (sort(keys(%orderhash))){
- if($name eq 'zz'){
- if($activetab ne ''){
- $active = 'class="right"';
- }else{
- $active = 'class="right active"';
- }
- $form .= '- '.&mt(${$orderhash{$name}}[0]).'
';
- }else{
+ if($name ne 'zz'){
if($activetab eq '' || $activetab ne $name){
$active = '';
}elsif($activetab eq $name){
@@ -3709,7 +3709,7 @@ for (i = 0; i < currentDivs.length; i++)
function openTabs(pageId) {
tabnav = document.getElementById(pageId).getElementsByTagName('UL');
if(tabnav.length > 2 ){
- currentNav = document.getElementById(tabnav[0].id);
+ currentNav = document.getElementById(tabnav[1].id);
currentLis = currentNav.getElementsByTagName('LI');
for(i = 0; i< currentLis.length; i++){
if(currentLis[i].className == 'active') {