| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | Copyright CiviCRM LLC. All rights reserved. | |
| 4 | | | |
| 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 | |
| 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*} |
| 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} |
| 33 | </td> |
| 34 | {else} |
| 35 | <td class="label">{$element.field_title}</td> |
| 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> |
| 43 | {/if} |
| 44 | </tr> |
| 45 | </table> |
| 46 | {/foreach} |
| 47 | <div> |
| 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} |
| 49 | </div> |
| 50 | <br/> |
| 51 | <div class="clear"></div> |
| 52 | </div> |
| 53 | </div> |
| 54 | |
| 55 | {/foreach} |
| 56 | {/foreach} |
| 57 | <div id="case_custom_edit"></div> |