Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
6b83d5bd | 5 | | Copyright CiviCRM LLC (c) 2004-2019 | |
6a488035 TO |
6 | +--------------------------------------------------------------------+ |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
9 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
10 | | under the terms of the GNU Affero General Public License | | |
11 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
12 | | | | |
13 | | CiviCRM is distributed in the hope that it will be useful, but | | |
14 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
15 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
16 | | See the GNU Affero General Public License for more details. | | |
17 | | | | |
18 | | You should have received a copy of the GNU Affero General Public | | |
19 | | License and the CiviCRM Licensing Exception along | | |
20 | | with this program; if not, contact CiviCRM LLC | | |
21 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
22 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
23 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
24 | +--------------------------------------------------------------------+ | |
25 | *} | |
26 | {* CiviCase - view case screen*} | |
27 | ||
6a488035 | 28 | <div class="crm-block crm-form-block crm-case-caseview-form-block"> |
6a488035 | 29 | |
ad280fb6 JL |
30 | {* here we are showing related cases w/ jquery dialog *} |
31 | {if $showRelatedCases} | |
32 | {include file="CRM/Case/Form/ViewRelatedCases.tpl"} | |
33 | {* Main case view *} | |
34 | {else} | |
80bc2820 | 35 | |
ad280fb6 JL |
36 | <h3>{ts}Summary{/ts}</h3> |
37 | <table class="report crm-entity case-summary" data-entity="case" data-id="{$caseID}" data-cid="{$contactID}"> | |
38 | {if $multiClient} | |
39 | <tr class="crm-case-caseview-client"> | |
40 | <td colspan="5" class="label"> | |
41 | {ts}Clients:{/ts} | |
42 | {foreach from=$caseRoles.client item=client name=clients} | |
43 | <a href="{crmURL p='civicrm/contact/view' q="action=view&reset=1&cid=`$client.contact_id`"}" title="{ts}View contact record{/ts}">{$client.display_name}</a>{if not $smarty.foreach.clients.last}, {/if} | |
6a488035 | 44 | {/foreach} |
ad280fb6 | 45 | <a href="#addClientDialog" class="crm-hover-button case-miniform" title="{ts}Add Client{/ts}" data-key="{crmKey name='civicrm/case/ajax/addclient'}"> |
a2c70872 | 46 | <i class="crm-i fa-user-plus"></i> |
ad280fb6 JL |
47 | </a> |
48 | <div id="addClientDialog" class="hiddenElement"> | |
e7e57280 | 49 | <input name="add_client_id" placeholder="{ts}- select contact -{/ts}" class="huge" data-api-params='{ldelim}"params": {ldelim}"contact_type": "{$contactType}"{rdelim}{rdelim}' /> |
ad280fb6 JL |
50 | </div> |
51 | {if $hasRelatedCases} | |
52 | <div class="crm-block relatedCases-link"><a class="crm-hover-button crm-popup medium-popup" href="{$relatedCaseUrl}">{$relatedCaseLabel}</a></div> | |
53 | {/if} | |
54 | </td> | |
55 | </tr> | |
6a488035 | 56 | {/if} |
ad280fb6 JL |
57 | <tr> |
58 | {if not $multiClient} | |
59 | <td> | |
60 | <table class="form-layout-compressed"> | |
61 | {foreach from=$caseRoles.client item=client} | |
62 | <tr class="crm-case-caseview-display_name"> | |
7a1989f8 MWMC |
63 | <td class="label-left bold" style="padding: 0px; border: none;"> |
64 | <a href="{crmURL p='civicrm/contact/view' q="action=view&reset=1&cid=`$client.contact_id`"}" title="{ts}View contact record{/ts}">{$client.display_name}</a> | |
65 | </td> | |
ad280fb6 JL |
66 | </tr> |
67 | {if $client.phone} | |
68 | <tr class="crm-case-caseview-phone"> | |
69 | <td class="label-left description" style="padding: 1px">{$client.phone}</td> | |
70 | </tr> | |
71 | {/if} | |
72 | {if $client.birth_date} | |
73 | <tr class="crm-case-caseview-birth_date"> | |
74 | <td class="label-left description" style="padding: 1px">{ts}DOB{/ts}: {$client.birth_date|crmDate}</td> | |
75 | </tr> | |
76 | {/if} | |
77 | {/foreach} | |
78 | </table> | |
79 | {if $hasRelatedCases} | |
80 | <div class="crm-block relatedCases-link"><a class="crm-hover-button crm-popup medium-popup" href="{$relatedCaseUrl}">{$relatedCaseLabel}</a></div> | |
81 | {/if} | |
82 | </td> | |
83 | {/if} | |
84 | <td class="crm-case-caseview-case_subject label"> | |
ccfd6962 | 85 | <span class="crm-case-summary-label">{ts}Subject{/ts}:</span> <span class="crm-editable" data-field="subject">{$caseDetails.case_subject}</span> |
ad280fb6 JL |
86 | </td> |
87 | <td class="crm-case-caseview-case_type label"> | |
a2c70872 | 88 | <span class="crm-case-summary-label">{ts}Type{/ts}:</span> {$caseDetails.case_type} <a class="crm-hover-button crm-popup" href="{crmURL p='civicrm/case/activity' q="action=add&reset=1&cid=`$contactId`&caseid=`$caseId`&selectedChild=activity&atype=`$changeCaseTypeId`"}" title="{ts}Change case type (creates activity record){/ts}"><i class="crm-i fa-pencil"></i></a> |
ad280fb6 JL |
89 | </td> |
90 | <td class="crm-case-caseview-case_status label"> | |
a2c70872 | 91 | <span class="crm-case-summary-label">{ts}Status{/ts}:</span> {$caseDetails.case_status} <a class="crm-hover-button crm-popup" href="{crmURL p='civicrm/case/activity' q="action=add&reset=1&cid=`$contactId`&caseid=`$caseId`&selectedChild=activity&atype=`$changeCaseStatusId`"}" title="{ts}Change case status (creates activity record){/ts}"><i class="crm-i fa-pencil"></i></a> |
ad280fb6 JL |
92 | </td> |
93 | <td class="crm-case-caseview-case_start_date label"> | |
a2c70872 | 94 | <span class="crm-case-summary-label">{ts}Open Date{/ts}:</span> {$caseDetails.case_start_date|crmDate} <a class="crm-hover-button crm-popup" href="{crmURL p='civicrm/case/activity' q="action=add&reset=1&cid=`$contactId`&caseid=`$caseId`&selectedChild=activity&atype=`$changeCaseStartDateId`"}" title="{ts}Change case start date (creates activity record){/ts}"><i class="crm-i fa-pencil"></i></a> |
ad280fb6 JL |
95 | </td> |
96 | <td class="crm-case-caseview-{$caseID} label"> | |
97 | <span class="crm-case-summary-label">{ts}ID{/ts}:</span> {$caseID} | |
98 | </td> | |
99 | </tr> | |
100 | </table> | |
6a488035 | 101 | {if $hookCaseSummary} |
5b141f20 | 102 | <div id="caseSummary" class="crm-clearfix"> |
ad280fb6 JL |
103 | {foreach from=$hookCaseSummary item=val key=div_id} |
104 | <div id="{$div_id}"><label>{$val.label}</label><div class="value">{$val.value}</div></div> | |
105 | {/foreach} | |
106 | </div> | |
6a488035 TO |
107 | {/if} |
108 | ||
ad280fb6 JL |
109 | <div class="case-control-panel"> |
110 | <div> | |
111 | <p> | |
112 | {$form.add_activity_type_id.html} | |
113 | {if $hasAccessToAllCases} | |
114 | {$form.timeline_id.html}{$form._qf_CaseView_next.html} | |
115 | {$form.report_id.html} | |
116 | {/if} | |
117 | </p> | |
118 | </div> | |
119 | <div> | |
120 | <p> | |
121 | {if $hasAccessToAllCases} | |
a2c70872 | 122 | <a class="crm-hover-button action-item no-popup" href="{crmURL p='civicrm/case/report/print' q="all=1&redact=0&cid=$contactID&caseID=$caseId&asn=standard_timeline"}"><i class="crm-i fa-print"></i> {ts}Print Report{/ts}</a> |
ad280fb6 | 123 | {/if} |
80bc2820 | 124 | |
e43d5206 CW |
125 | {if !empty($exportDoc)} |
126 | <a class="crm-hover-button action-item" href="{$exportDoc}"><i class="crm-i fa-file-pdf-o"></i> {ts}Export Document{/ts}</a> | |
127 | {/if} | |
128 | ||
ad280fb6 | 129 | {if $mergeCases} |
a2c70872 | 130 | <a href="#mergeCasesDialog" class="action-item no-popup crm-hover-button case-miniform"><i class="crm-i fa-compress"></i> {ts}Merge Case{/ts}</a> |
ad280fb6 JL |
131 | {$form._qf_CaseView_next_merge_case.html} |
132 | <span id="mergeCasesDialog" class="hiddenElement"> | |
133 | {$form.merge_case_id.html} | |
134 | </span> | |
135 | {/if} | |
80bc2820 | 136 | |
ad280fb6 | 137 | {if call_user_func(array('CRM_Core_Permission','giveMeAllACLs'))} |
a2c70872 | 138 | <a class="action-item crm-hover-button medium-popup" href="{crmURL p='civicrm/contact/view/case/editClient' h=1 q="reset=1&action=update&id=$caseID&cid=$contactID"}"><i class="crm-i fa-user"></i> {ts}Assign to Another Client{/ts}</a> |
ad280fb6 JL |
139 | {/if} |
140 | </p> | |
141 | </div> | |
2a06342c | 142 | </div> |
6a488035 | 143 | |
ad280fb6 JL |
144 | <div class="clear"></div> |
145 | {include file="CRM/Case/Page/CustomDataView.tpl"} | |
6a488035 | 146 | |
ad280fb6 JL |
147 | <div class="crm-accordion-wrapper collapsed crm-case-roles-block"> |
148 | <div class="crm-accordion-header"> | |
149 | {ts}Roles{/ts} | |
150 | </div><!-- /.crm-accordion-header --> | |
151 | <div class="crm-accordion-body"> | |
80bc2820 | 152 | |
ad280fb6 JL |
153 | {if $hasAccessToAllCases} |
154 | <div class="crm-submit-buttons"> | |
a2c70872 | 155 | <a class="button case-miniform" href="#addCaseRoleDialog" data-key="{crmKey name='civicrm/ajax/relation'}" rel="#caseRoles-selector-{$caseID}"><i class="crm-i fa-plus-circle"></i> {ts}Add new role{/ts}</a> |
ad280fb6 JL |
156 | </div> |
157 | <div id="addCaseRoleDialog" class="hiddenElement"> | |
158 | <div>{$form.role_type.label}</div> | |
159 | <div>{$form.role_type.html}</div><br /> | |
160 | <div><label for="add_role_contact_id">{ts}Assign To{/ts}:</label></div> | |
0004ae05 | 161 | <div><input name="add_role_contact_id" placeholder="{ts}- first select relationship type -{/ts}" class="huge" /></div> |
ad280fb6 | 162 | </div> |
2a06342c | 163 | {/if} |
80bc2820 | 164 | |
ad280fb6 JL |
165 | <div id="editCaseRoleDialog" class="hiddenElement"> |
166 | <div><label for="edit_role_contact_id">{ts}Change To{/ts}:</label></div> | |
167 | <div><input name="edit_role_contact_id" placeholder="{ts}- select contact -{/ts}" class="huge" /></div> | |
c91df8b4 | 168 | </div> |
80bc2820 | 169 | |
ad280fb6 JL |
170 | <table id="caseRoles-selector-{$caseID}" class="report-layout crm-ajax-table" data-page-length="10"> |
171 | <thead> | |
172 | <tr> | |
173 | <th data-data="relation">{ts}Case Role{/ts}</th> | |
174 | <th data-data="name">{ts}Name{/ts}</th> | |
175 | <th data-data="phone">{ts}Phone{/ts}</th> | |
176 | <th data-data="email">{ts}Email{/ts}</th> | |
177 | {if $relId neq 'client' and $hasAccessToAllCases} | |
178 | <th data-data="actions" data-orderable="false">{ts}Actions{/ts}</th> | |
179 | {/if} | |
180 | </tr> | |
181 | </thead> | |
182 | </table> | |
183 | {literal} | |
184 | <script type="text/javascript"> | |
185 | (function($) { | |
186 | var caseId = {/literal}{$caseID}{literal}; | |
187 | CRM.$('table#caseRoles-selector-' + caseId).data({ | |
188 | "ajax": { | |
189 | "url": {/literal}'{crmURL p="civicrm/ajax/caseroles" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal} | |
190 | } | |
191 | }); | |
192 | })(CRM.$); | |
193 | </script> | |
194 | {/literal} | |
80bc2820 | 195 | |
ad280fb6 | 196 | <div id="deleteCaseRoleDialog" class="hiddenElement"> |
0004ae05 | 197 | {ts}Are you sure you want to end this relationship?{/ts} |
6a488035 | 198 | </div> |
80bc2820 | 199 | |
ad280fb6 JL |
200 | </div><!-- /.crm-accordion-body --> |
201 | </div><!-- /.crm-accordion-wrapper --> | |
6a488035 TO |
202 | |
203 | {if $hasAccessToAllCases} | |
204 | <div class="crm-accordion-wrapper collapsed crm-case-other-relationships-block"> | |
205 | <div class="crm-accordion-header"> | |
206 | {ts}Other Relationships{/ts} | |
207 | </div><!-- /.crm-accordion-header --> | |
208 | <div class="crm-accordion-body"> | |
f7296a9a | 209 | <div class="crm-submit-buttons"> |
80bc2820 | 210 | {crmButton p='civicrm/contact/view/rel' q="action=add&reset=1&cid=`$contactId`&caseID=`$caseID`" icon="plus-circle"}{ts}Add client relationship{/ts}{/crmButton} |
f7296a9a | 211 | </div> |
ad280fb6 JL |
212 | <table id="clientRelationships-selector-{$caseID}" class="report-layout crm-ajax-table" data-page-length="10"> |
213 | <thead> | |
214 | <tr> | |
215 | <th data-data="relation">{ts}Client Relationship{/ts}</th> | |
216 | <th data-data="name">{ts}Name{/ts}</th> | |
217 | <th data-data="phone">{ts}Phone{/ts}</th> | |
218 | <th data-data="email">{ts}Email{/ts}</th> | |
219 | </tr> | |
220 | </thead> | |
221 | </table> | |
222 | {literal} | |
223 | <script type="text/javascript"> | |
224 | (function($) { | |
225 | var caseId = {/literal}{$caseID}{literal}; | |
226 | CRM.$('table#clientRelationships-selector-' + caseId).data({ | |
227 | "ajax": { | |
228 | "url": {/literal}'{crmURL p="civicrm/ajax/clientrelationships" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal} | |
229 | } | |
230 | }); | |
231 | })(CRM.$); | |
232 | </script> | |
233 | {/literal} | |
6a488035 | 234 | <br /> |
d79c94d5 | 235 | {if !empty($globalGroupInfo.id)} |
6a488035 | 236 | <div class="crm-submit-buttons"> |
2c68626a | 237 | <a class="button case-miniform" href="#addMembersToGroupDialog" rel="#globalRelationships-selector-{$caseId}" data-group_id="{$globalGroupInfo.id}"> |
a2c70872 | 238 | <i class="crm-i fa-plus-circle"></i> {ts 1=$globalGroupInfo.title}Add members to %1{/ts} |
c91df8b4 | 239 | </a> |
6a488035 | 240 | </div> |
d79c94d5 | 241 | <div id="addMembersToGroupDialog" class="hiddenElement"> |
ba9be71a | 242 | <input name="add_member_to_group_contact_id" placeholder="{ts}- select contacts -{/ts}" class="huge" /> |
d79c94d5 | 243 | </div> |
ad280fb6 JL |
244 | <table id="globalRelationships-selector-{$caseId}" class="report-layout crm-ajax-table" data-page-length="10"> |
245 | <thead> | |
246 | <tr> | |
247 | <th data-data="sort_name">{$globalGroupInfo.title}</th> | |
248 | <th data-data="phone">{ts}Phone{/ts}</th> | |
249 | <th data-data="email">{ts}Email{/ts}</th> | |
250 | </tr> | |
251 | </thead> | |
6a488035 | 252 | </table> |
ad280fb6 JL |
253 | {literal} |
254 | <script type="text/javascript"> | |
255 | (function($) { | |
256 | var caseId = {/literal}{$caseID}{literal}; | |
257 | CRM.$('table#globalRelationships-selector-' + caseId).data({ | |
258 | "ajax": { | |
259 | "url": {/literal}'{crmURL p="civicrm/ajax/globalrelationships" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal} | |
260 | } | |
261 | }); | |
262 | })(CRM.$); | |
263 | </script> | |
264 | {/literal} | |
6a488035 TO |
265 | {/if} |
266 | ||
ad280fb6 | 267 | </div><!-- /.crm-accordion-body --> |
6a488035 TO |
268 | </div><!-- /.crm-accordion-wrapper --> |
269 | ||
270 | {/if} {* other relationship section ends *} | |
6a488035 | 271 | {include file="CRM/Case/Form/ActivityToCase.tpl"} |
6a488035 TO |
272 | |
273 | {* pane to display / edit regular tags or tagsets for cases *} | |
79564bd4 | 274 | {if $showTags} |
6a488035 TO |
275 | <div id="casetags" class="crm-accordion-wrapper crm-case-tags-block"> |
276 | <div class="crm-accordion-header"> | |
277 | {ts}Case Tags{/ts} | |
278 | </div><!-- /.crm-accordion-header --> | |
279 | <div class="crm-accordion-body"> | |
6a488035 | 280 | {if $tags} |
b733747a CW |
281 | <p class="crm-block crm-content-block crm-case-caseview-display-tags"> |
282 | | |
283 | {foreach from=$tags item='tag'} | |
284 | <span class="crm-tag-item" {if !empty($tag.color)}style="background-color: {$tag.color}; color: {$tag.color|colorContrast};"{/if}> | |
285 | {$tag.text} | |
286 | </span> | |
287 | {/foreach} | |
288 | </p> | |
6a488035 TO |
289 | {/if} |
290 | ||
79564bd4 CW |
291 | {foreach from=$tagSetTags item=displayTagset} |
292 | <p class="crm-block crm-content-block crm-case-caseview-display-tagset"> | |
293 | <strong>{$displayTagset.name}:</strong> | |
294 | {', '|implode:$displayTagset.items} | |
295 | </p> | |
6a488035 TO |
296 | {/foreach} |
297 | ||
79564bd4 | 298 | {if !$tags && !$tagSetTags } |
6a488035 TO |
299 | <div class="status"> |
300 | {ts}There are no tags currently assigned to this case.{/ts} | |
301 | </div> | |
302 | {/if} | |
303 | ||
6ce08914 | 304 | <div class="crm-submit-buttons"> |
79564bd4 CW |
305 | <a class="button case-miniform" href="#manageTagsDialog" data-key="{crmKey name='civicrm/case/ajax/processtags'}"> |
306 | {if $tags || $tagSetTags}{ts}Edit Tags{/ts}{else}{ts}Add Tags{/ts}{/if} | |
307 | </a> | |
6ce08914 | 308 | </div> |
6a488035 TO |
309 | |
310 | </div><!-- /.crm-accordion-body --> | |
311 | </div><!-- /.crm-accordion-wrapper --> | |
312 | ||
c91df8b4 | 313 | <div id="manageTagsDialog" class="hiddenElement"> |
6a488035 TO |
314 | <div class="label">{$form.case_tag.label}</div> |
315 | <div class="view-value"><div class="crm-select-container">{$form.case_tag.html}</div> | |
316 | <br/> | |
6d538af3 | 317 | <div style="text-align:left;">{include file="CRM/common/Tagset.tpl" tagsetType='case'}</div> |
6a488035 TO |
318 | <br/> |
319 | <div class="clear"></div> | |
320 | </div> | |
321 | </div> | |
322 | ||
6a488035 TO |
323 | {/if} {* end of tag block*} |
324 | ||
fc7d8951 | 325 | {include file="CRM/Case/Form/ActivityTab.tpl"} |
6a488035 TO |
326 | |
327 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> | |
6a488035 TO |
328 | {/if} {* view related cases if end *} |
329 | </div> | |
ccfd6962 CW |
330 | {literal} |
331 | <style type="text/css"> | |
332 | .crm-case-caseview-case_subject span.crm-editable { | |
333 | padding-right: 32px; | |
334 | position: relative; | |
335 | } | |
336 | .crm-case-caseview-case_subject span.crm-editable:before { | |
337 | position: absolute; | |
338 | font-family: 'FontAwesome'; | |
339 | top: 0; | |
340 | right: 10px; | |
341 | content: "\f040"; | |
342 | opacity: 0.7; | |
343 | color: #000; | |
344 | font-size: .92em; | |
345 | } | |
346 | .crm-case-caseview-case_subject span.crm-editable-editing { | |
347 | padding-right: 0; | |
348 | } | |
349 | .crm-case-caseview-case_subject span.crm-editable-editing form > input { | |
350 | min-width: 20em; | |
351 | padding: 3px; | |
352 | } | |
353 | .crm-case-caseview-case_subject span.crm-editable-editing:before { | |
354 | content: ""; | |
355 | } | |
356 | </style> | |
357 | {/literal} |