Merge pull request #15840 from yashodha/participant_edit
[civicrm-core.git] / templates / CRM / Contact / Page / Inline / Address.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {* template for a single address block*}
11 <div id="address-block-{$locationIndex}" class="address {if $add}crm-address_type_{$add.location_type}{else}add-new{/if}{if $permission EQ 'edit'} crm-inline-edit" data-dependent-fields='["#crm-contactinfo-content", ".crm-inline-edit.address:not(.add-new)"]' data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_Address", "locno": "{$locationIndex}", "aid": "{if $add}{$add.id}{else}0{/if}"{rdelim}' data-location-type-id="{if $add}{$add.location_type_id}{else}0{/if}{/if}">
12 <div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{if $add}{ts}Edit address{/ts}{else}{ts}Add address{/ts}{/if}"{/if}>
13 {if $permission EQ 'edit'}
14 <div class="crm-edit-help">
15 <span class="crm-i fa-pencil"></span> {if $add}{ts}Edit address{/ts}{else}{ts}Add address{/ts}{/if}
16 </div>
17 {/if}
18 {if !$add}
19 <div class="crm-summary-row">
20 <div class="crm-label">{ts}Address{/ts}</div>
21 <div class="crm-content"></div>
22 </div>
23 {else}
24 <div class="crm-summary-row {if $add.is_primary eq 1} primary{/if}">
25 <div class="crm-label">
26 {ts 1=$add.location_type}%1 Address{/ts}
27 {if $privacy.do_not_mail}<span class="icon privacy-flag do-not-mail" title="{ts}Privacy flag: Do Not Mail{/ts}"></span>{/if}
28 {if $config->mapProvider AND
29 !empty($add.geo_code_1) AND
30 is_numeric($add.geo_code_1) AND
31 !empty($add.geo_code_2) AND
32 is_numeric($add.geo_code_2)
33 }
34 <br /><a href="{crmURL p='civicrm/contact/map' q="reset=1&cid=`$contactId`&lid=`$add.location_type_id`"}" title="{ts 1=`$add.location_type`}Map %1 Address{/ts}"><span class="geotag">{ts}Map{/ts}</span></a>
35 {/if}
36 </div>
37 <div class="crm-content">
38 {if !empty($sharedAddresses.$locationIndex.shared_address_display.name)}
39 <strong>{ts 1=$sharedAddresses.$locationIndex.shared_address_display.name}Address belongs to %1{/ts}</strong><br />
40 {/if}
41 {$add.display|nl2br}
42 </div>
43 </div>
44
45 <!-- add custom data -->
46 {foreach from=$add.custom item=customGroup key=cgId} {* start of outer foreach *}
47 {assign var="isAddressCustomPresent" value=1}
48 {foreach from=$customGroup item=customValue key=cvId}
49 <div id="address_custom_{$cgId}_{$locationIndex}"
50 class="crm-collapsible crm-address-custom-{$cgId}-{$locationIndex}-accordion
51 {if $customValue.collapse_display}collapsed{/if}">
52 <div class="collapsible-title">
53 {$customValue.title}
54 </div>
55 <div class="crm-summary-block">
56 {foreach from=$customValue.fields item=customField key=cfId}
57 <div class="crm-summary-row">
58 <div class="crm-label">
59 {$customField.field_title}
60 </div>
61 <div class="crm-content">
62 {$customField.field_value}
63 </div>
64 </div>
65 {/foreach}
66 </div>
67 </div>
68 {/foreach}
69 {/foreach} {* end of outer custom group foreach *}
70 <!-- end custom data -->
71 {/if}
72 </div>
73 </div>