Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
39de6fd5 | 3 | | CiviCRM version 4.6 | |
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} | |
787b4f1c | 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} |
6a488035 | 45 | {/foreach} |
c91df8b4 | 46 | <a href="#addClientDialog" class="crm-hover-button case-miniform" title="{ts}Add Client{/ts}" data-key="{crmKey name='civicrm/case/ajax/addclient'}"> |
52604b19 | 47 | <span class="icon ui-icon-circle-plus"></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"> | |
52604b19 | 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 ui-icon-pencil"></span></a> |
6a488035 TO |
88 | </td> |
89 | <td class="crm-case-caseview-case_status label"> | |
52604b19 | 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 ui-icon-pencil"></span></a> |
6a488035 TO |
91 | </td> |
92 | <td class="crm-case-caseview-case_start_date label"> | |
52604b19 | 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 ui-icon-pencil"></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} | |
52604b19 | 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 ui-icon-print"></span> {ts}Print Report{/ts}</a> |
2a06342c | 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"> | |
52604b19 | 150 | <a class="button case-miniform" href="#addCaseRoleDialog" data-key="{crmKey name='civicrm/ajax/relation'}" rel="#caseRoles-selector-{$caseID}"><div class="icon ui-icon-circle-plus"></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 | } | |
66cae705 | 233 | }); |
2c68626a | 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"> | |
f7296a9a CW |
253 | <div class="crm-submit-buttons"> |
254 | {crmButton p='civicrm/contact/view/rel' q="action=add&reset=1&cid=`$contactId`&caseID=`$caseID`" icon="circle-plus"}{ts}Add client relationship{/ts}{/crmButton} | |
255 | </div> | |
6a488035 | 256 | {if $clientRelationships} |
2c68626a | 257 | <table id="clientRelationships-selector-{$caseID}" class="report-layout"> |
6a488035 TO |
258 | <thead><tr> |
259 | <th>{ts}Client Relationship{/ts}</th> | |
260 | <th>{ts}Name{/ts}</th> | |
261 | <th>{ts}Phone{/ts}</th> | |
262 | <th>{ts}Email{/ts}</th> | |
263 | </tr></thead> | |
264 | </table> | |
265 | {else} | |
266 | <div class="messages status no-popup"> | |
267 | <div class="icon inform-icon"></div> | |
f7296a9a | 268 | {ts}None found.{/ts} |
6a488035 TO |
269 | </div> |
270 | {/if} | |
271 | {literal} | |
272 | <script type="text/javascript"> | |
3cc60a06 | 273 | CRM.$(function($) { |
2c68626a DJ |
274 | buildCaseClientRelationships(false); |
275 | function buildCaseClientRelationships(filterSearch) { | |
276 | if (filterSearch) { | |
277 | oTable.fnDestroy(); | |
278 | } | |
279 | var count = 0; | |
280 | var columns = ''; | |
281 | var sourceUrl = {/literal}"{crmURL p='civicrm/ajax/clientrelationships' h=0 q='snippet=4&caseID='}{$caseID}"{literal}; | |
282 | sourceUrl = sourceUrl + '&cid={/literal}{$contactID}{literal}'; | |
283 | sourceUrl = sourceUrl + '&userID={/literal}{$userID}{literal}'; | |
284 | ||
285 | $('#clientRelationships-selector-{/literal}{$caseID}{literal} th').each( function( ) { | |
286 | if ( $(this).attr('id') != 'nosort' ) { | |
287 | columns += '{"sClass": "' + $(this).attr('class') +'"},'; | |
288 | } | |
289 | else { | |
290 | columns += '{ "bSortable": false },'; | |
291 | } | |
292 | count++; | |
293 | }); | |
294 | ||
295 | columns = columns.substring(0, columns.length - 1 ); | |
296 | eval('columns =[' + columns + ']'); | |
297 | ||
298 | oTable = $('#clientRelationships-selector-{/literal}{$caseID}{literal}').dataTable({ | |
299 | "bFilter" : false, | |
300 | "bAutoWidth" : false, | |
301 | "aaSorting" : [], | |
302 | "aoColumns" : columns, | |
303 | "bProcessing": true, | |
304 | "bJQueryUI": true, | |
305 | "asStripClasses" : [ "odd-row", "even-row" ], | |
306 | "sPaginationType": "full_numbers", | |
307 | "sDom" : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>', | |
308 | "bServerSide": true, | |
309 | "sAjaxSource": sourceUrl, | |
310 | "iDisplayLength": 10, | |
311 | "fnDrawCallback": function() { setClientRelationshipsSelectorClass(); }, | |
312 | "fnServerData": function (sSource, aoData, fnCallback) { | |
313 | $.ajax( { | |
314 | "dataType": 'json', | |
315 | "type": "POST", | |
316 | "url": sSource, | |
317 | "data": aoData, | |
318 | "success": fnCallback | |
319 | }); | |
320 | } | |
66cae705 | 321 | }); |
6a488035 | 322 | } |
6a488035 | 323 | |
2c68626a DJ |
324 | function setClientRelationshipsSelectorClass( ) { |
325 | $("#clientRelationships-selector-{/literal}{$caseID}{literal} td:last-child").each(function() { | |
326 | $(this).parent().addClass($(this).text()); | |
327 | }); | |
328 | } | |
329 | }); | |
6a488035 TO |
330 | </script> |
331 | {/literal} | |
332 | <br /> | |
d79c94d5 | 333 | {if !empty($globalGroupInfo.id)} |
6a488035 | 334 | <div class="crm-submit-buttons"> |
2c68626a | 335 | <a class="button case-miniform" href="#addMembersToGroupDialog" rel="#globalRelationships-selector-{$caseId}" data-group_id="{$globalGroupInfo.id}"> |
52604b19 | 336 | <div class="icon ui-icon-circle-plus"></div>{ts 1=$globalGroupInfo.title}Add members to %1{/ts} |
c91df8b4 | 337 | </a> |
6a488035 | 338 | </div> |
d79c94d5 | 339 | <div id="addMembersToGroupDialog" class="hiddenElement"> |
ba9be71a | 340 | <input name="add_member_to_group_contact_id" placeholder="{ts}- select contacts -{/ts}" class="huge" /> |
d79c94d5 | 341 | </div> |
2c68626a | 342 | <table id="globalRelationships-selector-{$caseId}" class="report-layout"> |
6a488035 TO |
343 | <thead><tr> |
344 | <th>{$globalGroupInfo.title}</th> | |
345 | <th>{ts}Phone{/ts}</th> | |
346 | <th>{ts}Email{/ts}</th> | |
347 | </tr></thead> | |
348 | </table> | |
6a488035 TO |
349 | {/if} |
350 | ||
351 | {literal} | |
352 | <script type="text/javascript"> | |
2c68626a DJ |
353 | CRM.$(function($) { |
354 | buildCaseGlobalRelationships(false); | |
355 | function buildCaseGlobalRelationships(filterSearch) { | |
356 | if (filterSearch) { | |
357 | oTable.fnDestroy(); | |
358 | } | |
359 | var count = 0; | |
360 | var columns = ''; | |
361 | var sourceUrl = {/literal}"{crmURL p='civicrm/ajax/globalrelationships' h=0 q='snippet=4&caseID='}{$caseID}"{literal}; | |
362 | sourceUrl = sourceUrl + '&cid={/literal}{$contactID}{literal}'; | |
363 | sourceUrl = sourceUrl + '&userID={/literal}{$userID}{literal}'; | |
364 | ||
365 | $('#globalRelationships-selector-{/literal}{$caseID}{literal} th').each( function( ) { | |
366 | if ($(this).attr('id') != 'nosort') { | |
367 | columns += '{"sClass": "' + $(this).attr('class') +'"},'; | |
368 | } | |
369 | else { | |
370 | columns += '{ "bSortable": false },'; | |
371 | } | |
372 | count++; | |
373 | }); | |
374 | ||
375 | columns = columns.substring(0, columns.length - 1 ); | |
376 | eval('columns =[' + columns + ']'); | |
377 | ||
378 | oTable = $('#globalRelationships-selector-{/literal}{$caseID}{literal}').dataTable({ | |
379 | "bFilter" : false, | |
380 | "bAutoWidth" : false, | |
381 | "aaSorting" : [], | |
382 | "aoColumns" : columns, | |
383 | "bProcessing": true, | |
384 | "bJQueryUI": true, | |
385 | "asStripClasses" : [ "odd-row", "even-row" ], | |
386 | "sPaginationType": "full_numbers", | |
387 | "sDom" : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>', | |
388 | "bServerSide": true, | |
389 | "sAjaxSource": sourceUrl, | |
390 | "iDisplayLength": 10, | |
391 | "fnDrawCallback": function() { setGlobalRelationshipsSelectorClass(); }, | |
392 | "oLanguage": { | |
393 | "sEmptyTable": {/literal}'{ts escape='js' 1=$globalGroupInfo.title}The group %1 has no members.{/ts}'{literal} | |
394 | }, | |
395 | "fnServerData": function ( sSource, aoData, fnCallback ) { | |
396 | $.ajax( { | |
397 | "dataType": 'json', | |
398 | "type": "POST", | |
399 | "url": sSource, | |
400 | "data": aoData, | |
401 | "success": fnCallback | |
402 | }); | |
403 | } | |
404 | }); | |
405 | } | |
406 | ||
407 | function setGlobalRelationshipsSelectorClass( ) { | |
408 | $("#globalRelationships-selector-{/literal}{$caseID}{literal} td:last-child").each( function( ) { | |
409 | $(this).parent().addClass($(this).text() ); | |
410 | }); | |
411 | } | |
412 | }); | |
6a488035 TO |
413 | </script> |
414 | {/literal} | |
415 | </div><!-- /.crm-accordion-body --> | |
416 | </div><!-- /.crm-accordion-wrapper --> | |
417 | ||
418 | {/if} {* other relationship section ends *} | |
6a488035 | 419 | {include file="CRM/Case/Form/ActivityToCase.tpl"} |
6a488035 TO |
420 | |
421 | {* pane to display / edit regular tags or tagsets for cases *} | |
422 | {if $showTags OR $showTagsets} | |
423 | ||
424 | <div id="casetags" class="crm-accordion-wrapper crm-case-tags-block"> | |
425 | <div class="crm-accordion-header"> | |
426 | {ts}Case Tags{/ts} | |
427 | </div><!-- /.crm-accordion-header --> | |
428 | <div class="crm-accordion-body"> | |
429 | {assign var="tagExits" value=0} | |
430 | {if $tags} | |
6fd5424b | 431 | <div class="crm-block crm-content-block crm-case-caseview-display-tags"> {$tags}</div> |
6a488035 TO |
432 | {assign var="tagExits" value=1} |
433 | {/if} | |
434 | ||
6d538af3 | 435 | {foreach from=$tagsetInfo.case item=displayTagset} |
6a488035 TO |
436 | {if $displayTagset.entityTagsArray} |
437 | <div class="crm-block crm-content-block crm-case-caseview-display-tagset"> | |
438 | {$displayTagset.parentName}: | |
439 | {foreach from=$displayTagset.entityTagsArray item=val name="tagsetList"} | |
440 | {$val.name}{if !$smarty.foreach.tagsetList.last},{/if} | |
441 | {/foreach} | |
442 | </div> | |
443 | {assign var="tagExits" value=1} | |
444 | {/if} | |
445 | {/foreach} | |
446 | ||
447 | {if !$tagExits } | |
448 | <div class="status"> | |
449 | {ts}There are no tags currently assigned to this case.{/ts} | |
450 | </div> | |
451 | {/if} | |
452 | ||
6ce08914 | 453 | <div class="crm-submit-buttons"> |
c91df8b4 | 454 | <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 | 455 | </div> |
6a488035 TO |
456 | |
457 | </div><!-- /.crm-accordion-body --> | |
458 | </div><!-- /.crm-accordion-wrapper --> | |
459 | ||
c91df8b4 | 460 | <div id="manageTagsDialog" class="hiddenElement"> |
6a488035 TO |
461 | <div class="label">{$form.case_tag.label}</div> |
462 | <div class="view-value"><div class="crm-select-container">{$form.case_tag.html}</div> | |
463 | <br/> | |
6d538af3 | 464 | <div style="text-align:left;">{include file="CRM/common/Tagset.tpl" tagsetType='case'}</div> |
6a488035 TO |
465 | <br/> |
466 | <div class="clear"></div> | |
467 | </div> | |
468 | </div> | |
469 | ||
6a488035 TO |
470 | {/if} {* end of tag block*} |
471 | ||
fc7d8951 | 472 | {include file="CRM/Case/Form/ActivityTab.tpl"} |
6a488035 TO |
473 | |
474 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> | |
6a488035 TO |
475 | {/if} {* view related cases if end *} |
476 | </div> | |
21d5ed51 | 477 |