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