Rework HTML of appointment notifications

Needed to simplify the HTML so it displays properly in Outlook.

Fixes #2233
pull/17/merge
Francis Lachapelle 2014-02-07 09:59:45 -05:00
parent 5ea56a6f8a
commit 4070b9222d
6 changed files with 154 additions and 133 deletions

1
NEWS
View File

@ -41,6 +41,7 @@ Bug fixes
- encode HTML entities when forwarding an HTML message inline in plain text composition mode (#2411)
- encode HTML entities in JSON data returned by Calendar module (#2598)
- fixed handling of ACLs on shared calendars with multiple groups (#1854)
- fixed HTML formatting of appointment notifications for Outlook (#2233)
2.1.1b (2013-12-04)
-------------------

View File

@ -8,37 +8,39 @@
<head>
<style type="text/css">
.container { max-width: 600px; }
h1 { font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc; }
h1 small { font-size: 12px; color: #999; }
.dl-horizontal dt { float: left; width: 120px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
dt { font-weight: bold; line-height: 17px; }
dt, dd { font-size: 12px; line-height: 18px; color: #999; }
dt { display: block; }
h1, dd, .dl-list dt { margin-left: 130px; }
th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; font-size: 12px; line-height: 18px; }
</style>
</head>
<body>
<div class="container">
<h1><var:string value="getSubject" const:escapeHTML="NO"/>
<small><var:string value="organizerName" const:escapeHTML="NO"/><var:string value="sentByText" const:escapeHTML="NO"/></small></h1>
<dl class="dl-horizontal">
<var:if condition="location.length"
><dt><var:string label:value="location_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="location" const:escapeHTML="NO"/></dd></var:if>
<dt><var:string label:value="startDate_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="formattedAptStartDate" const:escapeHTML="NO"
<table cellpadding="2" cellspacing="2" border="0" style="width: 100%; max-width: 600px;">
<tr>
<th></th>
<td><h1 style="font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc;"><var:string
value="getSubject" const:escapeHTML="NO"/> <small style="font-size: 12px; color: #999;"><var:string
value="organizerName" const:escapeHTML="NO"/><var:string value="sentByText" const:escapeHTML="NO"/></small></h1></td>
</tr>
<tr>
<th align="right" style="font-weight: bold;"><var:string label:value="location_label" const:escapeHTML="NO"/></th>
<td><var:string value="location" const:escapeHTML="NO"/></td>
</tr>
<tr>
<th align="right" style="font-weight: bold;"><var:string label:value="startDate_label" const:escapeHTML="NO"/></th>
<td><var:string value="formattedAptStartDate" const:escapeHTML="NO"
/><var:if condition="formattedAptStartTime.length"> - <var:string value="formattedAptStartTime" const:escapeHTML="NO"/> <var:string value="viewTZ" const:escapeHTML="NO"/>
</var:if></dd>
<dt><var:string label:value="endDate_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="formattedAptEndDate" const:escapeHTML="NO"
</var:if></td>
</tr>
<tr>
<th align="right" style="font-weight: bold;"><var:string label:value="endDate_label" const:escapeHTML="NO"/></th>
<td><var:string value="formattedAptEndDate" const:escapeHTML="NO"
/><var:if condition="formattedAptEndTime.length"> - <var:string value="formattedAptEndTime" const:escapeHTML="NO"/> <var:string value="viewTZ" const:escapeHTML="NO"/>
</var:if></dd>
<var:if condition="apt.comment.length"
><dt><var:string label:value="comment_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="apt.comment" const:escapeHTML="NO"/></dd></var:if>
</dl>
</div>
</var:if></td>
</tr>
<var:if condition="apt.comment.length"
><tr>
<th align="right" style="font-weight: bold;"><var:string label:value="comment_label" const:escapeHTML="NO"/></th>
<td><var:string value="apt.comment" const:escapeHTML="NO"/></td>
</tr>
</var:if>
</table>
</body>
</html>

View File

@ -8,23 +8,20 @@
<head>
<style type="text/css">
.container { max-width: 600px; }
h1 { font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc; }
.dl-horizontal dt { float: left; width: 120px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
dt { font-weight: bold; line-height: 17px; }
dt, dd { font-size: 12px; line-height: 18px; }
dt { display: block; }
h1, dd, .dl-list dt { margin-left: 130px; }
th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; font-size: 12px; line-height: 18px; }
</style>
</head>
<body>
<div class="container">
<h1><var:string value="getSubject" const:escapeHTML="NO"/></h1>
<dl class="dl-horizontal">
<dt></dt>
<dd><var:string value="bodyStartText" const:escapeHTML="NO"/></dd>
</dl>
</div>
<table cellpadding="2" cellspacing="2" border="0" style="width: 100%; max-width: 600px;">
<tr>
<th></th>
<td><h1 style="font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc;"><var:string
value="getSubject" const:escapeHTML="NO"/></h1></td>
</tr>
<tr>
<th></th>
<td><var:string value="bodyStartText" const:escapeHTML="NO"/></td>
</tr>
</table>
</body>
</html>

View File

@ -8,37 +8,41 @@
<head>
<style type="text/css">
.container { max-width: 600px; }
h1 { font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc; }
h1 small { font-size: 12px; color: #999; }
.dl-horizontal dt { float: left; width: 120px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
dt { font-weight: bold; line-height: 17px; }
dt, dd { font-size: 12px; line-height: 18px; }
dt { display: block; }
h1, dd, .dl-list dt { margin-left: 130px; }
th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; font-size: 12px; line-height: 18px; }
</style>
</head>
<body>
<div class="container">
<h1><var:string value="getSubject" const:escapeHTML="NO"/>
<small><var:string value="organizerName" const:escapeHTML="NO"/><var:string value="sentByText" const:escapeHTML="NO"/></small></h1>
<dl class="dl-horizontal">
<var:if condition="location.length"
><dt><var:string label:value="location_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="location" const:escapeHTML="NO"/></dd></var:if>
<dt><var:string label:value="startDate_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="formattedAptStartDate" const:escapeHTML="NO"
<table cellpadding="2" cellspacing="2" border="0" style="width: 100%; max-width: 600px;">
<tr>
<th></th>
<td><h1 style="font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc;"><var:string
value="getSubject" const:escapeHTML="NO"/> <small style="font-size: 12px; color: #999;"><var:string
value="organizerName" const:escapeHTML="NO"/><var:string value="sentByText" const:escapeHTML="NO"/></small></h1></td>
</tr>
<var:if condition="location.length"
><tr>
<th align="right" style="font-weight: bold;"><var:string label:value="location_label" const:escapeHTML="NO"/></th>
<td><var:string value="location" const:escapeHTML="NO"/></td>
</tr
></var:if>
<tr>
<th align="right" style="font-weight: bold;"><var:string label:value="startDate_label" const:escapeHTML="NO"/></th>
<td><var:string value="formattedAptStartDate" const:escapeHTML="NO"
/><var:if condition="formattedAptStartTime.length"> - <var:string value="formattedAptStartTime" const:escapeHTML="NO"/> <var:string value="viewTZ" const:escapeHTML="NO"/>
</var:if></dd>
<dt><var:string label:value="endDate_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="formattedAptEndDate" const:escapeHTML="NO"
</var:if></td>
</tr>
<tr>
<th align="right" style="font-weight: bold;"><var:string label:value="endDate_label" const:escapeHTML="NO"/></th>
<td><var:string value="formattedAptEndDate" const:escapeHTML="NO"
/><var:if condition="formattedAptEndTime.length"> - <var:string value="formattedAptEndTime" const:escapeHTML="NO"/> <var:string value="viewTZ" const:escapeHTML="NO"/>
</var:if></dd>
<var:if condition="apt.comment.length"
><dt><var:string label:value="comment_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="apt.comment" const:escapeHTML="NO"/></dd></var:if>
</dl>
</div>
</var:if></td>
</tr>
<var:if condition="apt.comment.length"
><tr>
<th align="right" style="font-weight: bold;"><var:string label:value="comment_label" const:escapeHTML="NO"/></th>
<td><var:string value="apt.comment" const:escapeHTML="NO"/></td>
</tr>
</var:if>
</table>
</body>
</html>

View File

@ -9,48 +9,72 @@
<head>
<style type="text/css">
.container { max-width: 600px; }
h1 { font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc; }
.dl-horizontal dt { float: left; width: 120px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
dt { font-weight: bold; line-height: 17px; }
dt, dd { font-size: 12px; line-height: 18px; }
dt { display: block; }
h1, dd, .dl-list dt { margin-left: 130px; }
th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; font-size: 12px; line-height: 18px; }
</style>
</head>
<body>
<div class="container">
<h1><var:string value="aptSummary" const:escapeHTML="NO"/></h1>
<dl class="dl-horizontal">
<dt><var:string label:value="calendar_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="calendarName" const:escapeHTML="NO"/></dd>
<var:if condition="apt.location.length"
><dt><var:string label:value="location_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="apt.location" const:escapeHTML="NO"/></dd></var:if>
<dt><var:string label:value="startDate_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="aptStartDate" const:escapeHTML="NO"/></dd>
<dt><var:string label:value="endDate_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="aptEndDate" const:escapeHTML="NO"/></dd>
</dl>
<table cellpadding="2" cellspacing="2" border="0" style="width: 100%; max-width: 600px;">
<tr>
<th></th>
<td><h1 style="font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc;"><var:string
value="aptSummary" const:escapeHTML="NO"/></h1></td>
</tr>
<tr>
<th align="right" style="font-weight: bold;"><var:string label:value="calendar_label" const:escapeHTML="NO"/></th>
<td><var:string value="calendarName" const:escapeHTML="NO"/></td>
</tr>
<var:if condition="apt.location.length"
><tr>
<th align="right" style="font-weight: bold;"><var:string label:value="location_label" const:escapeHTML="NO"/></th>
<td><var:string value="apt.location" const:escapeHTML="NO"/></td>
</tr></var:if>
<tr>
<th align="right" style="font-weight: bold;"><var:string label:value="startDate_label" const:escapeHTML="NO"/></th>
<td><var:string value="aptStartDate" const:escapeHTML="NO"/></td>
</tr>
<tr>
<th align="right" style="font-weight: bold;"><var:string label:value="endDate_label" const:escapeHTML="NO"/></th>
<td><var:string value="aptEndDate" const:escapeHTML="NO"/></td>
</tr>
<dl class="dl-list">
<var:if condition="updatedAttendees.count">
<dt><var:string label:value="The following attendees(s) were notified:" const:escapeHTML="NO"/></dt>
<var:foreach list="updatedAttendees" item="currentRecipient">
<dd><a var:href="currentRecipient.email"><var:string value="currentRecipient.cn" const:escapeHTML="NO"/></a></dd></var:foreach>
<var:if condition="updatedAttendees.count"
><tr>
<td></td>
<th align="left" style="font-weight: bold; padding-top: 9px;"><var:string
label:value="The following attendees(s) were notified:" const:escapeHTML="NO"/></th>
</tr>
<var:foreach list="updatedAttendees" item="currentRecipient">
<tr>
<td></td>
<td><a var:href="currentRecipient.email"><var:string value="currentRecipient.cn" const:escapeHTML="NO"/></a></td>
</tr></var:foreach>
</var:if>
<var:if condition="addedAttendees.count">
<dt><var:string label:value="The following attendees(s) were added:" const:escapeHTML="NO"/></dt>
<var:foreach list="addedAttendees" item="currentRecipient">
<dd><a var:href="currentRecipient.email"><var:string value="currentRecipient.cn" const:escapeHTML="NO"/></a></dd></var:foreach>
<var:if condition="addedAttendees.count"
><tr>
<td></td>
<th align="left" style="font-weight: bold; padding-top: 9px;"><var:string
label:value="The following attendees(s) were added:" const:escapeHTML="NO"/></th>
</tr>
<var:foreach list="addedAttendees" item="currentRecipient">
<tr>
<td></td>
<td><a var:href="currentRecipient.email"><var:string value="currentRecipient.cn" const:escapeHTML="NO"/></a></td>
</tr></var:foreach>
</var:if>
<var:if condition="deletedAttendees.count">
<dt><var:string label:value="The following attendees(s) were removed:" const:escapeHTML="NO"/></dt>
<var:foreach list="deletedAttendees" item="currentRecipient">
<dd><a var:href="currentRecipient.email"><var:string value="currentRecipient.cn" const:escapeHTML="NO"/></a></dd></var:foreach>
<var:if condition="deletedAttendees.count"
><tr>
<td></td>
<th align="left" style="font-weight: bold; padding-top: 9px;"><var:string
label:value="The following attendees(s) were removed:" const:escapeHTML="NO"/></th>
</tr>
<var:foreach list="deletedAttendees" item="currentRecipient">
<tr>
<td></td>
<td><a var:href="currentRecipient.email"><var:string value="currentRecipient.cn" const:escapeHTML="NO"/></a></td>
</tr></var:foreach>
</var:if>
</dl>
</div>
</table>
</body>
</html>

View File

@ -8,38 +8,31 @@
<head>
<style type="text/css">
.container { max-width: 600px; }
h1 { font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc; }
h1 small { font-size: 12px; color: #999; }
.dl-horizontal dt { float: left; width: 120px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
dt { font-weight: bold; line-height: 17px; }
dt, dd { font-size: 12px; line-height: 18px; }
dt { display: block; }
h1, dd, .dl-list dt { margin-left: 130px; }
th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; font-size: 12px; line-height: 18px; }
</style>
</head>
<body>
<div class="container">
<h1><var:string value="getSubject" const:escapeHTML="NO"/>
<small><var:string value="organizerName" const:escapeHTML="NO"/><var:string value="sentByText" const:escapeHTML="NO"/></small></h1>
<dl class="dl-horizontal">
<dt></dt>
<dd><var:string value="bodyStartText" const:escapeHTML="NO"/></dd>
</dl>
<dl class="dl-horizontal">
<table cellpadding="2" cellspacing="2" border="0" style="width: 100%; max-width: 600px;">
<tr>
<th></th>
<td><h1 style="font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc;"><var:string
value="getSubject" const:escapeHTML="NO"/> <small style="font-size: 12px; color: #999;"><var:string
value="organizerName" const:escapeHTML="NO"/><var:string value="sentByText" const:escapeHTML="NO"/></small></h1></td>
</tr>
<tr>
<th></th>
<td><var:string value="bodyStartText" const:escapeHTML="NO"/></td>
</tr>
<var:foreach list="allChangesList" item="currentItem"
><dt><var:string var:value="currentItem"/></dt>
<dd><var:string var:value="valueForCurrentItem"/></dd>
><tr>
<th align="right" style="font-weight: bold;"><var:string value="currentItem"/></th>
<td><var:string value="valueForCurrentItem"/></td>
</tr>
</var:foreach>
</dl>
<dl class="dl-horizontal">
<dt></dt>
<dd><var:string label:value="Please accept or decline those changes." const:escapeHTML="NO"/></dd>
</dl>
</div>
<tr>
<th></th>
<td><var:string label:value="Please accept or decline those changes." const:escapeHTML="NO"/></td>
</tr>
</table>
</body>
</html>