CustomDataView.tpl clickable contact reference
[civicrm-core.git] / templates / CRM / Case / Page / CustomDataView.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
1188c7a8 3 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 4 | |
1188c7a8
TO
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
6a488035
TO
8 +--------------------------------------------------------------------+
9*}
10{* Custom Data view mode*}
11{foreach from=$viewCustomData item=customValues key=customGroupId}
12 {foreach from=$customValues item=cd_edit key=cvID}
13 {assign var='index' value=$groupId|cat:"_$cvID"}
14 <div id="{$cd_edit.name}" class="crm-accordion-wrapper {if $cd_edit.collapse_display neq 0}collapsed{/if}">
15 <div class="crm-accordion-header">
16 {$cd_edit.title}
17 </div>
18 <div class="crm-accordion-body">
19 {foreach from=$cd_edit.fields item=element key=field_id}
20 <table class="crm-info-panel">
21 <tr>
22 {if $element.options_per_line != 0}
23 <td class="label">{$element.field_title}</td>
24 <td class="html-adjust">
25 {* sort by fails for option per line. Added a variable to iterate through the element array*}
d621a53d 26 {if $element.field_data_type EQ 'ContactReference' && $element.contact_ref_links}
27 {', '|implode:$element.contact_ref_links}
28 {else}
29 {foreach from=$element.field_value item=val}
30 {$val}<br/>
31 {/foreach}
32 {/if}
6a488035
TO
33 </td>
34 {else}
ec3de1a9 35 <td class="label">{$element.field_title}</td>
d621a53d 36 <td class="html-adjust">
37 {if $element.field_data_type EQ 'ContactReference' && $element.contact_ref_links}
38 {', '|implode:$element.contact_ref_links}
39 {else}
40 {$element.field_value}
41 {/if}
42 </td>
6a488035
TO
43 {/if}
44 </tr>
45 </table>
46 {/foreach}
47 <div>
f7296a9a 48 {crmButton p="civicrm/case/cd/edit" q="cgcount=1&action=update&reset=1&type=Case&entityID=$caseID&groupID=$customGroupId&cid=$contactID&subType=$caseTypeID" icon="pencil"}{ts}Edit{/ts}{/crmButton}
6a488035
TO
49 </div>
50 <br/>
e08129f7 51 <div class="clear"></div>
6a488035 52 </div>
6a488035
TO
53 </div>
54
55 {/foreach}
56{/foreach}
57<div id="case_custom_edit"></div>