[Rt-commit] rt branch, 3.8-html-templates, created. rt-3.8.7-272-g1027ca3

Kevin Falcone falcone at bestpractical.com
Thu Mar 25 16:43:05 EDT 2010


The branch, 3.8-html-templates has been created
        at  1027ca3f29c39b685313a57566372c2fd2a81297 (commit)

- Log -----------------------------------------------------------------
commit 1027ca3f29c39b685313a57566372c2fd2a81297
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Mar 25 16:42:59 2010 -0400

    Add a rough initial cut of HTML templates

diff --git a/etc/initialdata b/etc/initialdata
index 89db2cc..0581dfd 100755
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -486,6 +486,131 @@ Hour:         { $SubscriptionObj->SubValue('Hour') }
 }
 }
 },
+# HTML version of the templates
+    {
+     Name        => 'Correspondence in HTML',                            # loc
+     Description => 'HTML correspondence template',         # loc
+     Content     => q[RT-Attach-Message: yes
+Content-Type: text/html
+
+{$Transaction->Content( Type => 'text/html')}
+],
+   },
+
+   {
+     Queue       => '0',
+     Name        => 'Admin Correspondence in HTML',                     # loc
+     Description => 'HTML admin correspondence template',    # loc
+     Content     => q[RT-Attach-Message: yes
+Content-Type: text/html
+
+{ my $c = $Transaction->Content(Type => 'text/html');
+  my $url = $RT::WebURL."Ticket/Display.html?id=".$Ticket->id;
+  if (substr($c,0,500) =~ qr/\Q$url\E/) {
+     $OUT = $c;
+  } else {
+    $OUT = <<EOF;
+Ticket URL: <a href="$url">$url</a>
+<br/>
+<br/>
+<br/>
+$c
+EOF
+
+  }
+}
+],
+   },
+   {  
+      Queue       => '0',
+      Name        => 'Admin Comment in HTML',                           # loc
+      Description => 'HTML admin comment template',          # loc
+      Content     => q[Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s =~ s/\[Comment\]//g; $comment =~ s/^Re//i; $s;}
+RT-Attach-Message: yes
+Content-Type: text/html
+
+<p>This is a comment about <a href="{$RT::WebURL}?q={$Ticket->id}">ticket {$Ticket->id}</a>. It is not sent to the Requestor(s):</p>
+<br/>
+{$Transaction->Content(Type => 'text/html')}
+],
+   },
+   {  Queue       => '0',
+      Name        => 'Status Change in HTML',                                     # loc
+      Description => 'Ticket status changed',                             # loc
+      Content     => q[Subject: Status Changed to: {$Transaction->NewValue}
+RT-Attach-Message: yes
+Content-Type: text/html
+
+<a href="{$RT::WebURL}?q={$Ticket->id}">{$RT::WebURL}?q={$Ticket->id}</a>
+<br/>
+<br/>
+{$Transaction->Content(Type => 'text/html')}
+],
+   },
+   {
+     Queue       => '0',
+     Name        => 'Resolved in HTML',                 # loc
+     Description => 'HTML Ticket Resolved',          # loc
+     Content     => q[Subject: Resolved: {$Ticket->Subject}
+Content-Type: text/html
+
+<p>According to our records, your request has been resolved.</p>
+
+<p>If you have any further questions or concerns, please respond to this message.</p>
+],
+   },
+   {  Queue       => '0',
+      Name        => 'Autoreply in HTML',                                         # loc
+      Description => 'HTML Autoresponse template',                     # loc
+      Content     => q[Subject: AutoReply: {$Ticket->Subject}
+Content-Type: text/html
+
+
+<p>Greetings,</p>
+
+<p>This message has been automatically generated in response to the
+creation of a trouble ticket regarding <b>{$Ticket->Subject()}</b>,
+a summary of which appears below.</p>
+
+<p>There is no need to reply to this message right now.  Your ticket has been
+assigned an ID of [{$rtname} #{$Ticket->id()}].</p>
+
+<p>Please include the string <b>[{$rtname} #{$Ticket->id}]</b>
+in the subject line of all future correspondence about this issue. To do so,
+you may reply to this message.</p>
+
+
+<p>Thank you,<br/>
+{$Ticket->QueueObj->CorrespondAddress()}</p>
+
+<hr/>
+{$Transaction->Content(Type => 'text/html')}
+],
+   },
+   {  
+      Queue       => '0',
+      Name        => 'Transaction in HTML',                     # loc
+      Description => 'Default transaction template',    # loc
+      Content     => q[RT-Attach-Message: yes
+Content-Type: text/html
+
+<b>{$Transaction->CreatedAsString}: {$Transaction->CreatorObj->Name} updated ticket {$Ticket->id}.</b>
+<br>
+<table border="0">
+<tr><td align="right"><b>Transaction:</b></td><td>{$Transaction->Description}</td></tr>
+<tr><td align="right"><b>Queue:</b></td><td>{$Ticket->QueueObj->Name}</td></tr>
+<tr><td align="right"><b>Subject:</b></td><td>{$Transaction->Subject || $Ticket->Subject || "(No subject given)"} </td></tr>
+<tr><td align="right"><b>Owner:</b></td><td>{$Ticket->OwnerObj->Name}</td></tr>
+<tr><td align="right"><b>Requestors:</b></td><td>{$Ticket->RequestorAddresses}</td></tr>
+<tr><td align="right"><b>Status:</b></td><td>{$Ticket->Status}</td></tr>
+<tr><td align="right"><b>Ticket URL:</b></td><td>{$RT::WebURL}?q={$Ticket->id}</td></tr>
+</table>
+
+<br/>
+<br/>
+{$Transaction->Content( Type => 'text/html')}
+],
+   },
 );
 # }}}
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list