Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
819d0d41 | 3 | | CiviCRM version 4.5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
819d0d41 | 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
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 | |
c1c6e20c CW |
30 | {* here we are showing related cases w/ jquery dialog *} |
31 | {if $showRelatedCases} | |
32 | {include file="CRM/Case/Form/ViewRelatedCases.tpl"} | |
6a488035 | 33 | |
c1c6e20c CW |
34 | {* Main case view *} |
35 | {else} | |
6a488035 | 36 | |
1712131c | 37 | <h3>{ts}Summary{/ts}</h3> |
6ce08914 | 38 | <table class="report crm-entity case-summary" data-entity="case" data-id="{$caseID}" data-cid="{$contactID}"> |
6a488035 TO |
39 | {if $multiClient} |
40 | <tr class="crm-case-caseview-client"> | |
ad5d70b5 | 41 | <td colspan="5" class="label"> |
6a488035 TO |
42 | {ts}Clients:{/ts} |
43 | {foreach from=$caseRoles.client item=client name=clients} | |
44 | <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 | {/foreach} | |
c91df8b4 CW |
46 | <a href="#addClientDialog" class="crm-hover-button case-miniform" title="{ts}Add Client{/ts}" data-key="{crmKey name='civicrm/case/ajax/addclient'}"> |
47 | <span class="icon add-icon"></span> | |
6a488035 | 48 | </a> |
c91df8b4 CW |
49 | <div id="addClientDialog" class="hiddenElement"> |
50 | <input name="add_client_id" placeholder="{ts}- select contact -{/ts}" class="huge" /> | |
51 | </div> | |
6a488035 | 52 | {if $hasRelatedCases} |
6ce08914 | 53 | <div class="crm-block relatedCases-link"><a class="crm-hover-button crm-popup medium-popup" href="{$relatedCaseUrl}">{$relatedCaseLabel}</a></div> |
6a488035 TO |
54 | {/if} |
55 | </td> | |
56 | </tr> | |
57 | {/if} | |
58 | <tr> | |
59 | {if not $multiClient} | |
60 | <td> | |
61 | <table class="form-layout-compressed"> | |
62 | {foreach from=$caseRoles.client item=client} | |
63 | <tr class="crm-case-caseview-display_name"> | |
64 | <td class="label-left bold" style="padding: 0px; border: none;">{$client.display_name}</td> | |
65 | </tr> | |
66 | {if $client.phone} | |
67 | <tr class="crm-case-caseview-phone"> | |
68 | <td class="label-left description" style="padding: 1px">{$client.phone}</td> | |
69 | </tr> | |
70 | {/if} | |
71 | {if $client.birth_date} | |
72 | <tr class="crm-case-caseview-birth_date"> | |
73 | <td class="label-left description" style="padding: 1px">{ts}DOB{/ts}: {$client.birth_date|crmDate}</td> | |
74 | </tr> | |
75 | {/if} | |
76 | {/foreach} | |
77 | </table> | |
78 | {if $hasRelatedCases} | |
6ce08914 | 79 | <div class="crm-block relatedCases-link"><a class="crm-hover-button crm-popup medium-popup" href="{$relatedCaseUrl}">{$relatedCaseLabel}</a></div> |
6a488035 TO |
80 | {/if} |
81 | </td> | |
82 | {/if} | |
0cc50002 | 83 | <td class="crm-case-caseview-case_subject label"> |
41f5e946 | 84 | <span class="crm-case-summary-label">{ts}Subject{/ts}:</span> {$caseDetails.case_subject} |
6a488035 TO |
85 | </td> |
86 | <td class="crm-case-caseview-case_type label"> | |
6ce08914 | 87 | <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}"><span class="icon edit-icon"></span></a> |
6a488035 TO |
88 | </td> |
89 | <td class="crm-case-caseview-case_status label"> | |
6ce08914 | 90 | <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}"><span class="icon edit-icon"></span></a> |
6a488035 TO |
91 | </td> |
92 | <td class="crm-case-caseview-case_start_date label"> | |
6ce08914 | 93 | <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}"><span class="icon edit-icon"></span></a> |
6a488035 TO |
94 | </td> |
95 | <td class="crm-case-caseview-{$caseID} label"> | |
41f5e946 | 96 | <span class="crm-case-summary-label">{ts}ID{/ts}:</span> {$caseID} |
6a488035 TO |
97 | </td> |
98 | </tr> | |
99 | </table> | |
100 | {if $hookCaseSummary} | |
101 | <div id="caseSummary"> | |
102 | {foreach from=$hookCaseSummary item=val key=div_id} | |
103 | <div id="{$div_id}"><label>{$val.label}</label><div class="value">{$val.value}</div></div> | |
104 | {/foreach} | |
105 | </div> | |
106 | {/if} | |
107 | ||
2a06342c CW |
108 | <div class="case-control-panel"> |
109 | <div> | |
110 | <p> | |
111 | {$form.add_activity_type_id.html} | |
112 | {if $hasAccessToAllCases} | |
113 | {$form.timeline_id.html}{$form._qf_CaseView_next.html} | |
114 | {$form.report_id.html} | |
115 | {/if} | |
116 | </p> | |
117 | </div> | |
118 | <div> | |
119 | <p> | |
120 | {if $hasAccessToAllCases} | |
121 | <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"}"><span class="icon print-icon"></span> {ts}Print Report{/ts}</a> | |
122 | {/if} | |
6a488035 | 123 | |
2a06342c | 124 | {if $mergeCases} |
c91df8b4 | 125 | <a href="#mergeCasesDialog" class="action-item no-popup crm-hover-button case-miniform"><span class="icon ui-icon-copy"></span>{ts}Merge Case{/ts}</a> |
2a06342c | 126 | {$form._qf_CaseView_next_merge_case.html} |
c91df8b4 | 127 | <span id="mergeCasesDialog" class="hiddenElement"> |
2a06342c | 128 | {$form.merge_case_id.html} |
6a488035 | 129 | </span> |
2a06342c | 130 | {/if} |
6a488035 | 131 | |
2a06342c CW |
132 | {if call_user_func(array('CRM_Core_Permission','giveMeAllACLs'))} |
133 | <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"}"><span class="icon ui-icon-person"></span> {ts}Assign to Another Client{/ts}</a> | |
134 | {/if} | |
135 | </p> | |
136 | </div> | |
137 | </div> | |
6a488035 | 138 | |
6a488035 TO |
139 | <div class="clear"></div> |
140 | {include file="CRM/Case/Page/CustomDataView.tpl"} | |
141 | ||
142 | <div class="crm-accordion-wrapper collapsed crm-case-roles-block"> | |
143 | <div class="crm-accordion-header"> | |
1712131c | 144 | {ts}Roles{/ts} |
6a488035 TO |
145 | </div><!-- /.crm-accordion-header --> |
146 | <div class="crm-accordion-body"> | |
147 | ||
148 | {if $hasAccessToAllCases} | |
149 | <div class="crm-submit-buttons"> | |
2c68626a | 150 | <a class="button case-miniform" href="#addCaseRoleDialog" data-key="{crmKey name='civicrm/ajax/relation'}" rel="#caseRoles-selector-{$caseID}"><div class="icon add-icon"></div>{ts}Add new role{/ts}</a> |
c91df8b4 CW |
151 | </div> |
152 | <div id="addCaseRoleDialog" class="hiddenElement"> | |
153 | <div>{$form.role_type.label}</div> | |
154 | <div>{$form.role_type.html}</div><br /> | |
155 | <div><label for="add_role_contact_id">{ts}Assign To{/ts}:</label></div> | |
156 | <div><input name="add_role_contact_id" placeholder="{ts}- select contact -{/ts}" class="huge" /></div> | |
6a488035 TO |
157 | </div> |
158 | {/if} | |
159 | ||
c91df8b4 CW |
160 | <div id="editCaseRoleDialog" class="hiddenElement"> |
161 | <div><label for="edit_role_contact_id">{ts}Change To{/ts}:</label></div> | |
162 | <div><input name="edit_role_contact_id" placeholder="{ts}- select contact -{/ts}" class="huge" /></div> | |
163 | </div> | |
164 | ||
2c68626a | 165 | <table id="caseRoles-selector-{$caseID}" class="report-layout"> |
6a488035 TO |
166 | <thead><tr> |
167 | <th>{ts}Case Role{/ts}</th> | |
168 | <th>{ts}Name{/ts}</th> | |
169 | <th>{ts}Phone{/ts}</th> | |
170 | <th>{ts}Email{/ts}</th> | |
171 | {if $relId neq 'client' and $hasAccessToAllCases} | |
172 | <th id="nosort">{ts}Actions{/ts}</th> | |
173 | {/if} | |
174 | </tr></thead> | |
175 | </table> | |
176 | ||
c91df8b4 | 177 | <div id="deleteCaseRoleDialog" class="hiddenElement"> |
2a06342c CW |
178 | {ts}Are you sure you want to delete this case role?{/ts} |
179 | </div> | |
180 | ||
6a488035 TO |
181 | {literal} |
182 | <script type="text/javascript"> | |
183 | var oTable; | |
184 | ||
3cc60a06 | 185 | CRM.$(function($) { |
6a488035 | 186 | buildCaseRoles(false); |
2c68626a DJ |
187 | function buildCaseRoles(filterSearch) { |
188 | if(filterSearch) { | |
189 | oTable.fnDestroy(); | |
6a488035 | 190 | } |
2c68626a DJ |
191 | var count = 0; |
192 | var columns = ''; | |
193 | var sourceUrl = {/literal}"{crmURL p='civicrm/ajax/caseroles' h=0 q='snippet=4&caseID='}{$caseID}"{literal}; | |
194 | sourceUrl = sourceUrl + '&cid={/literal}{$contactID}{literal}'; | |
195 | sourceUrl = sourceUrl + '&userID={/literal}{$userID}{literal}'; | |
196 | ||
197 | $('#caseRoles-selector-{/literal}{$caseID}{literal} th').each( function( ) { | |
198 | if ( $(this).attr('id') != 'nosort' ) { | |
199 | columns += '{"sClass": "' + $(this).attr('class') +'"},'; | |
200 | } | |
201 | else { | |
202 | columns += '{ "bSortable": false },'; | |
203 | } | |
204 | count++; | |
205 | }); | |
206 | ||
207 | columns = columns.substring(0, columns.length - 1 ); | |
208 | eval('columns =[' + columns + ']'); | |
209 | ||
210 | oTable = $('#caseRoles-selector-{/literal}{$caseID}{literal}').dataTable({ | |
211 | "bFilter" : false, | |
212 | "bAutoWidth" : false, | |
213 | "aaSorting" : [], | |
214 | "aoColumns" : columns, | |
215 | "bProcessing": true, | |
216 | "bJQueryUI": true, | |
217 | "asStripClasses" : [ "odd-row", "even-row" ], | |
218 | "sPaginationType": "full_numbers", | |
219 | "sDom" : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>', | |
220 | "bServerSide": true, | |
221 | "sAjaxSource": sourceUrl, | |
222 | "iDisplayLength": 10, | |
223 | "fnDrawCallback": function() { setCaseRolesSelectorClass(); }, | |
224 | "fnServerData": function ( sSource, aoData, fnCallback ) { | |
225 | $.ajax({ | |
226 | "dataType": 'json', | |
227 | "type": "POST", | |
228 | "url": sSource, | |
229 | "data": aoData, | |
230 | "success": fnCallback | |
231 | }); | |
232 | } | |
233 | }); | |
234 | } | |
6a488035 | 235 | |
2c68626a DJ |
236 | function setCaseRolesSelectorClass( ) { |
237 | $("#caseRoles-selector-{/literal}{$caseID}{literal} td:last-child").each( function( ) { | |
238 | $(this).parent().addClass($(this).text() ); | |
239 | }); | |
240 | } | |
241 | }); | |
6a488035 TO |
242 | </script> |
243 | {/literal} | |
244 | </div><!-- /.crm-accordion-body --> | |
245 | </div><!-- /.crm-accordion-wrapper --> | |
6a488035 TO |
246 | |
247 | {if $hasAccessToAllCases} | |
248 | <div class="crm-accordion-wrapper collapsed crm-case-other-relationships-block"> | |
249 | <div class="crm-accordion-header"> | |
250 | {ts}Other Relationships{/ts} | |
251 | </div><!-- /.crm-accordion-header --> | |
252 | <div class="crm-accordion-body"> | |
5ffd5a35 | 253 | {capture assign=relUrl}{crmURL p='civicrm/contact/view/rel' q="action=add&reset=1&cid=`$contactId`&caseID=`$caseID`"}{/capture} |
6a488035 TO |
254 | {if $clientRelationships} |
255 | <div class="crm-submit-buttons"> | |
5ffd5a35 CW |
256 | <a class="button" href="{$relUrl}"> |
257 | <div class="icon add-icon"></div>{ts}Add client relationship{/ts}</a> | |
6a488035 | 258 | </div> |
2c68626a | 259 | <table id="clientRelationships-selector-{$caseID}" class="report-layout"> |
6a488035 TO |
260 | <thead><tr> |
261 | <th>{ts}Client Relationship{/ts}</th> | |
262 | <th>{ts}Name{/ts}</th> | |
263 | <th>{ts}Phone{/ts}</th> | |
264 | <th>{ts}Email{/ts}</th> | |
265 | </tr></thead> | |
266 | </table> | |
267 | {else} | |
268 | <div class="messages status no-popup"> | |
269 | <div class="icon inform-icon"></div> | |
5ffd5a35 CW |
270 | {capture assign=link}class="action-item" href="{$relUrl}"{/capture} |
271 | {ts 1=$link}There are no Relationships entered for this client. You can <a %1>add one</a>.{/ts} | |
6a488035 TO |
272 | </div> |
273 | {/if} | |
274 | {literal} | |
275 | <script type="text/javascript"> | |
3cc60a06 | 276 | CRM.$(function($) { |
2c68626a DJ |
277 | buildCaseClientRelationships(false); |
278 | function buildCaseClientRelationships(filterSearch) { | |
279 | if (filterSearch) { | |
280 | oTable.fnDestroy(); | |
281 | } | |
282 | var count = 0; | |
283 | var columns = ''; | |
284 | var sourceUrl = {/literal}"{crmURL p='civicrm/ajax/clientrelationships' h=0 q='snippet=4&caseID='}{$caseID}"{literal}; | |
285 | sourceUrl = sourceUrl + '&cid={/literal}{$contactID}{literal}'; | |
286 | sourceUrl = sourceUrl + '&userID={/literal}{$userID}{literal}'; | |
287 | ||
288 | $('#clientRelationships-selector-{/literal}{$caseID}{literal} th').each( function( ) { | |
289 | if ( $(this).attr('id') != 'nosort' ) { | |
290 | columns += '{"sClass": "' + $(this).attr('class') +'"},'; | |
291 | } | |
292 | else { | |
293 | columns += '{ "bSortable": false },'; | |
294 | } | |
295 | count++; | |
296 | }); | |
297 | ||
298 | columns = columns.substring(0, columns.length - 1 ); | |
299 | eval('columns =[' + columns + ']'); | |
300 | ||
301 | oTable = $('#clientRelationships-selector-{/literal}{$caseID}{literal}').dataTable({ | |
302 | "bFilter" : false, | |
303 | "bAutoWidth" : false, | |
304 | "aaSorting" : [], | |
305 | "aoColumns" : columns, | |
306 | "bProcessing": true, | |
307 | "bJQueryUI": true, | |
308 | "asStripClasses" : [ "odd-row", "even-row" ], | |
309 | "sPaginationType": "full_numbers", | |
310 | "sDom" : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>', | |
311 | "bServerSide": true, | |
312 | "sAjaxSource": sourceUrl, | |
313 | "iDisplayLength": 10, | |
314 | "fnDrawCallback": function() { setClientRelationshipsSelectorClass(); }, | |
315 | "fnServerData": function (sSource, aoData, fnCallback) { | |
316 | $.ajax( { | |
317 | "dataType": 'json', | |
318 | "type": "POST", | |
319 | "url": sSource, | |
320 | "data": aoData, | |
321 | "success": fnCallback | |
322 | }); | |
323 | } | |
324 | }); | |
6a488035 | 325 | } |
6a488035 | 326 | |
2c68626a DJ |
327 | function setClientRelationshipsSelectorClass( ) { |
328 | $("#clientRelationships-selector-{/literal}{$caseID}{literal} td:last-child").each(function() { | |
329 | $(this).parent().addClass($(this).text()); | |
330 | }); | |
331 | } | |
332 | }); | |
6a488035 TO |
333 | </script> |
334 | {/literal} | |
335 | <br /> | |
d79c94d5 | 336 | {if !empty($globalGroupInfo.id)} |
6a488035 | 337 | <div class="crm-submit-buttons"> |
2c68626a | 338 | <a class="button case-miniform" href="#addMembersToGroupDialog" rel="#globalRelationships-selector-{$caseId}" data-group_id="{$globalGroupInfo.id}"> |
c91df8b4 CW |
339 | <div class="icon add-icon"></div>{ts 1=$globalGroupInfo.title}Add members to %1{/ts} |
340 | </a> | |
6a488035 | 341 | </div> |
d79c94d5 CW |
342 | <div id="addMembersToGroupDialog" class="hiddenElement"> |
343 | <input name="add_member_to_group_contact_id" placeholder="{ts}- select contact -{/ts}" class="huge" /> | |
344 | </div> | |
2c68626a | 345 | <table id="globalRelationships-selector-{$caseId}" class="report-layout"> |
6a488035 TO |
346 | <thead><tr> |
347 | <th>{$globalGroupInfo.title}</th> | |
348 | <th>{ts}Phone{/ts}</th> | |
349 | <th>{ts}Email{/ts}</th> | |
350 | </tr></thead> | |
351 | </table> | |
6a488035 TO |
352 | {/if} |
353 | ||
354 | {literal} | |
355 | <script type="text/javascript"> | |
2c68626a DJ |
356 | CRM.$(function($) { |
357 | buildCaseGlobalRelationships(false); | |
358 | function buildCaseGlobalRelationships(filterSearch) { | |
359 | if (filterSearch) { | |
360 | oTable.fnDestroy(); | |
361 | } | |
362 | var count = 0; | |
363 | var columns = ''; | |
364 | var sourceUrl = {/literal}"{crmURL p='civicrm/ajax/globalrelationships' h=0 q='snippet=4&caseID='}{$caseID}"{literal}; | |
365 | sourceUrl = sourceUrl + '&cid={/literal}{$contactID}{literal}'; | |
366 | sourceUrl = sourceUrl + '&userID={/literal}{$userID}{literal}'; | |
367 | ||
368 | $('#globalRelationships-selector-{/literal}{$caseID}{literal} th').each( function( ) { | |
369 | if ($(this).attr('id') != 'nosort') { | |
370 | columns += '{"sClass": "' + $(this).attr('class') +'"},'; | |
371 | } | |
372 | else { | |
373 | columns += '{ "bSortable": false },'; | |
374 | } | |
375 | count++; | |
376 | }); | |
377 | ||
378 | columns = columns.substring(0, columns.length - 1 ); | |
379 | eval('columns =[' + columns + ']'); | |
380 | ||
381 | oTable = $('#globalRelationships-selector-{/literal}{$caseID}{literal}').dataTable({ | |
382 | "bFilter" : false, | |
383 | "bAutoWidth" : false, | |
384 | "aaSorting" : [], | |
385 | "aoColumns" : columns, | |
386 | "bProcessing": true, | |
387 | "bJQueryUI": true, | |
388 | "asStripClasses" : [ "odd-row", "even-row" ], | |
389 | "sPaginationType": "full_numbers", | |
390 | "sDom" : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>', | |
391 | "bServerSide": true, | |
392 | "sAjaxSource": sourceUrl, | |
393 | "iDisplayLength": 10, | |
394 | "fnDrawCallback": function() { setGlobalRelationshipsSelectorClass(); }, | |
395 | "oLanguage": { | |
396 | "sEmptyTable": {/literal}'{ts escape='js' 1=$globalGroupInfo.title}The group %1 has no members.{/ts}'{literal} | |
397 | }, | |
398 | "fnServerData": function ( sSource, aoData, fnCallback ) { | |
399 | $.ajax( { | |
400 | "dataType": 'json', | |
401 | "type": "POST", | |
402 | "url": sSource, | |
403 | "data": aoData, | |
404 | "success": fnCallback | |
405 | }); | |
406 | } | |
407 | }); | |
408 | } | |
409 | ||
410 | function setGlobalRelationshipsSelectorClass( ) { | |
411 | $("#globalRelationships-selector-{/literal}{$caseID}{literal} td:last-child").each( function( ) { | |
412 | $(this).parent().addClass($(this).text() ); | |
413 | }); | |
414 | } | |
415 | }); | |
6a488035 TO |
416 | </script> |
417 | {/literal} | |
418 | </div><!-- /.crm-accordion-body --> | |
419 | </div><!-- /.crm-accordion-wrapper --> | |
420 | ||
421 | {/if} {* other relationship section ends *} | |
6a488035 | 422 | {include file="CRM/Case/Form/ActivityToCase.tpl"} |
6a488035 TO |
423 | |
424 | {* pane to display / edit regular tags or tagsets for cases *} | |
425 | {if $showTags OR $showTagsets} | |
426 | ||
427 | <div id="casetags" class="crm-accordion-wrapper crm-case-tags-block"> | |
428 | <div class="crm-accordion-header"> | |
429 | {ts}Case Tags{/ts} | |
430 | </div><!-- /.crm-accordion-header --> | |
431 | <div class="crm-accordion-body"> | |
432 | {assign var="tagExits" value=0} | |
433 | {if $tags} | |
6fd5424b | 434 | <div class="crm-block crm-content-block crm-case-caseview-display-tags"> {$tags}</div> |
6a488035 TO |
435 | {assign var="tagExits" value=1} |
436 | {/if} | |
437 | ||
6d538af3 | 438 | {foreach from=$tagsetInfo.case item=displayTagset} |
6a488035 TO |
439 | {if $displayTagset.entityTagsArray} |
440 | <div class="crm-block crm-content-block crm-case-caseview-display-tagset"> | |
441 | {$displayTagset.parentName}: | |
442 | {foreach from=$displayTagset.entityTagsArray item=val name="tagsetList"} | |
443 | {$val.name}{if !$smarty.foreach.tagsetList.last},{/if} | |
444 | {/foreach} | |
445 | </div> | |
446 | {assign var="tagExits" value=1} | |
447 | {/if} | |
448 | {/foreach} | |
449 | ||
450 | {if !$tagExits } | |
451 | <div class="status"> | |
452 | {ts}There are no tags currently assigned to this case.{/ts} | |
453 | </div> | |
454 | {/if} | |
455 | ||
6ce08914 | 456 | <div class="crm-submit-buttons"> |
c91df8b4 | 457 | <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 | 458 | </div> |
6a488035 TO |
459 | |
460 | </div><!-- /.crm-accordion-body --> | |
461 | </div><!-- /.crm-accordion-wrapper --> | |
462 | ||
c91df8b4 | 463 | <div id="manageTagsDialog" class="hiddenElement"> |
6a488035 TO |
464 | <div class="label">{$form.case_tag.label}</div> |
465 | <div class="view-value"><div class="crm-select-container">{$form.case_tag.html}</div> | |
466 | <br/> | |
6d538af3 | 467 | <div style="text-align:left;">{include file="CRM/common/Tagset.tpl" tagsetType='case'}</div> |
6a488035 TO |
468 | <br/> |
469 | <div class="clear"></div> | |
470 | </div> | |
471 | </div> | |
472 | ||
6a488035 TO |
473 | {/if} {* end of tag block*} |
474 | ||
fc7d8951 | 475 | {include file="CRM/Case/Form/ActivityTab.tpl"} |
6a488035 TO |
476 | |
477 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> | |
478 | ||
5ffd5a35 | 479 | {include file="CRM/Case/Form/ActivityChangeStatusJs.tpl"} |
6a488035 TO |
480 | {/if} {* view related cases if end *} |
481 | </div> | |
21d5ed51 | 482 |