| 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 | {* template for a single address block*} |
| 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}"> |
| 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"> |
| 31 | <span class="batch-edit"></span>{if $add}{ts}Edit address{/ts}{else}{ts}Add address{/ts}{/if} |
| 32 | </div> |
| 33 | {/if} |
| 34 | {if $add } |
| 35 | <div class="crm-summary-row {if $add.is_primary eq 1} primary{/if}"> |
| 36 | <div class="crm-label"> |
| 37 | {ts 1=$add.location_type}%1 Address{/ts} |
| 38 | {if $privacy.do_not_mail}<span class="icon privacy-flag do-not-mail" title="{ts}Privacy flag: Do Not Mail{/ts}"></span>{/if} |
| 39 | {if $config->mapProvider AND |
| 40 | !empty($add.geo_code_1) AND |
| 41 | is_numeric($add.geo_code_1) AND |
| 42 | !empty($add.geo_code_2) AND |
| 43 | is_numeric($add.geo_code_2) |
| 44 | } |
| 45 | <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> |
| 46 | {/if} |
| 47 | </div> |
| 48 | <div class="crm-content"> |
| 49 | {if !empty($sharedAddresses.$locationIndex.shared_address_display.name)} |
| 50 | <strong>{ts 1=$sharedAddresses.$locationIndex.shared_address_display.name}Address belongs to %1{/ts}</strong><br /> |
| 51 | {/if} |
| 52 | {$add.display|nl2br} |
| 53 | </div> |
| 54 | </div> |
| 55 | |
| 56 | <!-- add custom data --> |
| 57 | {foreach from=$add.custom item=customGroup key=cgId} {* start of outer foreach *} |
| 58 | {assign var="isAddressCustomPresent" value=1} |
| 59 | {foreach from=$customGroup item=customValue key=cvId} |
| 60 | <div id="address_custom_{$cgId}_{$locationIndex}" |
| 61 | class="crm-collapsible crm-address-custom-{$cgId}-{$locationIndex}-accordion |
| 62 | {if $customValue.collapse_display}collapsed{/if}"> |
| 63 | <div class="collapsible-title"> |
| 64 | {$customValue.title} |
| 65 | </div> |
| 66 | <div class="crm-summary-block"> |
| 67 | {foreach from=$customValue.fields item=customField key=cfId} |
| 68 | <div class="crm-summary-row"> |
| 69 | <div class="crm-label"> |
| 70 | {$customField.field_title} |
| 71 | </div> |
| 72 | <div class="crm-content"> |
| 73 | {$customField.field_value} |
| 74 | </div> |
| 75 | </div> |
| 76 | {/foreach} |
| 77 | </div> |
| 78 | </div> |
| 79 | {/foreach} |
| 80 | {/foreach} {* end of outer custom group foreach *} |
| 81 | <!-- end custom data --> |
| 82 | {/if} |
| 83 | </div> |
| 84 | </div> |