Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
f299f7db | 5 | | Copyright CiviCRM LLC (c) 2004-2020 | |
6a488035 TO |
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 | {* template for a single address block*} | |
fba9e4ed | 27 | <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}"> |
6a488035 TO |
28 | <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}> |
29 | {if $permission EQ 'edit'} | |
30 | <div class="crm-edit-help"> | |
fd10dc8d | 31 | <span class="crm-i fa-pencil"></span> {if $add}{ts}Edit address{/ts}{else}{ts}Add address{/ts}{/if} |
6a488035 TO |
32 | </div> |
33 | {/if} | |
f679927c CW |
34 | {if !$add} |
35 | <div class="crm-summary-row"> | |
36 | <div class="crm-label">{ts}Address{/ts}</div> | |
37 | <div class="crm-content"></div> | |
38 | </div> | |
39 | {else} | |
fba9e4ed | 40 | <div class="crm-summary-row {if $add.is_primary eq 1} primary{/if}"> |
6a488035 TO |
41 | <div class="crm-label"> |
42 | {ts 1=$add.location_type}%1 Address{/ts} | |
43 | {if $privacy.do_not_mail}<span class="icon privacy-flag do-not-mail" title="{ts}Privacy flag: Do Not Mail{/ts}"></span>{/if} | |
44 | {if $config->mapProvider AND | |
45 | !empty($add.geo_code_1) AND | |
46 | is_numeric($add.geo_code_1) AND | |
47 | !empty($add.geo_code_2) AND | |
48 | is_numeric($add.geo_code_2) | |
49 | } | |
50 | <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> | |
51 | {/if} | |
52 | </div> | |
53 | <div class="crm-content"> | |
54 | {if !empty($sharedAddresses.$locationIndex.shared_address_display.name)} | |
55 | <strong>{ts 1=$sharedAddresses.$locationIndex.shared_address_display.name}Address belongs to %1{/ts}</strong><br /> | |
56 | {/if} | |
57 | {$add.display|nl2br} | |
58 | </div> | |
59 | </div> | |
60 | ||
61 | <!-- add custom data --> | |
62 | {foreach from=$add.custom item=customGroup key=cgId} {* start of outer foreach *} | |
63 | {assign var="isAddressCustomPresent" value=1} | |
64 | {foreach from=$customGroup item=customValue key=cvId} | |
31037a42 EM |
65 | <div id="address_custom_{$cgId}_{$locationIndex}" |
66 | class="crm-collapsible crm-address-custom-{$cgId}-{$locationIndex}-accordion | |
6a488035 TO |
67 | {if $customValue.collapse_display}collapsed{/if}"> |
68 | <div class="collapsible-title"> | |
69 | {$customValue.title} | |
70 | </div> | |
71 | <div class="crm-summary-block"> | |
72 | {foreach from=$customValue.fields item=customField key=cfId} | |
73 | <div class="crm-summary-row"> | |
74 | <div class="crm-label"> | |
75 | {$customField.field_title} | |
76 | </div> | |
77 | <div class="crm-content"> | |
78 | {$customField.field_value} | |
79 | </div> | |
80 | </div> | |
81 | {/foreach} | |
82 | </div> | |
83 | </div> | |
84 | {/foreach} | |
85 | {/foreach} {* end of outer custom group foreach *} | |
86 | <!-- end custom data --> | |
87 | {/if} | |
88 | </div> | |
89 | </div> |