[freeside-commits] freeside/httemplate/config config-view.cgi, 1.24, 1.25 config-image.cgi, 1.1, 1.2
Ivan,,,
ivan at wavetail.420.am
Tue Mar 17 02:58:19 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/config
In directory wavetail.420.am:/tmp/cvs-serv11834/httemplate/config
Modified Files:
config-view.cgi config-image.cgi
Log Message:
add eps preview to config, for RT#5025
Index: config-image.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/config/config-image.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- config-image.cgi 9 Feb 2009 14:05:31 -0000 1.1
+++ config-image.cgi 17 Mar 2009 09:58:17 -0000 1.2
@@ -1,4 +1,4 @@
-<% $conf->config_binary($name, $agentnum) %>
+<% $logo %>
<%init>
die "access denied"
@@ -16,4 +16,7 @@
$agentnum = $1;
}
+my $logo = $conf->config_binary($name, $agentnum);
+$logo = eps2png($logo) if $name =~ /\.eps$/i;
+
</%init>
Index: config-view.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/config/config-view.cgi,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- config-view.cgi 9 Feb 2009 14:05:31 -0000 1.24
+++ config-view.cgi 17 Mar 2009 09:58:17 -0000 1.25
@@ -69,22 +69,32 @@
% } elsif ( $type eq 'image' ) {
<tr>
-
- <% $conf->exists($i->key, $agentnum)
- ? '<img src="config-image.cgi?key='. $i->key.
- ';agentnum='. $agentnum. '">'
- : 'empty'
- %>
+ <td bgcolor='#ffffff'>
+ <% $conf->exists($i->key, $agentnum)
+ ? '<img src="config-image.cgi?key='. $i->key.
+ ';agentnum='. $agentnum. '">'
+ : 'empty'
+ %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <% $conf->exists($i->key, $agentnum)
+ ? qq!<a href="config-download.cgi?key=!. $i->key. ';agentnum='. $agentnum. qq!">download</a>!
+ : ''
+ %>
+ </td>
</tr>
% } elsif ( $type eq 'binary' ) {
<tr>
-
- <% $conf->exists($i->key, $agentnum)
- ? qq!<a href="config-download.cgi?key=!. $i->key. ';agentnum='. $agentnum. qq!">download</a>!
- : 'empty'
- %>
+ <td>
+ <% $conf->exists($i->key, $agentnum)
+ ? qq!<a href="config-download.cgi?key=!. $i->key. ';agentnum='. $agentnum. qq!">download</a>!
+ : 'empty'
+ %>
+ </td>
</tr>
% } elsif ( $type eq 'textarea'
More information about the freeside-commits
mailing list