Merge pull request #18327 from civicrm/5.29
[civicrm-core.git] / templates / CRM / Case / Audit / Report.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 <html xmlns="http://www.w3.org/1999/xhtml" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
11 <head>
12 <title>{$pageTitle}</title>
13 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
14 <base href="{crmURL p="" a=1}" /><!--[if IE]></base><![endif]-->
15 <style type="text/css" media="screen, print">@import url({$config->userFrameworkResourceURL}css/print.css);</style>
16 </head>
17
18 <body>
19 <div id="crm-container" class="crm-container">
20 <h1>{$pageTitle}</h1>
21 <div id="report-date">{$reportDate}</div>
22 {if $case}
23 <h2>{ts}Case Summary{/ts}</h2>
24 <table class="report-layout">
25 <tr>
26 <th class="reports-header">{ts}Client{/ts}</th>
27 <th class="reports-header">{ts}Case Type{/ts}</th>
28 <th class="reports-header">{ts}Status{/ts}</th>
29 <th class="reports-header">{ts}Start Date{/ts}</th>
30 <th class="reports-header">{ts}Case ID{/ts}</th>
31 </tr>
32 <tr>
33 <td class="crm-case-report-clientName">{$case.clientName}</td>
34 <td class="crm-case-report-caseType">{$case.caseType}</td>
35 <td class="crm-case-report-status">{$case.status}</td>
36 <td class="crm-case-report-start_date">{$case.start_date}</td>
37 <td class="crm-case-report-{$caseId}">{$caseId}</td>
38 </tr>
39 </table>
40 {/if}
41
42 {if $caseRelationships}
43 <h2>{ts}Case Roles{/ts}</h2>
44 <table class ="report-layout">
45 <tr>
46 <th class="reports-header">{ts}Case Role{/ts}</th>
47 <th class="reports-header">{ts}Name{/ts}</th>
48 <th class="reports-header">{ts}Phone{/ts}</th>
49 <th class="reports-header">{ts}Email{/ts}</th>
50 </tr>
51
52 {foreach from=$caseRelationships item=row key=relId}
53 <tr>
54 <td class="crm-case-report-caserelationships-relation">{$row.relation}</td>
55 <td class="crm-case-report-caserelationships-name">{$row.name}</td>
56 <td class="crm-case-report-caserelationships-phone">{$row.phone}</td>
57 <td class="crm-case-report-caserelationships-email">{$row.email}</td>
58 </tr>
59 {/foreach}
60 {foreach from=$caseRoles item=relName key=relTypeID}
61 {if $relTypeID neq 'client'}
62 <tr>
63 <td>{$relName}</td>
64 <td>{ts}(not assigned){/ts}</td>
65 <td></td>
66 <td></td>
67 </tr>
68 {else}
69 <tr>
70 <td class="crm-case-report-caseroles-role">{$relName.role}</td>
71 <td class="crm-case-report-caseroles-sort_name">{$relName.sort_name}</td>
72 <td class="crm-case-report-caseroles-phone">{$relName.phone}</td>
73 <td class="crm-case-report-caseroles-email">{$relName.email}</td>
74 </tr>
75 {/if}
76 {/foreach}
77 </table>
78 <br />
79 {/if}
80 {if $otherRelationships}
81 <table class ="report-layout">
82 <tr>
83 <th class="reports-header">{ts}Client Relationship{/ts}</th>
84 <th class="reports-header">{ts}Name{/ts}</th>
85 <th class="reports-header">{ts}Phone{/ts}</th>
86 <th class="reports-header">{ts}Email{/ts}</th>
87 </tr>
88 {foreach from=$otherRelationships item=row key=relId}
89 <tr>
90 <td class="crm-case-report-otherrelationships-relation">{$row.relation}</td>
91 <td class="crm-case-report-otherrelationships-name">{$row.name}</td>
92 <td class="crm-case-report-otherrelationships-phone">{$row.phone}</td>
93 <td class="crm-case-report-otherrelationships-email">{$row.email}</td>
94 </tr>
95 {/foreach}
96 </table>
97 <br />
98 {/if}
99
100 {if $globalRelationships}
101 <table class ="report-layout">
102 <tr>
103 <th class="reports-header">{$globalGroupInfo.title}</th>
104 <th class="reports-header">{ts}Phone{/ts}</th>
105 <th class="reports-header">{ts}Email{/ts}</th>
106 </tr>
107 {foreach from=$globalRelationships item=row key=relId}
108 <tr>
109 <td class="crm-case-report-globalrelationships-sort_name">{$row.sort_name}</td>
110 <td class="crm-case-report-globalrelationships-phone">{$row.phone}</td>
111 <td class="crm-case-report-globalrelationships-email">{$row.email}</td>
112 </tr>
113 {/foreach}
114 </table>
115 {/if}
116
117 {if $caseCustomFields}
118 {foreach from=$caseCustomFields item=group}
119 <h2>{$group.title}</h2>
120 <table class ="report-layout">
121 {foreach from=$group.values item=row}
122 <tr>
123 <th class="label">{$row.label}</td>
124 <td class="crm-case-report-custom-field">{$row.value}</td>
125 </tr>
126 {/foreach}
127 </table>
128 {/foreach}
129 {/if}
130
131 {if $activities}
132 <h2>{ts}Case Activities{/ts}</h2>
133 {foreach from=$activities item=activity key=key}
134 <table class ="report-layout">
135 {foreach from=$activity item=field}
136 {* TODO: Using an unmunged field in the css class would have always been problematic? Since it sometimes has spaces. *}
137 <tr class="crm-case-report-activity-{$field.name}">
138 <th scope="row" class="label">{$field.label|escape}</th>
139 {if $field.name eq 'Activity Type' or $field.name eq 'Status'}
140 <td class="bold">{$field.value|escape}</td>
141 {* TODO: See note in CRM/Case/XMLProcessor/Report.php: Subject is already escaped in the php file so that's why it's not escaped here, but should that be reversed? *}
142 {elseif $field.name eq 'Details' or $field.name eq 'Subject'}
143 <td>{$field.value}</td>
144 {else}
145 <td>{$field.value|escape}</td>
146 {/if}
147 </tr>
148 {/foreach}
149 </table>
150 <br />
151 {/foreach}
152 {/if}
153 </div>
154 </body>
155 </html>