2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
26 {* CiviCase - view case screen*}
28 <div class="crm-block crm-form-block crm-case-caseview-form-block">
30 {* here we are showing related cases w/ jquery dialog *}
31 {if $showRelatedCases}
32 {include file="CRM/Case/Form/ViewRelatedCases.tpl"}
36 <h3>{ts}Summary{/ts}</h3>
37 <table class="report crm-entity case-summary" data-entity="case" data-id="{$caseID}" data-cid="{$contactID}">
39 <tr class="crm-case-caseview-client">
40 <td colspan="5" class="label">
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}
45 <a href="#addClientDialog" class="crm-hover-button case-miniform" title="{ts}Add Client{/ts}" data-key="{crmKey name='civicrm/case/ajax/addclient'}">
46 <i class="crm-i fa-user-plus"></i>
48 <div id="addClientDialog" class="hiddenElement">
49 <input name="add_client_id" placeholder="{ts}- select contact -{/ts}" class="huge" data-api-params='{ldelim}"params": {ldelim}"contact_type": "{$contactType}"{rdelim}{rdelim}' />
52 <div class="crm-block relatedCases-link"><a class="crm-hover-button crm-popup medium-popup" href="{$relatedCaseUrl}">{$relatedCaseLabel}</a></div>
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>
66 <tr class="crm-case-caseview-phone">
67 <td class="label-left description" style="padding: 1px">{$client.phone}</td>
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>
78 <div class="crm-block relatedCases-link"><a class="crm-hover-button crm-popup medium-popup" href="{$relatedCaseUrl}">{$relatedCaseLabel}</a></div>
82 <td class="crm-case-caseview-case_subject label">
83 <span class="crm-case-summary-label">{ts}Subject{/ts}:</span> {$caseDetails.case_subject}
85 <td class="crm-case-caseview-case_type label">
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>
88 <td class="crm-case-caseview-case_status label">
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>
91 <td class="crm-case-caseview-case_start_date label">
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>
94 <td class="crm-case-caseview-{$caseID} label">
95 <span class="crm-case-summary-label">{ts}ID{/ts}:</span> {$caseID}
100 <div id="caseSummary" class="crm-clearfix">
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>
107 <div class="case-control-panel">
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}
119 {if $hasAccessToAllCases}
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>
124 <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>
125 {$form._qf_CaseView_next_merge_case.html}
126 <span id="mergeCasesDialog" class="hiddenElement">
127 {$form.merge_case_id.html}
131 {if call_user_func(array('CRM_Core_Permission','giveMeAllACLs'))}
132 <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>
138 <div class="clear"></div>
139 {include file="CRM/Case/Page/CustomDataView.tpl"}
141 <div class="crm-accordion-wrapper collapsed crm-case-roles-block">
142 <div class="crm-accordion-header">
144 </div><!-- /.crm-accordion-header -->
145 <div class="crm-accordion-body">
147 {if $hasAccessToAllCases}
148 <div class="crm-submit-buttons">
149 <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>
151 <div id="addCaseRoleDialog" class="hiddenElement">
152 <div>{$form.role_type.label}</div>
153 <div>{$form.role_type.html}</div><br />
154 <div><label for="add_role_contact_id">{ts}Assign To{/ts}:</label></div>
155 <div><input name="add_role_contact_id" placeholder="{ts}- first select relationship type -{/ts}" class="huge" /></div>
159 <div id="editCaseRoleDialog" class="hiddenElement">
160 <div><label for="edit_role_contact_id">{ts}Change To{/ts}:</label></div>
161 <div><input name="edit_role_contact_id" placeholder="{ts}- select contact -{/ts}" class="huge" /></div>
164 <table id="caseRoles-selector-{$caseID}" class="report-layout crm-ajax-table" data-page-length="10">
167 <th data-data="relation">{ts}Case Role{/ts}</th>
168 <th data-data="name">{ts}Name{/ts}</th>
169 <th data-data="phone">{ts}Phone{/ts}</th>
170 <th data-data="email">{ts}Email{/ts}</th>
171 {if $relId neq 'client' and $hasAccessToAllCases}
172 <th data-data="actions" data-orderable="false">{ts}Actions{/ts}</th>
178 <script type="text/javascript">
180 var caseId = {/literal}{$caseID}{literal};
181 CRM.$('table#caseRoles-selector-' + caseId).data({
183 "url": {/literal}'{crmURL p="civicrm/ajax/caseroles" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal}
190 <div id="deleteCaseRoleDialog" class="hiddenElement">
191 {ts}Are you sure you want to end this relationship?{/ts}
194 </div><!-- /.crm-accordion-body -->
195 </div><!-- /.crm-accordion-wrapper -->
197 {if $hasAccessToAllCases}
198 <div class="crm-accordion-wrapper collapsed crm-case-other-relationships-block">
199 <div class="crm-accordion-header">
200 {ts}Other Relationships{/ts}
201 </div><!-- /.crm-accordion-header -->
202 <div class="crm-accordion-body">
203 <div class="crm-submit-buttons">
204 {crmButton p='civicrm/contact/view/rel' q="action=add&reset=1&cid=`$contactId`&caseID=`$caseID`" icon="plus-circle"}{ts}Add client relationship{/ts}{/crmButton}
206 <table id="clientRelationships-selector-{$caseID}" class="report-layout crm-ajax-table" data-page-length="10">
209 <th data-data="relation">{ts}Client Relationship{/ts}</th>
210 <th data-data="name">{ts}Name{/ts}</th>
211 <th data-data="phone">{ts}Phone{/ts}</th>
212 <th data-data="email">{ts}Email{/ts}</th>
217 <script type="text/javascript">
219 var caseId = {/literal}{$caseID}{literal};
220 CRM.$('table#clientRelationships-selector-' + caseId).data({
222 "url": {/literal}'{crmURL p="civicrm/ajax/clientrelationships" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal}
229 {if !empty($globalGroupInfo.id)}
230 <div class="crm-submit-buttons">
231 <a class="button case-miniform" href="#addMembersToGroupDialog" rel="#globalRelationships-selector-{$caseId}" data-group_id="{$globalGroupInfo.id}">
232 <i class="crm-i fa-plus-circle"></i> {ts 1=$globalGroupInfo.title}Add members to %1{/ts}
235 <div id="addMembersToGroupDialog" class="hiddenElement">
236 <input name="add_member_to_group_contact_id" placeholder="{ts}- select contacts -{/ts}" class="huge" />
238 <table id="globalRelationships-selector-{$caseId}" class="report-layout crm-ajax-table" data-page-length="10">
241 <th data-data="sort_name">{$globalGroupInfo.title}</th>
242 <th data-data="phone">{ts}Phone{/ts}</th>
243 <th data-data="email">{ts}Email{/ts}</th>
248 <script type="text/javascript">
250 var caseId = {/literal}{$caseID}{literal};
251 CRM.$('table#globalRelationships-selector-' + caseId).data({
253 "url": {/literal}'{crmURL p="civicrm/ajax/globalrelationships" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal}
261 </div><!-- /.crm-accordion-body -->
262 </div><!-- /.crm-accordion-wrapper -->
264 {/if} {* other relationship section ends *}
265 {include file="CRM/Case/Form/ActivityToCase.tpl"}
267 {* pane to display / edit regular tags or tagsets for cases *}
268 {if $showTags OR $showTagsets}
270 <div id="casetags" class="crm-accordion-wrapper crm-case-tags-block">
271 <div class="crm-accordion-header">
273 </div><!-- /.crm-accordion-header -->
274 <div class="crm-accordion-body">
275 {assign var="tagExits" value=0}
277 <div class="crm-block crm-content-block crm-case-caseview-display-tags"> {$tags}</div>
278 {assign var="tagExits" value=1}
281 {foreach from=$tagsetInfo.case item=displayTagset}
282 {if $displayTagset.entityTagsArray}
283 <div class="crm-block crm-content-block crm-case-caseview-display-tagset">
284 {$displayTagset.parentName}:
285 {foreach from=$displayTagset.entityTagsArray item=val name="tagsetList"}
286 {$val.name}{if !$smarty.foreach.tagsetList.last},{/if}
289 {assign var="tagExits" value=1}
295 {ts}There are no tags currently assigned to this case.{/ts}
299 <div class="crm-submit-buttons">
300 <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>
303 </div><!-- /.crm-accordion-body -->
304 </div><!-- /.crm-accordion-wrapper -->
306 <div id="manageTagsDialog" class="hiddenElement">
307 <div class="label">{$form.case_tag.label}</div>
308 <div class="view-value"><div class="crm-select-container">{$form.case_tag.html}</div>
310 <div style="text-align:left;">{include file="CRM/common/Tagset.tpl" tagsetType='case'}</div>
312 <div class="clear"></div>
316 {/if} {* end of tag block*}
318 {include file="CRM/Case/Form/ActivityTab.tpl"}
320 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
321 {/if} {* view related cases if end *}