CRM-13992 : custom data single record view handling, DELETE action handling, QA check...
[civicrm-core.git] / templates / CRM / Contact / Page / View / CustomDataView.tpl
index d3426fa80a265d7edb8ed3f0a2800b03ab8056d9..7e862ed6f7df56a8a7f4360bd437c9e114a09c49 100644 (file)
@@ -1,6 +1,6 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -26,6 +26,7 @@
 {* Custom Data view mode*}
 {assign var="customGroupCount" value = 1}
 {foreach from=$viewCustomData item=customValues key=customGroupId}
+  {assign var="cgcount" value=1}
   {assign var="count" value=$customGroupCount%2}
   {if ($count eq $side) or $skipTitle }
     {foreach from=$customValues item=cd_edit key=cvID}
         <div class="collapsible-title">
           {$cd_edit.title}
         </div>
-        <div class="crm-summary-block" id="custom-set-block-{$customGroupId}">
-          {include file="CRM/Contact/Page/View/CustomDataFieldView.tpl" customGroupId=$customGroupId}
+        {if $cvID eq 0}
+          {assign var='cvID' value='-1'}
+        {/if}
+        <div class="crm-summary-block" id="custom-set-block-{$customGroupId}-{$cvID}">
+          {include file="CRM/Contact/Page/View/CustomDataFieldView.tpl" customGroupId=$customGroupId customRecId=$cvID cgcount=$cgcount}
         </div>
       </div>
+      {assign var="cgcount" value=$cgcount+1}
     {/foreach}
   {/if}
   {assign var="customGroupCount" value = $customGroupCount+1}