version 1.17, 2007/05/29 15:58:41
|
version 1.18, 2007/06/01 01:14:51
|
Line 522 sub display_color_options {
|
Line 522 sub display_color_options {
|
'</span></td></tr>'; |
'</span></td></tr>'; |
my $switchserver = &check_switchserver($dom,$confname); |
my $switchserver = &check_switchserver($dom,$confname); |
foreach my $img (@{$images}) { |
foreach my $img (@{$images}) { |
$itemcount ++; |
$itemcount ++; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$datatable .= '<tr'.$css_class.'>'. |
$datatable .= '<tr'.$css_class.'>'. |
'<td>'.$choices->{$img}.'</td>'; |
'<td>'.$choices->{$img}.'</td>'; |
my $imgfile; |
my ($imgfile, $img_import); |
if ($designs->{$img} ne '') { |
if ($designs->{$img} ne '') { |
$imgfile = $designs->{$img}; |
$imgfile = $designs->{$img}; |
|
$img_import = ($imgfile =~ m{^/adm/}); |
} else { |
} else { |
$imgfile = $defaults->{$img}; |
$imgfile = $defaults->{$img}; |
} |
} |
Line 578 sub display_color_options {
|
Line 579 sub display_color_options {
|
if (!$is_custom->{$img}) { |
if (!$is_custom->{$img}) { |
$datatable .= &mt('Default in use:').'<br />'; |
$datatable .= &mt('Default in use:').'<br />'; |
} |
} |
|
if ($img_import) { |
|
$datatable.= '<input type="hidden" name="'.$role.'_import_'.$img.'" value="'.$imgfile.'" />'; |
|
} |
$datatable.= '<a href="'.$fullsize.'" target="_blank"><img src="'. |
$datatable.= '<a href="'.$fullsize.'" target="_blank"><img src="'. |
$showfile.'" alt="'.$alt_text->{$img}. |
$showfile.'" alt="'.$alt_text->{$img}. |
'" border="0" /></a></td>'; |
'" border="0" /></a></td>'; |
Line 1052 sub modify_colors {
|
Line 1056 sub modify_colors {
|
} |
} |
my ($width,$height) = &thumb_dimensions(); |
my ($width,$height) = &thumb_dimensions(); |
foreach my $img (@images) { |
foreach my $img (@images) { |
|
if ( ! $env{'form.'.$role.'_'.$img.'.filename'} |
|
&& !defined($domconfig->{$role}{$img}) |
|
&& !$env{'form.'.$role.'_del_'.$img} |
|
&& $env{'form.'.$role.'_import_'.$img}) { |
|
# import the old configured image from the .tab setting |
|
# if they haven't provided a new one |
|
$domconfig->{$role}{$img} = |
|
$env{'form.'.$role.'_import_'.$img}; |
|
} |
if ($env{'form.'.$role.'_'.$img.'.filename'} ne '') { |
if ($env{'form.'.$role.'_'.$img.'.filename'} ne '') { |
my $error; |
my $error; |
if ($configuserok eq 'ok') { |
if ($configuserok eq 'ok') { |
Line 1091 sub modify_colors {
|
Line 1104 sub modify_colors {
|
$dom,$confname,$img,$width,$height); |
$dom,$confname,$img,$width,$height); |
if ($result eq 'ok') { |
if ($result eq 'ok') { |
$confhash->{$role}{$img} = $logourl; |
$confhash->{$role}{$img} = $logourl; |
|
$changes{$role}{'images'}{$img} = 1; |
} |
} |
} |
} |
} |
} |
Line 1505 sub check_switchserver {
|
Line 1519 sub check_switchserver {
|
} |
} |
my @ids=&Apache::lonnet::current_machine_ids(); |
my @ids=&Apache::lonnet::current_machine_ids(); |
foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } } |
foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } } |
|
$allowed=0; |
if (!$allowed) { |
if (!$allowed) { |
$switchserver='<a href="/adm/switchserver?otherserver='.$home.'&role=dc./'.$dom.'/">'.&mt('Switch Server').'</a>'; |
$switchserver='<a href="/adm/switchserver?otherserver='.$home.'&role=dc./'.$dom.'/">'.&mt('Switch Server').'</a>'; |
} |
} |