| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.6 | |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
| 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 | {* include wysiwyg related files*} |
| 27 | {if !$includeWysiwygEditor} |
| 28 | {include file="CRM/common/wysiwyg.tpl" includeWysiwygEditor=true} |
| 29 | {/if} |
| 30 | {* Custom Data view mode*} |
| 31 | {foreach from=$viewCustomData item=customValues key=customGroupId} |
| 32 | {foreach from=$customValues item=cd_edit key=cvID} |
| 33 | {assign var='index' value=$groupId|cat:"_$cvID"} |
| 34 | <div id="{$cd_edit.name}" class="crm-accordion-wrapper {if $cd_edit.collapse_display neq 0}collapsed{/if}"> |
| 35 | <div class="crm-accordion-header"> |
| 36 | {$cd_edit.title} |
| 37 | </div> |
| 38 | <div class="crm-accordion-body"> |
| 39 | {foreach from=$cd_edit.fields item=element key=field_id} |
| 40 | <table class="crm-info-panel"> |
| 41 | <tr> |
| 42 | {if $element.options_per_line != 0} |
| 43 | <td class="label">{$element.field_title}</td> |
| 44 | <td class="html-adjust"> |
| 45 | {* sort by fails for option per line. Added a variable to iterate through the element array*} |
| 46 | {foreach from=$element.field_value item=val} |
| 47 | {$val}<br/> |
| 48 | {/foreach} |
| 49 | </td> |
| 50 | {else} |
| 51 | <td class="label">{$element.field_title}</td> |
| 52 | {if $element.field_type == 'File'} |
| 53 | {if $element.field_value.displayURL} |
| 54 | <td class="html-adjust"> |
| 55 | <a href="{$element.field_value.displayURL}" class='crm-image-popup'> |
| 56 | <img src="{$element.field_value.displayURL}" height = "100" width="100"> |
| 57 | </a> |
| 58 | </td> |
| 59 | {else} |
| 60 | <td class="html-adjust"> |
| 61 | <a href="{$element.field_value.fileURL}">{$element.field_value.fileName}</a> |
| 62 | </td> |
| 63 | {/if} |
| 64 | {else} |
| 65 | <td class="html-adjust">{$element.field_value}</td> |
| 66 | {/if} |
| 67 | {/if} |
| 68 | </tr> |
| 69 | </table> |
| 70 | {/foreach} |
| 71 | <div> |
| 72 | <a href="{crmURL p="civicrm/case/cd/edit" q="cgcount=1&action=update&reset=1&type=Case&entityID=$caseID&groupID=$customGroupId&cid=$contactID&subType=$caseTypeID"}" class="button"> |
| 73 | <span><div class="icon edit-icon"></div>{ts}Edit{/ts}</span> |
| 74 | </a> |
| 75 | </div> |
| 76 | <br/> |
| 77 | <div class="clear"></div> |
| 78 | </div> |
| 79 | </div> |
| 80 | |
| 81 | {/foreach} |
| 82 | {/foreach} |
| 83 | <div id="case_custom_edit"></div> |