@@ -42,7 +46,7 @@ Click on a configuration value to change it.
<% ucfirst($section || 'unclassified') %> configuration options
-% foreach my $i (grep $_->section eq $section, @config_items) {
+% foreach my $i (@{ $section_items{$section} }) {
% my @types = ref($i->type) ? @{$i->type} : ($i->type);
% my( $width, $height ) = ( 522, 336 );
% if ( grep $_ eq 'textarea', @types ) {
@@ -53,6 +57,26 @@ Click on a configuration value to change it.
% #$width =
% #$height =
% }
+%
+% my @agents = ();
+% if ( $page_agent ) {
+% @agents = ( $page_agent );
+% } else {
+% @agents = (
+% '',
+% grep { defined( _config_agentonly($conf, $i->key, $_->agentnum) ) }
+% @all_agents
+% );
+% }
+%
+% foreach my $agent ( @agents ) {
+% my $agentnum = $agent ? $agent->agentnum : '';
+%
+% my $label = $i->key;
+% $label = '['. $agent->agent. "] $label"
+% if $agent && $cgi->param('showagent');
+%
+% #indentation :/
<% include('/elements/popup_link.html',
@@ -61,8 +85,9 @@ Click on a configuration value to change it.
'width' => $width,
'height' => $height,
'actionlabel' => 'Enter configuration value',
- 'label' => ''. $i->key. '',
- 'aname' => $i->key,
+ 'label' => "$label",
+ 'aname' => $i->key, #agentnum
+ # if $cgi->param('showagent')?
)
%>: <% $i->description %>
|
@@ -76,13 +101,36 @@ Click on a configuration value to change it.
no type |
-% } elsif ( $type eq 'binary' ) {
+
+% } elsif ( $type eq 'image' ) {
+
+
+
+ <% $conf->exists($i->key, $agentnum)
+ ? ''
+ : 'empty'
+ %>
+ |
+
+
+
+ <% $conf->exists($i->key, $agentnum)
+ ? qq!download!
+ : ''
+ %>
+ |
+
+
+% } elsif ( $type eq 'binary' ) {
- <% $conf->exists($i->key, $agentnum)
- ? qq!download!
- : 'empty'
- %>
+
+ <% $conf->exists($i->key, $agentnum)
+ ? qq!download!
+ : 'empty'
+ %>
+ |
% } elsif ( $type eq 'textarea'
@@ -90,35 +138,53 @@ Click on a configuration value to change it.
% || $type eq 'selectmultiple' ) {
-
-
-<% encode_entities(join("\n",
+
+<% encode_entities(join("\n",
map { length($_) > 88 ? substr($_,0,88).'...' : $_ }
$conf->config($i->key, $agentnum)
) )
-%>
-
+%>
|
|
+
% } elsif ( $type eq 'checkbox' ) {
- YES' : 'ff0000">NO' %> |
+ YES' : 'ff0000">NO' %> |
+
+
+% } elsif ( $type eq 'select' && $i->select_hash ) {
+%
+% my %hash;
+% if ( ref($i->select_hash) eq 'ARRAY' ) {
+% tie %hash, 'Tie::IxHash', '' => '', @{ $i->select_hash };
+% } else {
+% tie %hash, 'Tie::IxHash', '' => '', %{ $i->select_hash };
+% }
+
+
+
+ <% $conf->exists($i->key, $agentnum) ? $hash{ $conf->config($i->key, $agentnum) } : '' %>
+ |
+
% } elsif ( $type eq 'text' || $type eq 'select' ) {
-
+ |
<% $conf->exists($i->key, $agentnum) ? $conf->config($i->key, $agentnum) : '' %>
- |
+
+
+
% } elsif ( $type eq 'select-sub' ) {
-
+ |
<% $conf->config($i->key, $agentnum) %>:
<% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) %>
|
+
% } else {
@@ -130,37 +196,67 @@ Click on a configuration value to change it.
|
-% }
+
+% } # foreach my $agentnum
+
+% } # foreach my $i