version 1.497, 2010/06/16 14:26:18
|
version 1.499, 2010/07/01 00:08:28
|
Line 1685 sub displaymenu {
|
Line 1685 sub displaymenu {
|
} |
} |
|
|
sub mapmenu { |
sub mapmenu { |
my ($r,$allmaps,$pschp,$maptitles, $symbp)=@_; |
my ($r,$allmaps,$pschp,$maptitles,$symbp)=@_; |
my %allmaps_inverted = reverse %$allmaps; |
my %allmaps_inverted = reverse %$allmaps; |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $tree=[]; |
my $tree=[]; |
my $treeinfo={}; |
my $treeinfo={}; |
if (defined($navmap)) { |
if (defined($navmap)) { |
my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef); |
my $it=$navmap->getIterator(undef,undef,undef,1,1,undef); |
my $curRes; |
my $curRes; |
my $depth = 0; |
my $depth = 0; |
my %parent = (); |
my %parent = (); |
Line 1741 sub mapmenu {
|
Line 1741 sub mapmenu {
|
.&Apache::loncommon::lonhttpdurl('/adm/lonIcons/whitespace_21.gif') |
.&Apache::loncommon::lonhttpdurl('/adm/lonIcons/whitespace_21.gif') |
.'" alt="" />'; |
.'" alt="" />'; |
|
|
|
# Info about selectable folders/maps |
|
$r->print( |
|
'<div class="LC_info">' |
|
.&mt('You can only select those maps and folders which can be currently parameterized.') |
|
# .' '.&Apache::loncommon::help_open_topic('...') # Later: Add further help |
|
.'</div>' |
|
); |
|
|
|
|
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(&Apache::loncommon::start_data_table()); |
|
|
# Display row: "All Maps and Folders" |
# Display row: "All Maps or Folders" |
$r->print(&Apache::loncommon::start_data_table_row() |
$r->print( |
.'<td>'.$icon |
&Apache::loncommon::start_data_table_row() |
.'<label>' |
.'<td>' |
.'<input type="radio" name="pschp"' |
.'<label>' |
|
.'<input type="radio" name="pschp"' |
); |
); |
$r->print(' checked="checked"') if ($pschp eq 'all' || !$pschp); |
$r->print(' checked="checked"') if ($pschp eq 'all' || !$pschp); |
$r->print( ' value="all" />' |
$r->print( |
.&mt('All Maps or Folders') |
' value="all" /> '.$icon.' ' |
.'</label></td>' |
.&mt('All Maps or Folders') |
.&Apache::loncommon::end_data_table_row() |
.'</label>' |
|
.'<hr /></td>' |
|
.&Apache::loncommon::end_data_table_row() |
); |
); |
|
|
# Display row: "Main Course Documents" |
# Display row: "Main Course Documents" |
if (exists($$allmaps{1})) { |
if (exists($$allmaps{1})) { |
$r->print(&Apache::loncommon::start_data_table_row() |
$r->print( |
.'<td>'.$icon |
&Apache::loncommon::start_data_table_row() |
.'<label>' |
.'<td>' |
.'<input type="radio" name="pschp" value="1"' |
.'<label>' |
|
.'<input type="radio" name="pschp" value="1"' |
); |
); |
$r->print(' checked="checked"') if ($pschp eq '1'); |
$r->print(' checked="checked"') if ($pschp eq '1'); |
$r->print('/>' |
$r->print( |
.$$maptitles{1} |
'/> '.$icon.' ' |
.($$allmaps{1} !~/^uploaded/?' ['.$$allmaps{1}.']':'') |
.$$maptitles{1} |
.'</label>' |
.($$allmaps{1} !~/^uploaded/?' ['.$$allmaps{1}.']':'') |
.'</td>' |
.'</label>' |
.&Apache::loncommon::end_data_table_row() |
.'</td>' |
|
.&Apache::loncommon::end_data_table_row() |
); |
); |
} |
} |
|
|
Line 1789 sub mapmenu {
|
Line 1803 sub mapmenu {
|
my $symb_name = $$symbp{$id}; |
my $symb_name = $$symbp{$id}; |
my ($front, $tail) = split (/___${resid}___/, $symb_name); |
my ($front, $tail) = split (/___${resid}___/, $symb_name); |
$symb_name = $tail; |
$symb_name = $tail; |
$r->print(&Apache::loncommon::start_data_table_row() |
$r->print( |
.'<td>'.$indent.$icon |
&Apache::loncommon::start_data_table_row() |
.'<label>' |
.'<td>' |
.'<input type ="radio" name="pschp" value="'.$allmaps_inverted{$symb_name}.'"' |
.'<label>' |
); |
); |
if ($allmaps_inverted{$symb_name} && $pschp) { |
# Only offer radio button for folders/maps which can be parameterized |
if ($allmaps_inverted{$symb_name} eq $pschp) { |
if ($allmaps_inverted{$symb_name}) { |
$r->print(' checked="checked"'); |
$r->print( |
} |
'<input type ="radio" name="pschp"' |
} |
.' value="'.$allmaps_inverted{$symb_name}.'"' |
$r->print('/>' |
); |
.$treeinfo->{$id}->{name} |
$r->print(' checked="checked"') if ($allmaps_inverted{$symb_name} eq $pschp); |
.($$allmaps{$mapid}!~/^uploaded/?' ['.$$allmaps{$mapid}.']':'') |
$r->print('/>'); |
.'</label>' |
} else { |
.'</td>' |
$r->print($whitespace); |
.&Apache::loncommon::end_data_table_row() |
} |
|
$r->print( |
|
$indent.$icon.' ' |
|
.$treeinfo->{$id}->{name} |
|
.($$allmaps{$mapid}!~/^uploaded/?' ['.$$allmaps{$mapid}.']':'') |
|
.'</label>' |
|
.'</td>' |
|
.&Apache::loncommon::end_data_table_row() |
); |
); |
} |
} |
|
|