X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig-view.cgi;h=08f6c1020b8e70ee0f210fbe5987978a78a1f4b3;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=0f6c99232f7796da0dc5b7ce62d86edb5e427a34;hpb=56a2965996454a0649d43ecbc062beda61106e21;p=freeside.git diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi index 0f6c99232..08f6c1020 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. % 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; @@ -156,7 +160,9 @@ Click on a configuration value to change it. % } elsif ( $type eq 'textarea' % || $type eq 'editlist' -% || $type eq 'selectmultiple' ) { +% || $type eq 'selectmultiple' +% ) +% { -% } elsif ( $type eq 'select-sub' ) { +% } elsif ( $type eq 'select-sub' ) { -% } 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); + + + + + +% } else { -% } +% } % $n++; % } @@ -285,10 +312,19 @@ Click on a configuration value to change it. +<%once> +#false laziness w/config-process.cgi +my %namecol = ( + 'part_svc' => 'svc', + 'part_pkg' => 'pkg', + 'pkg_class' => 'classname', +); + <%init> -die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +my $curuser = $FS::CurrentUser::CurrentUser; + +die "access denied" unless $curuser->access_right('Configuration'); my $page_agent = ''; my $title; @@ -313,7 +349,7 @@ my @config_items = grep { $page_agent ? $_->per_agent : 1 } my @deleteable = qw( invoice_latexreturnaddress invoice_htmlreturnaddress ); my %deleteable = map { $_ => 1 } @deleteable; -my @sections = qw(required billing username password UI session shell BIND ); +my @sections = qw(required billing invoicing UI self-service username password session shell BIND ); push @sections, '', 'deprecated'; my %section_items = (); @@ -327,6 +363,5 @@ my @all_agents = (); if ( $cgi->param('showagent') ) { @all_agents = qsearch('agent', { 'disabled' => '' } ); } -warn 'all agents: '. join('-', @all_agents);
- <% ucfirst($section || 'unclassified') %> configuration options + <% ucfirst($section || 'unclassified') %> +% if ( $curuser->option('show_confitem_counts') ) { + (<% scalar( @{ $section_items{$section} } ) %> items) +% }
@@ -197,7 +203,7 @@ Click on a configuration value to change it.
@@ -206,12 +212,33 @@ Click on a configuration value to change it.
+ <% join( '
', + map { + my $key = $_; + my $record = qsearchs($table, { $pkey => $key }); + $record ? "$key: ".$record->$namecol() : $key; + } @keys + ) + %> +
unknown type <% $type %>