X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig-view.cgi;h=11e75707c06b8ab402177cc6570a249599ca59e5;hb=b1dacaef3f9773c72b4c6f525d2f1e584e1432fc;hp=9b5b132519aaea05af598f17f0601ee74daf5766;hpb=53cadf47dea115cf804d07beb58c7de67429873f;p=freeside.git
diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi
index 9b5b13251..11e75707c 100644
--- a/httemplate/config/config-view.cgi
+++ b/httemplate/config/config-view.cgi
@@ -43,12 +43,16 @@ Click on a configuration value to change it.
- <% ucfirst($section || 'unclassified') %> configuration options
+ <% ucfirst($section || 'unclassified') %>
+% if ( $curuser->option('show_confitem_counts') ) {
+ (<% scalar( @{ $section_items{$section} } ) %> items)
+% }
|
% foreach my $i (@{ $section_items{$section} }) {
% my @types = ref($i->type) ? @{$i->type} : ($i->type);
-% my( $width, $height ) = ( 522, 336 );
+%# my( $width, $height ) = ( 522, 336 );
+% my( $width, $height ) = ( 600, 336 );
% if ( grep $_ eq 'textarea', @types ) {
% #800x600
% $width = 763;
@@ -66,7 +70,7 @@ Click on a configuration value to change it.
% @agents = ( '' );
% if ( $i->per_agent ) {
% foreach my $agent (@all_agents) {
-% if ( defined(_config_agentonly($conf, $i->key, $agent->agentnum)) ) {
+% if ( defined($conf->conf( $i->key, $agent->agentnum, 1 ) ) ) {
% push @agents, $agent;
% } else {
% push @add_agents, $agent;
@@ -78,6 +82,8 @@ Click on a configuration value to change it.
% foreach my $agent ( @agents ) {
% my $agentnum = $agent ? $agent->agentnum : '';
%
+% next if $section eq 'deprecated' && ! $conf->exists($i->key, $agentnum);
+%
% my $label = $i->key;
% $label = '['. $agent->agent. "] $label"
% if $agent && $cgi->param('showagent');
@@ -97,14 +103,14 @@ Click on a configuration value to change it.
)
%>: <% $i->description %>
% if ( $agent && $cgi->param('showagent') ) {
-% my $confnum =
-% _config_agentonly($conf, $i->key, $agent->agentnum)->confnum;
+% my $confnum = $conf->conf( $i->key, $agent->agentnum, 1 )->confnum;
(delete agent override)
-% } elsif ( $i->base_key ) {
+% } elsif ( $i->base_key
+% || ( $deleteable{$i->key} && $conf->exists($i->key) ) ) {
% my $confnum =
% $agent
-% ? _config_agentonly($conf, $i->key, $agent->agentnum)->confnum
-% : $conf->_config( $i->key )->confnum;
+% ? $conf->conf( $i->key, $agent->agentnum, 1 )->confnum
+% : $conf->conf( $i->key )->confnum;
% my $showagent = $cgi->param('showagent') ? '_showagent' : '';
(delete configuration item)
% }
@@ -154,7 +160,9 @@ Click on a configuration value to change it.
% } elsif ( $type eq 'textarea'
% || $type eq 'editlist'
-% || $type eq 'selectmultiple' ) {
+% || $type eq 'selectmultiple'
+% )
+% {
@@ -195,7 +203,7 @@ Click on a configuration value to change it.
|
-% } elsif ( $type eq 'select-sub' ) {
+% } elsif ( $type eq 'select-sub' ) {
@@ -204,12 +212,33 @@ Click on a configuration value to change it.
|
-% } else {
+% } elsif ( $type =~ /^select-(part_svc|part_pkg|pkg_class)$/ ) {
+%
+% my $table = $1;
+% my $namecol = $namecol{$table};
+% my $pkey = dbdef->table($table)->primary_key;
+%
+% my @keys = $conf->config($i->key, $agentnum);
+
+
+
+ <% join( ' ',
+ map {
+ my $key = $_;
+ my $record = qsearchs($table, { $pkey => $key });
+ $record ? "$key: ".$record->$namecol() : $key;
+ } @keys
+ )
+ %>
+ |
+
+
+% } else {
unknown type <% $type %>
|
-% }
+% }
% $n++;
% }
@@ -284,21 +313,18 @@ Click on a configuration value to change it.