| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.7 | |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright CiviCRM LLC (c) 2004-2015 | |
| 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 | <div id="custom-set-content-{$customGroupId}" {if $permission EQ 'edit'} class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_CustomData", "groupID": "{$customGroupId}", "customRecId": "{$customRecId}", "cgcount" : "{$cgcount}"{rdelim}'{/if}> |
| 27 | <div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{ts}Edit{/ts}"{/if}> |
| 28 | {if $permission EQ 'edit'} |
| 29 | <div class="crm-edit-help"> |
| 30 | <span class="batch-edit"></span>{ts}Edit{/ts} |
| 31 | </div> |
| 32 | {/if} |
| 33 | |
| 34 | {foreach from=$cd_edit.fields item=element key=field_id} |
| 35 | <div class="crm-summary-row"> |
| 36 | {if $element.options_per_line != 0} |
| 37 | <div class="crm-label">{$element.field_title}</div> |
| 38 | <div class="crm-content crm-custom_data"> |
| 39 | {* sort by fails for option per line. Added a variable to iterate through the element array*} |
| 40 | {foreach from=$element.field_value item=val} |
| 41 | {$val} |
| 42 | {/foreach} |
| 43 | </div> |
| 44 | {else} |
| 45 | <div class="crm-label">{$element.field_title}</div> |
| 46 | {if $element.field_type == 'File'} |
| 47 | {if $element.field_value.displayURL} |
| 48 | <div class="crm-content crm-custom_data crm-displayURL"> |
| 49 | <a href="{$element.field_value.displayURL}" class='crm-image-popup'> |
| 50 | <img src="{$element.field_value.displayURL}" height = "{$element.field_value.imageThumbHeight}" |
| 51 | width="{$element.field_value.imageThumbWidth}"> |
| 52 | </a> |
| 53 | </div> |
| 54 | {else} |
| 55 | <div class="crm-content crm-custom_data crm-fileURL"> |
| 56 | <a href="{$element.field_value.fileURL}">{$element.field_value.fileName}</a> |
| 57 | </div> |
| 58 | {/if} |
| 59 | {elseif $element.field_data_type EQ 'ContactReference' && $element.contact_ref_id} |
| 60 | {*Contact ref id passed if user has sufficient permissions - so make a link.*} |
| 61 | <div class="crm-content crm-custom-data crm-contact-reference"> |
| 62 | <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$element.contact_ref_id`"}" title="view contact">{$element.field_value}</a> |
| 63 | </div> |
| 64 | {elseif $element.field_data_type EQ 'Memo'} |
| 65 | <div class="crm-content crm-custom-data">{$element.field_value|nl2br}</div> |
| 66 | {else} |
| 67 | <div class="crm-content crm-custom-data">{$element.field_value}</div> |
| 68 | {/if} |
| 69 | {/if} |
| 70 | </div> |
| 71 | {/foreach} |
| 72 | </div> |
| 73 | </div> |