projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix "multiple states" links, RT#13922
[freeside.git]
/
httemplate
/
config
/
config-view.cgi
diff --git
a/httemplate/config/config-view.cgi
b/httemplate/config/config-view.cgi
index
51535d7
..
e7cadbe
100644
(file)
--- a/
httemplate/config/config-view.cgi
+++ b/
httemplate/config/config-view.cgi
@@
-43,7
+43,10
@@
Click on a configuration value to change it.
<TABLE BGCOLOR="#cccccc" BORDER=1 CELLSPACING=0 CELLPADDING=0 BORDERCOLOR="#999999">
<tr>
<th colspan="2" bgcolor="#dcdcdc">
<TABLE BGCOLOR="#cccccc" BORDER=1 CELLSPACING=0 CELLPADDING=0 BORDERCOLOR="#999999">
<tr>
<th colspan="2" bgcolor="#dcdcdc">
- <% ucfirst($section || 'unclassified') %> configuration options
+ <% ucfirst($section || 'unclassified') %>
+% if ( $curuser->option('show_confitem_counts') ) {
+ (<% scalar( @{ $section_items{$section} } ) %> items)
+% }
</th>
</tr>
% foreach my $i (@{ $section_items{$section} }) {
</th>
</tr>
% foreach my $i (@{ $section_items{$section} }) {
@@
-204,19
+207,35
@@
Click on a configuration value to change it.
<tr>
<td id="<% $agentnum.$i->key.$n %>" bgcolor="#ffffff">
<tr>
<td id="<% $agentnum.$i->key.$n %>" bgcolor="#ffffff">
+% if ( $i->multiple ) {
+ <% join('<BR>',
+ map { $_ . ": " . &{ $i->option_sub }($_) }
+ $conf->config($i->key,$agentnum)
+ )
+ %>
+% } else {
<% $conf->config($i->key, $agentnum) %>:
<% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) %>
<% $conf->config($i->key, $agentnum) %>:
<% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) %>
+% }
</td>
</tr>
</td>
</tr>
-% } elsif ( $type =~ /^select-(part_svc|part_pkg)$/ ) {
+% } elsif ( $type =~ /^select-(part_svc|part_pkg|pkg_class|agent)$/ ) {
+%
+% my $table = $1;
+% my $namecol = $namecol{$table};
+% my $pkey = dbdef->table($table)->primary_key;
+%
% my @keys = $conf->config($i->key, $agentnum);
<tr>
<td id="<% $agentnum.$i->key.$n %>" bgcolor="#ffffff">
% my @keys = $conf->config($i->key, $agentnum);
<tr>
<td id="<% $agentnum.$i->key.$n %>" bgcolor="#ffffff">
- <% join('<BR>', map { $_ # ': '. $svc, $pkg, whatever
- }
- @keys
+ <% join( '<BR>',
+ map {
+ my $key = $_;
+ my $record = qsearchs($table, { $pkey => $key });
+ $record ? "$key: ".$record->$namecol() : $key;
+ } @keys
)
%>
</td>
)
%>
</td>
@@
-301,10
+320,20
@@
Click on a configuration value to change it.
</SCRIPT>
</body></html>
</SCRIPT>
</body></html>
+<%once>
+#false laziness w/config-process.cgi
+my %namecol = (
+ 'part_svc' => 'svc',
+ 'part_pkg' => 'pkg',
+ 'pkg_class' => 'classname',
+ 'agent' => 'agent',
+);
+</%once>
<%init>
<%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;
my $page_agent = '';
my $title;
@@
-329,7
+358,7
@@
my @config_items = grep { $page_agent ? $_->per_agent : 1 }
my @deleteable = qw( invoice_latexreturnaddress invoice_htmlreturnaddress );
my %deleteable = map { $_ => 1 } @deleteable;
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 notification UI self-service ticketing username password session shell BIND telephony
);
push @sections, '', 'deprecated';
my %section_items = ();
push @sections, '', 'deprecated';
my %section_items = ();
@@
-343,6
+372,5
@@
my @all_agents = ();
if ( $cgi->param('showagent') ) {
@all_agents = qsearch('agent', { 'disabled' => '' } );
}
if ( $cgi->param('showagent') ) {
@all_agents = qsearch('agent', { 'disabled' => '' } );
}
-warn 'all agents: '. join('-', @all_agents);
</%init>
</%init>