version 1.64, 2009/03/13 11:45:27
|
version 1.66, 2010/05/03 13:53:47
|
Line 307 END
|
Line 307 END
|
|
|
my $ctr = 0; |
my $ctr = 0; |
my $clen = scalar(@resources); |
my $clen = scalar(@resources); |
|
my $title = ''; |
|
if ($env{'form.recover'}) { |
|
$title = 'Recover Removed Resources'; |
|
} else { |
|
$title = 'Sort Imported Resources'; |
|
} |
|
if ($env{'form.bookmarks'}) { |
|
$title = 'Import Resources from Bookmarks'; |
|
} |
if (($clen > 1) || ($env{'form.readfile'}) || ($env{'form.bookmarks'})) { |
if (($clen > 1) || ($env{'form.readfile'}) || ($env{'form.bookmarks'})) { |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'fin'=> 'Finalize order of resources', |
'fin'=> 'Finalize order of resources', |
Line 321 END
|
Line 330 END
|
'pa' => 'Path', |
'pa' => 'Path', |
'in' => 'Include' |
'in' => 'Include' |
); |
); |
my $title = ''; |
|
if ($env{'form.recover'}) { |
|
$title = 'Recover Removed Resources'; |
|
} else { |
|
$title = 'Sort Imported Resources'; |
|
} |
|
if ($env{'form.bookmarks'}) { |
|
$title = 'Import Resources from Bookmarks'; |
|
} |
|
|
|
$r->print(&Apache::loncommon::start_page($title, $js)); |
$r->print(&Apache::loncommon::start_page($title, $js)); |
|
$r->print('<h1>'.&mt($title).'</h1>'); |
|
|
$r->print(<<END); |
$r->print(<<END); |
<form method='post' action='/adm/groupsort' name='groupsort' |
<form method='post' action='/adm/groupsort' name='groupsort' |
Line 347 END
|
Line 348 END
|
|
|
$r->print(&Apache::loncommon::inhibit_menu_check('input')); |
$r->print(&Apache::loncommon::inhibit_menu_check('input')); |
# --- |
# --- |
|
|
if ($env{'form.recover'}) { |
my $buttontext = $lt{'re'}; |
|
if ($env{'form.bookmarks'}) { |
|
$buttontext = $lt{'ip'} |
|
} |
|
if ($env{'form.recover'} || $env{'form.bookmarks'}) { |
$r->print(<<END); |
$r->print(<<END); |
<input type="button" name="alter" value="$lt{'re'}" |
<input type="button" name="alter" value="$buttontext" |
onClick="finish_import()" /> |
onClick="finish_import()" /> |
<input type="button" name="alter" value="$lt{'ca'}" onClick="self.close()" /> |
<input type="button" name="alter" value="$lt{'ca'}" onClick="self.close()" /> |
END |
END |
Line 372 END
|
Line 377 END
|
<br /> |
<br /> |
END |
END |
} |
} |
$r->print(&Apache::loncommon::start_data_table() |
|
.&Apache::loncommon::start_data_table_header_row()); |
# Only display header if content exists |
if (($env{'form.readfile'}) || ($env{'form.bookmarks'})) { |
if ($clen > 0) { |
$r->print("<th>$lt{'in'}</th>\n"); |
$r->print(&Apache::loncommon::start_data_table() |
} else { |
.&Apache::loncommon::start_data_table_header_row()); |
$r->print('<th colspan="2">'.$lt{'co'}.'</th>'."\n"); |
if (($env{'form.readfile'}) || ($env{'form.bookmarks'})) { |
} |
$r->print("<th>$lt{'in'}</th>\n"); |
$r->print('<th colspan="2">'.$lt{'ti'}.'</th>'."\n"); |
} else { |
$r->print("<th>$lt{'pa'}</th>"); |
$r->print('<th colspan="2">'.$lt{'co'}.'</th>'."\n"); |
$r->print(&Apache::loncommon::end_data_table_header_row() |
} |
."\n"); |
$r->print('<th colspan="2">'.$lt{'ti'}.'</th>'."\n"); |
|
$r->print("<th>$lt{'pa'}</th>"); |
|
$r->print(&Apache::loncommon::end_data_table_header_row()."\n"); |
|
} else { |
|
my $errtxt = ''; |
|
if ($env{'form.recover'}) { |
|
$errtxt = 'There are no resources to recover.'; |
|
} else { |
|
$errtxt = 'There are no resources to import.'; |
|
} |
|
if ($env{'form.bookmarks'}) { |
|
$errtxt = 'There are no resources in your bookmarks to import.'; |
|
} |
|
$r->print('<p class="LC_info">'.&mt($errtxt).'</p>'); |
|
} |
} else { |
} else { |
$r->print(&Apache::loncommon::start_page(undef,$js, |
$r->print(&Apache::loncommon::start_page(undef,$js, |
{'only_body' => 1})); |
{'only_body' => 1})); |
|
# $r->print('<h1>'.&mt($title).'</h1>'); |
$r->print(<<END); |
$r->print(<<END); |
<form method='post' action='/adm/groupsort' name='groupsort' |
<form method='post' action='/adm/groupsort' name='groupsort' |
enctype='application/x-www-form-urlencoded'> |
enctype='application/x-www-form-urlencoded'> |
Line 428 END
|
Line 448 END
|
} |
} |
} |
} |
if (($clen > 1) || ($env{'form.readfile'}) || ($env{'form.bookmarks'})) { |
if (($clen > 1) || ($env{'form.readfile'}) || ($env{'form.bookmarks'})) { |
$r->print(&Apache::loncommon::end_data_table() |
if ($clen > 0) { |
."</form>"); |
$r->print(&Apache::loncommon::end_data_table()); |
|
} |
|
$r->print('</form>'); |
} else { |
} else { |
$r->print(<<END); |
$r->print(<<END); |
<script type="text/javascript"> |
<script type="text/javascript"> |