[% MACRO box BLOCK %]
   [% DEFAULT border='black' %]
   [% DEFAULT bg='#AAAAFF' %]
   [% DEFAULT width=3 %]
   [% DEFAULT message='Unexplained situation' %]
<table border=0 cellpadding=0 cellspacing=0 bgcolor="$border"><tr><td>
<table border="$width" cellpadding=10><tr><td bgcolor="$bg">
   [% IF title %]<h1>$title</h1>[% END %]
<pre>[% message | html %]</pre>
</table></table>
[% END %]

[% 
MACRO view_result BLOCK;
   FOREACH part = result.parts;
      IF part.type;
         box(part);
      ELSE;
%]
         <strong>[% part.message | html %]</strong>
[%    END;
   END;
END;
%]
