From fe06c0fb27bc61585abacb32a484f1eea05e0c7e Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Wed, 29 May 2013 15:04:12 +0530 Subject: [PATCH] more template cleanup --- .../CRM/Contact/Page/View/CustomData.tpl | 30 +-- templates/CRM/Custom/Page/CustomDataView.tpl | 211 +++++++++--------- 2 files changed, 126 insertions(+), 115 deletions(-) diff --git a/templates/CRM/Contact/Page/View/CustomData.tpl b/templates/CRM/Contact/Page/View/CustomData.tpl index 33df73b93d..55bb87034e 100644 --- a/templates/CRM/Contact/Page/View/CustomData.tpl +++ b/templates/CRM/Contact/Page/View/CustomData.tpl @@ -25,30 +25,30 @@ *} {* template for custom data *} {if $action eq 0 or $action eq 1 or $action eq 2 or $recordActivity} - {include file="CRM/Contact/Form/CustomData.tpl" mainEdit=$mainEditForm} + {include file="CRM/Contact/Form/CustomData.tpl" mainEdit=$mainEditForm} {/if} {strip} - {if $action eq 16 or $action eq 4} {* Browse or View actions *} -
- {include file="CRM/Custom/Page/CustomDataView.tpl"} -
- {/if} + {if $action eq 16 or $action eq 4} {* Browse or View actions *} +
+ {include file="CRM/Custom/Page/CustomDataView.tpl"} +
+ {/if} {/strip} - + {if $mainEditForm} - + {else} - {/if} diff --git a/templates/CRM/Custom/Page/CustomDataView.tpl b/templates/CRM/Custom/Page/CustomDataView.tpl index 06e994cd7e..81cd70ede8 100644 --- a/templates/CRM/Custom/Page/CustomDataView.tpl +++ b/templates/CRM/Custom/Page/CustomDataView.tpl @@ -26,124 +26,135 @@ {* Custom Data view mode*} {assign var="showEdit" value=1} {foreach from=$viewCustomData item=customValues key=customGroupId} - {foreach from=$customValues item=cd_edit key=cvID} - + {foreach from=$customValues item=cd_edit key=cvID} +
{assign var='index' value=$groupId|cat:"_$cvID"} - {if $editOwnCustomData or ($showEdit and $editCustomData and $groupId)} - - - + {if $editOwnCustomData or ($showEdit and $editCustomData and $groupId)} + + + {/if} {assign var="showEdit" value=0} - + - + + {/if} + {foreach from=$cd_edit.fields item=element key=field_id} +
-
{ts 1=$cd_edit.title}Edit %1{/ts}


-
+
{ts 1=$cd_edit.title}Edit %1{/ts}


+
-
- {if !$skipTitle} -
- {$cd_edit.title} -
- {/if} -
- {if $groupId and $cvID and $editCustomData} - +
+
+ {if !$skipTitle} +
+ {$cd_edit.title} +
{/if} - {foreach from=$cd_edit.fields item=element key=field_id} - - - {if $element.options_per_line != 0} - - - {else} - - {if $element.field_type == 'File'} - {if $element.field_value.displayURL} - - {else} - - {/if} - {else} - {if $element.field_data_type == 'Money'} - {if $element.field_type == 'Text'} - - {else} - - {/if} - {else} - - {/if} - {/if} - {/if} - -
{$element.field_title} - {* sort by fails for option per line. Added a variable to iterate through the element array*} - {foreach from=$element.field_value item=val} - {$val}
- {/foreach} -
{$element.field_title}{$element.field_value.fileName}{$element.field_value|crmMoney}{$element.field_value} - {if $element.contact_ref_id} - - {/if} - {if $element.field_data_type == 'Memo'} - {$element.field_value|nl2br} - {else} - {$element.field_value} - {/if} - {if $element.contact_ref_id} +
- {/foreach} -
-
- -
+ + {if $element.options_per_line != 0} + + + {else} + + {if $element.field_type == 'File'} + {if $element.field_value.displayURL} + + {else} + + {/if} + {else} + {if $element.field_data_type == 'Money'} + {if $element.field_type == 'Text'} + + {else} + + {/if} + {else} + + {/if} + {/if} + {/if} + +
{$element.field_title} + {* sort by fails for option per line. Added a variable to iterate through the element array*} + {foreach from=$element.field_value item=val} + {$val} +
+ {/foreach} +
{$element.field_title}{$element.field_value.fileName}{$element.field_value|crmMoney}{$element.field_value} + {if $element.contact_ref_id} + + {/if} + {if $element.field_data_type == 'Memo'} + {$element.field_value|nl2br} + {else} + {$element.field_value} + {/if} + {if $element.contact_ref_id} + + {/if} +
+ {/foreach} + + +
+ + + - - {/foreach} + + {/foreach} {/foreach} - {literal} +{literal} - {/literal} +{/literal} {*currently delete is available only for tab custom data*} {if $groupId} - + {/if} -- 2.25.1