RT notifier: parse templates without header correctly
[openxpki.git] / trunk / clients / perl / OpenXPKI-Client-HTML-Mason / htdocs / binary / get_workflow_instance_info.html
blob88b24c6332b98820242327d33e30f98c76db3976
1 <%args>
2 $id => undef
3 $format => "png"
4 $language => "png"
5 $filled => undef
6 </%args>
7 <%init>
8 my $msg = $context->{client}->send_receive_command_msg (
9 "get_workflow_instance_info",
11 ID => $id,
12 FORMAT => $format,
13 LANGUAGE => $language
14 });
15 if (exists $msg->{SERVICE_MSG} and
16 $msg->{SERVICE_MSG} eq "ERROR")
18 $m->comp ('/service/create_csr/print_errors.mhtml',
19 'errors' => [
20 $m->comp ('/lib/get_deep_error.mhtml', 'msg' => $msg)
21 ]);
23 else
25 my $data = $msg->{PARAMS};
26 switch ($format)
28 case "cmpax" { $r->content_type ("text/html") }
29 case "fig" { $r->content_type ("application/x-xfig") }
30 case "gif" { $r->content_type ("image/gif") }
31 case "hpgl" { $r->content_type ("application/vnd.hp-HPGL") }
32 case "imap" { $r->content_type ("text/html") }
33 case "jpg" { $r->content_type ("image/jpeg") }
34 # FIXME: I have no FrameMaker so which content type is correct
35 # case "mif" { $r->content_type ("application/vnd.mif") }
36 case "mif" { $r->content_type ("application/x-maker") }
37 case "pcl" { $r->content_type ("application/vnd.hp-PCL") }
38 case "png" { $r->content_type ("image/png") }
39 case "ps" { $r->content_type ("application/postscript") }
40 case "svg" { $r->content_type ("image/svg+xml") }
41 case "svgz" { $r->content_type ("image/svg+xml") }
42 else { $r->content_type ("application/octet-stream") }
44 print $data;
46 </%init>
47 <%once>
48 use Switch;
49 </%once>