Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
2c4c49ca | 3 | | CiviCRM version 4.7 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
e7112fa7 | 5 | | Copyright CiviCRM LLC (c) 2004-2015 | |
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"> | |
63 | <td class="label-left bold" style="padding: 0px; border: none;">{$client.display_name}</td> | |
64 | </tr> | |
65 | {if $client.phone} | |
66 | <tr class="crm-case-caseview-phone"> | |
67 | <td class="label-left description" style="padding: 1px">{$client.phone}</td> | |
68 | </tr> | |
69 | {/if} | |
70 | {if $client.birth_date} | |
71 | <tr class="crm-case-caseview-birth_date"> | |
72 | <td class="label-left description" style="padding: 1px">{ts}DOB{/ts}: {$client.birth_date|crmDate}</td> | |
73 | </tr> | |
74 | {/if} | |
75 | {/foreach} | |
76 | </table> | |
77 | {if $hasRelatedCases} | |
78 | <div class="crm-block relatedCases-link"><a class="crm-hover-button crm-popup medium-popup" href="{$relatedCaseUrl}">{$relatedCaseLabel}</a></div> | |
79 | {/if} | |
80 | </td> | |
81 | {/if} | |
82 | <td class="crm-case-caseview-case_subject label"> | |
83 | <span class="crm-case-summary-label">{ts}Subject{/ts}:</span> {$caseDetails.case_subject} | |
84 | </td> | |
85 | <td class="crm-case-caseview-case_type label"> | |
a2c70872 | 86 | <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 |
87 | </td> |
88 | <td class="crm-case-caseview-case_status label"> | |
a2c70872 | 89 | <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 |
90 | </td> |
91 | <td class="crm-case-caseview-case_start_date label"> | |
a2c70872 | 92 | <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 |
93 | </td> |
94 | <td class="crm-case-caseview-{$caseID} label"> | |
95 | <span class="crm-case-summary-label">{ts}ID{/ts}:</span> {$caseID} | |
96 | </td> | |
97 | </tr> | |
98 | </table> | |
6a488035 | 99 | {if $hookCaseSummary} |
5b141f20 | 100 | <div id="caseSummary" class="crm-clearfix"> |
ad280fb6 JL |
101 | {foreach from=$hookCaseSummary item=val key=div_id} |
102 | <div id="{$div_id}"><label>{$val.label}</label><div class="value">{$val.value}</div></div> | |
103 | {/foreach} | |
104 | </div> | |
6a488035 TO |
105 | {/if} |
106 | ||
ad280fb6 JL |
107 | <div class="case-control-panel"> |
108 | <div> | |
109 | <p> | |
110 | {$form.add_activity_type_id.html} | |
111 | {if $hasAccessToAllCases} | |
112 | {$form.timeline_id.html}{$form._qf_CaseView_next.html} | |
113 | {$form.report_id.html} | |
114 | {/if} | |
115 | </p> | |
116 | </div> | |
117 | <div> | |
118 | <p> | |
119 | {if $hasAccessToAllCases} | |
a2c70872 | 120 | <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 | 121 | {/if} |
80bc2820 | 122 | |
e43d5206 CW |
123 | {if !empty($exportDoc)} |
124 | <a class="crm-hover-button action-item" href="{$exportDoc}"><i class="crm-i fa-file-pdf-o"></i> {ts}Export Document{/ts}</a> | |
125 | {/if} | |
126 | ||
ad280fb6 | 127 | {if $mergeCases} |
a2c70872 | 128 | <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 |
129 | {$form._qf_CaseView_next_merge_case.html} |
130 | <span id="mergeCasesDialog" class="hiddenElement"> | |
131 | {$form.merge_case_id.html} | |
132 | </span> | |
133 | {/if} | |
80bc2820 | 134 | |
ad280fb6 | 135 | {if call_user_func(array('CRM_Core_Permission','giveMeAllACLs'))} |
a2c70872 | 136 | <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 |
137 | {/if} |
138 | </p> | |
139 | </div> | |
2a06342c | 140 | </div> |
6a488035 | 141 | |
ad280fb6 JL |
142 | <div class="clear"></div> |
143 | {include file="CRM/Case/Page/CustomDataView.tpl"} | |
6a488035 | 144 | |
ad280fb6 JL |
145 | <div class="crm-accordion-wrapper collapsed crm-case-roles-block"> |
146 | <div class="crm-accordion-header"> | |
147 | {ts}Roles{/ts} | |
148 | </div><!-- /.crm-accordion-header --> | |
149 | <div class="crm-accordion-body"> | |
80bc2820 | 150 | |
ad280fb6 JL |
151 | {if $hasAccessToAllCases} |
152 | <div class="crm-submit-buttons"> | |
a2c70872 | 153 | <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 |
154 | </div> |
155 | <div id="addCaseRoleDialog" class="hiddenElement"> | |
156 | <div>{$form.role_type.label}</div> | |
157 | <div>{$form.role_type.html}</div><br /> | |
158 | <div><label for="add_role_contact_id">{ts}Assign To{/ts}:</label></div> | |
0004ae05 | 159 | <div><input name="add_role_contact_id" placeholder="{ts}- first select relationship type -{/ts}" class="huge" /></div> |
ad280fb6 | 160 | </div> |
2a06342c | 161 | {/if} |
80bc2820 | 162 | |
ad280fb6 JL |
163 | <div id="editCaseRoleDialog" class="hiddenElement"> |
164 | <div><label for="edit_role_contact_id">{ts}Change To{/ts}:</label></div> | |
165 | <div><input name="edit_role_contact_id" placeholder="{ts}- select contact -{/ts}" class="huge" /></div> | |
c91df8b4 | 166 | </div> |
80bc2820 | 167 | |
ad280fb6 JL |
168 | <table id="caseRoles-selector-{$caseID}" class="report-layout crm-ajax-table" data-page-length="10"> |
169 | <thead> | |
170 | <tr> | |
171 | <th data-data="relation">{ts}Case Role{/ts}</th> | |
172 | <th data-data="name">{ts}Name{/ts}</th> | |
173 | <th data-data="phone">{ts}Phone{/ts}</th> | |
174 | <th data-data="email">{ts}Email{/ts}</th> | |
175 | {if $relId neq 'client' and $hasAccessToAllCases} | |
176 | <th data-data="actions" data-orderable="false">{ts}Actions{/ts}</th> | |
177 | {/if} | |
178 | </tr> | |
179 | </thead> | |
180 | </table> | |
181 | {literal} | |
182 | <script type="text/javascript"> | |
183 | (function($) { | |
184 | var caseId = {/literal}{$caseID}{literal}; | |
185 | CRM.$('table#caseRoles-selector-' + caseId).data({ | |
186 | "ajax": { | |
187 | "url": {/literal}'{crmURL p="civicrm/ajax/caseroles" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal} | |
188 | } | |
189 | }); | |
190 | })(CRM.$); | |
191 | </script> | |
192 | {/literal} | |
80bc2820 | 193 | |
ad280fb6 | 194 | <div id="deleteCaseRoleDialog" class="hiddenElement"> |
0004ae05 | 195 | {ts}Are you sure you want to end this relationship?{/ts} |
6a488035 | 196 | </div> |
80bc2820 | 197 | |
ad280fb6 JL |
198 | </div><!-- /.crm-accordion-body --> |
199 | </div><!-- /.crm-accordion-wrapper --> | |
6a488035 TO |
200 | |
201 | {if $hasAccessToAllCases} | |
202 | <div class="crm-accordion-wrapper collapsed crm-case-other-relationships-block"> | |
203 | <div class="crm-accordion-header"> | |
204 | {ts}Other Relationships{/ts} | |
205 | </div><!-- /.crm-accordion-header --> | |
206 | <div class="crm-accordion-body"> | |
f7296a9a | 207 | <div class="crm-submit-buttons"> |
80bc2820 | 208 | {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 | 209 | </div> |
ad280fb6 JL |
210 | <table id="clientRelationships-selector-{$caseID}" class="report-layout crm-ajax-table" data-page-length="10"> |
211 | <thead> | |
212 | <tr> | |
213 | <th data-data="relation">{ts}Client Relationship{/ts}</th> | |
214 | <th data-data="name">{ts}Name{/ts}</th> | |
215 | <th data-data="phone">{ts}Phone{/ts}</th> | |
216 | <th data-data="email">{ts}Email{/ts}</th> | |
217 | </tr> | |
218 | </thead> | |
219 | </table> | |
220 | {literal} | |
221 | <script type="text/javascript"> | |
222 | (function($) { | |
223 | var caseId = {/literal}{$caseID}{literal}; | |
224 | CRM.$('table#clientRelationships-selector-' + caseId).data({ | |
225 | "ajax": { | |
226 | "url": {/literal}'{crmURL p="civicrm/ajax/clientrelationships" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal} | |
227 | } | |
228 | }); | |
229 | })(CRM.$); | |
230 | </script> | |
231 | {/literal} | |
6a488035 | 232 | <br /> |
d79c94d5 | 233 | {if !empty($globalGroupInfo.id)} |
6a488035 | 234 | <div class="crm-submit-buttons"> |
2c68626a | 235 | <a class="button case-miniform" href="#addMembersToGroupDialog" rel="#globalRelationships-selector-{$caseId}" data-group_id="{$globalGroupInfo.id}"> |
a2c70872 | 236 | <i class="crm-i fa-plus-circle"></i> {ts 1=$globalGroupInfo.title}Add members to %1{/ts} |
c91df8b4 | 237 | </a> |
6a488035 | 238 | </div> |
d79c94d5 | 239 | <div id="addMembersToGroupDialog" class="hiddenElement"> |
ba9be71a | 240 | <input name="add_member_to_group_contact_id" placeholder="{ts}- select contacts -{/ts}" class="huge" /> |
d79c94d5 | 241 | </div> |
ad280fb6 JL |
242 | <table id="globalRelationships-selector-{$caseId}" class="report-layout crm-ajax-table" data-page-length="10"> |
243 | <thead> | |
244 | <tr> | |
245 | <th data-data="sort_name">{$globalGroupInfo.title}</th> | |
246 | <th data-data="phone">{ts}Phone{/ts}</th> | |
247 | <th data-data="email">{ts}Email{/ts}</th> | |
248 | </tr> | |
249 | </thead> | |
6a488035 | 250 | </table> |
ad280fb6 JL |
251 | {literal} |
252 | <script type="text/javascript"> | |
253 | (function($) { | |
254 | var caseId = {/literal}{$caseID}{literal}; | |
255 | CRM.$('table#globalRelationships-selector-' + caseId).data({ | |
256 | "ajax": { | |
257 | "url": {/literal}'{crmURL p="civicrm/ajax/globalrelationships" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal} | |
258 | } | |
259 | }); | |
260 | })(CRM.$); | |
261 | </script> | |
262 | {/literal} | |
6a488035 TO |
263 | {/if} |
264 | ||
ad280fb6 | 265 | </div><!-- /.crm-accordion-body --> |
6a488035 TO |
266 | </div><!-- /.crm-accordion-wrapper --> |
267 | ||
268 | {/if} {* other relationship section ends *} | |
6a488035 | 269 | {include file="CRM/Case/Form/ActivityToCase.tpl"} |
6a488035 TO |
270 | |
271 | {* pane to display / edit regular tags or tagsets for cases *} | |
272 | {if $showTags OR $showTagsets} | |
273 | ||
274 | <div id="casetags" class="crm-accordion-wrapper crm-case-tags-block"> | |
275 | <div class="crm-accordion-header"> | |
276 | {ts}Case Tags{/ts} | |
277 | </div><!-- /.crm-accordion-header --> | |
278 | <div class="crm-accordion-body"> | |
279 | {assign var="tagExits" value=0} | |
280 | {if $tags} | |
6fd5424b | 281 | <div class="crm-block crm-content-block crm-case-caseview-display-tags"> {$tags}</div> |
6a488035 TO |
282 | {assign var="tagExits" value=1} |
283 | {/if} | |
284 | ||
6d538af3 | 285 | {foreach from=$tagsetInfo.case item=displayTagset} |
6a488035 TO |
286 | {if $displayTagset.entityTagsArray} |
287 | <div class="crm-block crm-content-block crm-case-caseview-display-tagset"> | |
288 | {$displayTagset.parentName}: | |
289 | {foreach from=$displayTagset.entityTagsArray item=val name="tagsetList"} | |
290 | {$val.name}{if !$smarty.foreach.tagsetList.last},{/if} | |
291 | {/foreach} | |
292 | </div> | |
293 | {assign var="tagExits" value=1} | |
294 | {/if} | |
295 | {/foreach} | |
296 | ||
297 | {if !$tagExits } | |
298 | <div class="status"> | |
299 | {ts}There are no tags currently assigned to this case.{/ts} | |
300 | </div> | |
301 | {/if} | |
302 | ||
6ce08914 | 303 | <div class="crm-submit-buttons"> |
c91df8b4 | 304 | <a class="button case-miniform" href="#manageTagsDialog" data-key="{crmKey name='civicrm/case/ajax/processtags'}">{if $tagExits}{ts}Edit Tags{/ts}{else}{ts}Add Tags{/ts}{/if}</a> |
6ce08914 | 305 | </div> |
6a488035 TO |
306 | |
307 | </div><!-- /.crm-accordion-body --> | |
308 | </div><!-- /.crm-accordion-wrapper --> | |
309 | ||
c91df8b4 | 310 | <div id="manageTagsDialog" class="hiddenElement"> |
6a488035 TO |
311 | <div class="label">{$form.case_tag.label}</div> |
312 | <div class="view-value"><div class="crm-select-container">{$form.case_tag.html}</div> | |
313 | <br/> | |
6d538af3 | 314 | <div style="text-align:left;">{include file="CRM/common/Tagset.tpl" tagsetType='case'}</div> |
6a488035 TO |
315 | <br/> |
316 | <div class="clear"></div> | |
317 | </div> | |
318 | </div> | |
319 | ||
6a488035 TO |
320 | {/if} {* end of tag block*} |
321 | ||
fc7d8951 | 322 | {include file="CRM/Case/Form/ActivityTab.tpl"} |
6a488035 TO |
323 | |
324 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> | |
6a488035 TO |
325 | {/if} {* view related cases if end *} |
326 | </div> |