CRM-14340 - Fixes for iCals in event emails
[civicrm-core.git] / xml / templates / message_templates / event_offline_receipt_html.tpl
CommitLineData
6a488035
TO
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5 <title></title>
6</head>
7<body>
8
9{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
10{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
11{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
12
13<center>
14 <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
15
16 <!-- BEGIN HEADER -->
17 <!-- You can add table row(s) here with logo or other header elements -->
18 <!-- END HEADER -->
19
20 <!-- BEGIN CONTENT -->
21
22 <tr>
23 <td>
24
25 {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
26 <p>{$event.confirm_email_text|htmlize}</p>
27 {/if}
28
29 {if $isOnWaitlist}
30 <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
31 {if $isPrimary}
32 <p>{ts}If space becomes available you will receive an email with
33a link to a web page where you can complete your registration.{/ts}</p>
34 {/if}
35 {elseif $isRequireApproval}
36 <p>{ts}Your registration has been submitted.{/ts}</p>
37 {if $isPrimary}
38 <p>{ts}Once your registration has been reviewed, you will receive
39an email with a link to a web page where you can complete the
40registration process.{/ts}</p>
41 {/if}
42 {elseif $is_pay_later}
43 <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
44 {else}
45 <p>{ts}Please print this confirmation for your records.{/ts}</p>
46 {/if}
47
48 </td>
49 </tr>
50 <tr>
51 <td>
52 <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
53 <tr>
54 <th {$headerStyle}>
55 {ts}Event Information and Location{/ts}
56 </th>
57 </tr>
58 <tr>
59 <td colspan="2" {$valueStyle}>
60 {$event.event_title}<br />
61 {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
62 </td>
63 </tr>
64
65 {if $event.participant_role neq 'Attendee' and $defaultRole}
66 <tr>
67 <td {$labelStyle}>
68 {ts}Participant Role{/ts}
69 </td>
70 <td {$valueStyle}>
71 {$event.participant_role}
72 </td>
73 </tr>
74 {/if}
75
76 {if $isShowLocation}
77 <tr>
78 <td colspan="2" {$valueStyle}>
79 {if $location.address.1.name}
80 {$location.address.1.name}<br />
81 {/if}
82 {if $location.address.1.street_address}
83 {$location.address.1.street_address}<br />
84 {/if}
85 {if $location.address.1.supplemental_address_1}
86 {$location.address.1.supplemental_address_1}<br />
87 {/if}
88 {if $location.address.1.supplemental_address_2}
89 {$location.address.1.supplemental_address_2}<br />
90 {/if}
91 {if $location.address.1.city}
92 {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
93 {/if}
94 </td>
95 </tr>
96 {/if}
97
98 {if $location.phone.1.phone || $location.email.1.email}
99 <tr>
100 <td colspan="2" {$labelStyle}>
101 {ts}Event Contacts:{/ts}
102 </td>
103 </tr>
104 {foreach from=$location.phone item=phone}
105 {if $phone.phone}
106 <tr>
107 <td {$labelStyle}>
108 {if $phone.phone_type}
109 {$phone.phone_type_display}
110 {else}
111 {ts}Phone{/ts}
112 {/if}
113 </td>
114 <td {$valueStyle}>
5d9ebb64 115 {$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if}
6a488035
TO
116 </td>
117 </tr>
118 {/if}
119 {/foreach}
120 {foreach from=$location.email item=eventEmail}
121 {if $eventEmail.email}
122 <tr>
123 <td {$labelStyle}>
124 {ts}Email{/ts}
125 </td>
126 <td {$valueStyle}>
127 {$eventEmail.email}
128 </td>
129 </tr>
130 {/if}
131 {/foreach}
132 {/if}
4de4dbe9 133 {if $event.is_public}
6a488035
TO
134 <tr>
135 <td colspan="2" {$valueStyle}>
136 {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
137 <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
138 </td>
139 </tr>
4de4dbe9 140 {/if}
6a488035
TO
141 {if $email}
142 <tr>
143 <th {$headerStyle}>
144 {ts}Registered Email{/ts}
145 </th>
146 </tr>
147 <tr>
148 <td colspan="2" {$valueStyle}>
149 {$email}
150 </td>
151 </tr>
152 {/if}
153
154
155 {if $event.is_monetary}
156
157 <tr>
158 <th {$headerStyle}>
159 {$event.fee_label}
160 </th>
161 </tr>
162
163 {if $lineItem}
164 {foreach from=$lineItem item=value key=priceset}
165 {if $value neq 'skip'}
166 {if $isPrimary}
167 {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
168 <tr>
169 <td colspan="2" {$labelStyle}>
170 {ts 1=$priceset+1}Participant %1{/ts}
171 </td>
172 </tr>
173 {/if}
174 {/if}
175 <tr>
176 <td colspan="2" {$valueStyle}>
177 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
178 <tr>
179 <th>{ts}Item{/ts}</th>
180 <th>{ts}Qty{/ts}</th>
181 <th>{ts}Each{/ts}</th>
182 <th>{ts}Total{/ts}</th>
011aeb62 183 {if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
6a488035
TO
184 </tr>
185 {foreach from=$value item=line}
186 <tr>
187 <td>
011aeb62 188 {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
6a488035
TO
189 </td>
190 <td>
191 {$line.qty}
192 </td>
193 <td>
194 {$line.unit_price|crmMoney}
195 </td>
196 <td>
197 {$line.line_total|crmMoney}
198 </td>
011aeb62 199 {if $pricesetFieldsCount }
200 <td>
201 {$line.participant_count}
6a488035 202 </td>
011aeb62 203 {/if}
6a488035
TO
204 </tr>
205 {/foreach}
206 </table>
207 </td>
208 </tr>
209 {/if}
210 {/foreach}
211 {/if}
212
213 {if $amount && !$lineItem}
214 {foreach from=$amount item=amnt key=level}
215 <tr>
216 <td colspan="2" {$valueStyle}>
217 {$amnt.amount|crmMoney} {$amnt.label}
218 </td>
219 </tr>
220 {/foreach}
221 {/if}
222 {if $isPrimary}
223 <tr>
224 <td {$labelStyle}>
81f3d017
PJ
225 {if $balanceAmount}
226 {ts}Total Paid{/ts}
227 {else}
228 {ts}Total Amount{/ts}
229 {/if}
6a488035
TO
230 </td>
231 <td {$valueStyle}>
232 {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
233 </td>
234 </tr>
81f3d017
PJ
235 {if $balanceAmount}
236 <tr>
237 <td {$labelStyle}>
238 {ts}Balance{/ts}
239 </td>
240 <td {$valueStyle}>
241 {$balanceAmount|crmMoney}
242 </td>
243 </tr>
244 {/if}
6a488035
TO
245 {if $pricesetFieldsCount }
246 <tr>
011aeb62 247 <td {$labelStyle}>
248 {ts}Total Participants{/ts}</td>
6a488035 249 <td {$valueStyle}>
011aeb62 250 {assign var="count" value= 0}
6a488035
TO
251 {foreach from=$lineItem item=pcount}
252 {assign var="lineItemCount" value=0}
253 {if $pcount neq 'skip'}
254 {foreach from=$pcount item=p_count}
255 {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
256 {/foreach}
257 {if $lineItemCount < 1 }
258 assign var="lineItemCount" value=1}
011aeb62 259 {/if}
6a488035
TO
260 {assign var="count" value=$count+$lineItemCount}
261 {/if}
262 {/foreach}
011aeb62 263 {$count}
6a488035
TO
264 </td>
265 </tr>
266 {/if}
267 {if $is_pay_later}
268 <tr>
269 <td colspan="2" {$labelStyle}>
270 {$pay_later_receipt}
271 </td>
272 </tr>
273 {/if}
274
275 {if $register_date}
276 <tr>
277 <td {$labelStyle}>
278 {ts}Registration Date{/ts}
279 </td>
280 <td {$valueStyle}>
281 {$register_date|crmDate}
282 </td>
283 </tr>
284 {/if}
285
286 {if $receive_date}
287 <tr>
288 <td {$labelStyle}>
289 {ts}Transaction Date{/ts}
290 </td>
291 <td {$valueStyle}>
292 {$receive_date|crmDate}
293 </td>
294 </tr>
295 {/if}
296
297 {if $contributionTypeName}
298 <tr>
299 <td {$labelStyle}>
300 {ts}Financial Type{/ts}
301 </td>
302 <td {$valueStyle}>
303 {$contributionTypeName}
304 </td>
305 </tr>
306 {/if}
307
308 {if $trxn_id}
309 <tr>
310 <td {$labelStyle}>
311 {ts}Transaction #{/ts}
312 </td>
313 <td {$valueStyle}>
314 {$trxn_id}
315 </td>
316 </tr>
317 {/if}
318
319 {if $paidBy}
320 <tr>
321 <td {$labelStyle}>
322 {ts}Paid By{/ts}
323 </td>
324 <td {$valueStyle}>
325 {$paidBy}
326 </td>
327 </tr>
328 {/if}
329
330 {if $checkNumber}
331 <tr>
332 <td {$labelStyle}>
333 {ts}Check Number{/ts}
334 </td>
335 <td {$valueStyle}>
336 {$checkNumber}
337 </td>
338 </tr>
339 {/if}
340
341 {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
342 <tr>
343 <th {$headerStyle}>
344 {ts}Billing Name and Address{/ts}
345 </th>
346 </tr>
347 <tr>
348 <td colspan="2" {$valueStyle}>
349 {$billingName}<br />
350 {$address|nl2br}
351 </td>
352 </tr>
353 {/if}
354
355 {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
356 <tr>
357 <th {$headerStyle}>
358 {ts}Credit Card Information{/ts}
359 </th>
360 </tr>
361 <tr>
362 <td colspan="2" {$valueStyle}>
363 {$credit_card_type}<br />
364 {$credit_card_number}<br />
365 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
366 </td>
367 </tr>
368 {/if}
369
370 {/if}
371
372 {/if} {* End of conditional section for Paid events *}
373
374 {if $customPre}
375 <tr>
376 <th {$headerStyle}>
377 {$customPre_grouptitle}
378 </th>
379 </tr>
380 {foreach from=$customPre item=value key=customName}
381 {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
382 <tr>
383 <td {$labelStyle}>
384 {$customName}
385 </td>
386 <td {$valueStyle}>
387 {$value}
388 </td>
389 </tr>
390 {/if}
391 {/foreach}
392 {/if}
393
394 {if $customPost}
395 <tr>
396 <th {$headerStyle}>
397 {$customPost_grouptitle}
398 </th>
399 </tr>
400 {foreach from=$customPost item=value key=customName}
401 {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
402 <tr>
403 <td {$labelStyle}>
404 {$customName}
405 </td>
406 <td {$valueStyle}>
407 {$value}
408 </td>
409 </tr>
410 {/if}
411 {/foreach}
412 {/if}
413
414 {if $customProfile}
415 {foreach from=$customProfile item=value key=customName}
416 <tr>
417 <th {$headerStyle}>
418 {ts 1=$customName+1}Participant Information - Participant %1{/ts}
419 </th>
420 </tr>
421 {foreach from=$value item=val key=field}
422 {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
423 <tr>
424 <td colspan="2" {$labelStyle}>
425 {if $field eq 'additionalCustomPre'}
426 {$additionalCustomPre_grouptitle}
427 {else}
428 {$additionalCustomPost_grouptitle}
429 {/if}
430 </td>
431 </tr>
432 {foreach from=$val item=v key=f}
433 <tr>
434 <td {$labelStyle}>
435 {$f}
436 </td>
437 <td {$valueStyle}>
438 {$v}
439 </td>
440 </tr>
441 {/foreach}
442 {/if}
443 {/foreach}
444 {/foreach}
445 {/if}
446
447 {if $customGroup}
448 {foreach from=$customGroup item=value key=customName}
449 <tr>
450 <th {$headerStyle}>
451 {$customName}
452 </th>
453 </tr>
454 {foreach from=$value item=v key=n}
455 <tr>
456 <td {$labelStyle}>
457 {$n}
458 </td>
459 <td {$valueStyle}>
460 {$v}
461 </td>
462 </tr>
463 {/foreach}
464 {/foreach}
465 {/if}
466
467 </table>
468 </td>
469 </tr>
470
471 </table>
472</center>
473
474</body>
475</html>