From 2755d4a4810600f4392eaf73f362b4f358adeec6 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 17 Mar 2009 09:58:17 +0000 Subject: add eps preview to config, for RT#5025 --- httemplate/config/config-image.cgi | 5 ++++- httemplate/config/config-view.cgi | 32 +++++++++++++++++++++----------- 2 files changed, 25 insertions(+), 12 deletions(-) (limited to 'httemplate/config') diff --git a/httemplate/config/config-image.cgi b/httemplate/config/config-image.cgi index 892f7c65b..0de9d4278 100644 --- a/httemplate/config/config-image.cgi +++ b/httemplate/config/config-image.cgi @@ -1,4 +1,4 @@ -<% $conf->config_binary($name, $agentnum) %> +<% $logo %> <%init> die "access denied" @@ -16,4 +16,7 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { $agentnum = $1; } +my $logo = $conf->config_binary($name, $agentnum); +$logo = eps2png($logo) if $name =~ /\.eps$/i; + diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi index 0f5fd6213..f2ae892a6 100644 --- a/httemplate/config/config-view.cgi +++ b/httemplate/config/config-view.cgi @@ -69,22 +69,32 @@ Click on a configuration value to change it. % } elsif ( $type eq 'image' ) { - - <% $conf->exists($i->key, $agentnum) - ? '' - : 'empty' - %> + + <% $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' -- cgit v1.2.1