--- /home/joby/rt/rt-bp/share/html/Ticket/Elements/ShowMessageStanza	2005-02-07 09:22:15.000000000 -0800
+++ /home/joby/rt/cac/html/Ticket/Elements/ShowMessageStanza	2005-12-29 17:35:10.244165632 -0800
@@ -46,12 +46,24 @@
 % if (ref($Message)) {
 <font color="<%$colors[$Depth]%>">
 <%perl>
+
+# Add titlebar if this is the first nested message (depth == 1)
+if ($Depth == 1 && $$First) {
+    $m->comp( '/Elements/TitleBoxStart', 
+              title  => loc('Expand transaction history'),
+              class  => 'transaction-history',
+              hidden => '1',
+            );
+    $$First = 0;
+}
+
 foreach my $stanza (@$Message) {
     if ( ref $stanza eq "ARRAY" ) {
         $m->comp( 'ShowMessageStanza',
-                  Depth   => $Depth + 1,
+                  Depth       => $Depth + 1,
                   Transaction => $Transaction,
-                  Message => $stanza );
+                  First       => $First,
+                  Message     => $stanza );
     }
     elsif ( ref $stanza eq "HASH" ) {
         my $content = $stanza->{raw};
@@ -77,7 +91,8 @@
 my @colors = ('#000000', '#660000', '#006600', '#000066', '#cc0000', '#00cc00', '#0000cc', '#ff0000', '#00ff00', '#0000ff');
 </%INIT>
 <%ARGS>
-$Message => undef
-$Depth => 0
+$Message     => undef
+$Depth       => 0
 $Transaction => undef
+$First       => 0
 </%ARGS>
