Ian province abbreviation patch - issue 724
[civicrm-core.git] / templates / CRM / Case / Page / CustomDataView.tpl
... / ...
CommitLineData
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{* Custom Data view mode*}
27{foreach from=$viewCustomData item=customValues key=customGroupId}
28 {foreach from=$customValues item=cd_edit key=cvID}
29 {assign var='index' value=$groupId|cat:"_$cvID"}
30 <div id="{$cd_edit.name}" class="crm-accordion-wrapper {if $cd_edit.collapse_display neq 0}collapsed{/if}">
31 <div class="crm-accordion-header">
32 {$cd_edit.title}
33 </div>
34 <div class="crm-accordion-body">
35 {foreach from=$cd_edit.fields item=element key=field_id}
36 <table class="crm-info-panel">
37 <tr>
38 {if $element.options_per_line != 0}
39 <td class="label">{$element.field_title}</td>
40 <td class="html-adjust">
41 {* sort by fails for option per line. Added a variable to iterate through the element array*}
42 {foreach from=$element.field_value item=val}
43 {$val}<br/>
44 {/foreach}
45 </td>
46 {else}
47 <td class="label">{$element.field_title}</td>
48 {if $element.field_type == 'File'}
49 {if $element.field_value.displayURL}
50 <td class="html-adjust">
51 <a href="{$element.field_value.displayURL}" class='crm-image-popup'>
52 <img src="{$element.field_value.displayURL}" height = "100" width="100">
53 </a>
54 </td>
55 {else}
56 <td class="html-adjust">
57 <a href="{$element.field_value.fileURL}">{$element.field_value.fileName}</a>
58 </td>
59 {/if}
60 {else}
61 <td class="html-adjust">{$element.field_value}</td>
62 {/if}
63 {/if}
64 </tr>
65 </table>
66 {/foreach}
67 <div>
68 {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}
69 </div>
70 <br/>
71 <div class="clear"></div>
72 </div>
73 </div>
74
75 {/foreach}
76{/foreach}
77<div id="case_custom_edit"></div>