version 1.461, 2009/06/17 20:01:57
|
version 1.462, 2009/06/18 19:43:14
|
Line 1612 sub mapmenu {
|
Line 1612 sub mapmenu {
|
} |
} |
my $id= $curRes->id(); |
my $id= $curRes->id(); |
my ($mapid,$resid)=split(/\./,$id); |
my ($mapid,$resid)=split(/\./,$id); |
push(@$tree,$mapid); |
if(!exists($treeinfo->{$mapid})) { |
$treeinfo->{$mapid} = { |
push(@$tree,$mapid); |
|
$treeinfo->{$mapid} = { |
depth => $depth, |
depth => $depth, |
type => $type, |
type => $type, |
}; |
}; |
|
} |
} |
} |
} |
} |
} |
} |
} |
} |
|
|
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder'))); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder'))); |
if ((ref($tree) eq 'ARRAY') && (ref($treeinfo) eq 'HASH')) { |
if ((ref($tree) eq 'ARRAY') && (ref($treeinfo) eq 'HASH')) { |
my $icon = '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" />'; |
my $icon = '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" />'; |
$r->print('<table><tr><td>'.$icon.'<label> <input type="radio" name="pschp" value="all"/>'.&mt('All Maps or Folders').'</td></tr>'); |
$r->print(&Apache::loncommon::start_data_table().&Apache::loncommon::start_data_table_header_row()); |
|
$r->print('<td>'.$icon.'<label> <input type="radio" name="pschp" checked="checked" value="all"/>'.&mt('All Maps or Folders').'</td>'.&Apache::loncommon::end_data_table_header_row()); |
foreach my $mapid (@{$tree}) { |
foreach my $mapid (@{$tree}) { |
my $depth = $treeinfo->{$mapid}->{'depth'}; |
my $depth = $treeinfo->{$mapid}->{'depth'}; |
my $indent = (' 'x$depth); |
my $indent = (' 'x$depth); |
Line 1632 sub mapmenu {
|
Line 1636 sub mapmenu {
|
if ($treeinfo->{$mapid}->{'type'} eq 'page') { |
if ($treeinfo->{$mapid}->{'type'} eq 'page') { |
$icon = '<img src="/adm/lonIcons/navmap.page.open.gif" alt="" />'; |
$icon = '<img src="/adm/lonIcons/navmap.page.open.gif" alt="" />'; |
} |
} |
$r->print('<tr><td>'.$indent.$icon.'<label> <input type ="radio" name="pschp" value="'.$mapid.'"'); |
$r->print(&Apache::loncommon::start_data_table_header_row().'<td>'.$indent.$icon.'<label> <input type ="radio" name="pschp" value="'.$mapid.'"'); |
if ($pschp eq $mapid) { |
if ($pschp eq $mapid) { |
$r->print(' checked="checked"'); |
$r->print(' checked="checked"'); |
} |
} |
$r->print('/>'.$$maptitles{$mapid}.($$allmaps{$mapid}!~/^uploaded/?' ['.$$allmaps{$mapid}.']':'').'</label></td></tr>'); |
$r->print('/>'.$$maptitles{$mapid}.($$allmaps{$mapid}!~/^uploaded/?' ['.$$allmaps{$mapid}.']':'').'</label></td>'.&Apache::loncommon::end_data_table_header_row()); |
} |
} |
$r->print('</table>'); |
$r->print(&Apache::loncommon::end_data_table()); |
} |
} |
} |
} |
|
|