Merge pull request #9169 from MrPetovan/bug/9163-double-location
Prevent double location display in vcard
This commit is contained in:
commit
b922d7ae28
7 changed files with 27 additions and 63 deletions
|
@ -354,13 +354,7 @@ class Profile
|
|||
// Fetch the account type
|
||||
$account_type = Contact::getAccountType($profile);
|
||||
|
||||
if (!empty($profile['address'])
|
||||
|| !empty($profile['location'])
|
||||
|| !empty($profile['locality'])
|
||||
|| !empty($profile['region'])
|
||||
|| !empty($profile['postal-code'])
|
||||
|| !empty($profile['country-name'])
|
||||
) {
|
||||
if (!empty($profile['address']) || !empty($profile['location'])) {
|
||||
$location = DI::l10n()->t('Location:');
|
||||
}
|
||||
|
||||
|
@ -427,10 +421,6 @@ class Profile
|
|||
$p['about'] = BBCode::convert($p['about']);
|
||||
}
|
||||
|
||||
if (empty($p['address']) && !empty($p['location'])) {
|
||||
$p['address'] = $p['location'];
|
||||
}
|
||||
|
||||
if (isset($p['address'])) {
|
||||
$p['address'] = BBCode::convert($p['address']);
|
||||
}
|
||||
|
|
|
@ -13,16 +13,12 @@
|
|||
{{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
|
||||
{{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
|
||||
{{if $location}}
|
||||
<dl class="location"><dt class="location-label">{{$location}}</dt>
|
||||
<dd class="adr h-adr">
|
||||
{{if $profile.address}}<div class="street-address p-street-address">{{$profile.address nofilter}}</div>{{/if}}
|
||||
<span class="city-state-zip">
|
||||
<span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}}
|
||||
<span class="region p-region">{{$profile.region}}</span>
|
||||
<span class="postal-code p-postal-code">{{$profile.postal_code}}</span>
|
||||
</span>
|
||||
{{if $profile.country_name}}<span class="country-name p-country-name">{{$profile.country_name}}</span>{{/if}}
|
||||
</dd>
|
||||
<dl class="location">
|
||||
<dt class="location-label">{{$location}}</dt>
|
||||
<dd class="adr h-adr">
|
||||
{{if $profile.address}}<p class="street-address p-street-address">{{$profile.address nofilter}}</p>{{/if}}
|
||||
{{if $profile.location}}<p class="p-location">{{$profile.location}}</p>{{/if}}
|
||||
</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
|
|
@ -12,16 +12,12 @@
|
|||
{{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
|
||||
|
||||
{{if $location}}
|
||||
<dl class="location"><dt class="location-label">{{$location}}</dt>
|
||||
<dd class="adr h-adr">
|
||||
{{if $profile.address}}<div class="street-address p-street-address">{{$profile.address nofilter}}</div>{{/if}}
|
||||
<span class="city-state-zip">
|
||||
<span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}}
|
||||
<span class="region p-region">{{$profile.region}}</span>
|
||||
<span class="postal-code p-postal-code">{{$profile.postal_code}}</span>
|
||||
</span>
|
||||
{{if $profile.country_name}}<span class="country-name p-country-name">{{$profile.country_name}}</span>{{/if}}
|
||||
</dd>
|
||||
<dl class="location">
|
||||
<dt class="location-label">{{$location}}</dt>
|
||||
<dd class="adr h-adr">
|
||||
{{if $profile.address}}<p class="street-address p-street-address">{{$profile.address nofilter}}</p>{{/if}}
|
||||
{{if $profile.location}}<p class="p-location">{{$profile.location}}</p>{{/if}}
|
||||
</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
|
|
@ -80,13 +80,8 @@
|
|||
<div class="location detail">
|
||||
<span class="location-label icon"><i class="fa fa-map-marker"></i></span>
|
||||
<span class="adr">
|
||||
{{if $profile.address}}<span class="street-address p-street-address">{{$profile.address nofilter}}</span>{{/if}}
|
||||
<span class="city-state-zip">
|
||||
<span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}}
|
||||
<span class="region p-region">{{$profile.region}}</span>
|
||||
<span class="postal-code p-postal-code">{{$profile.postal_code}}</span>
|
||||
</span>
|
||||
{{if $profile.country_name}}<span class="country-name p-country-name">{{$profile.country_name}}</span>{{/if}}
|
||||
{{if $profile.address}}<p class="street-address p-street-address">{{$profile.address nofilter}}</p>{{/if}}
|
||||
{{if $profile.location}}<p class="p-location">{{$profile.location}}</p>{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -24,16 +24,12 @@
|
|||
{{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
|
||||
|
||||
{{if $location}}
|
||||
<dl class="location"><dt class="location-label">{{$location}}</dt>
|
||||
<dd class="adr h-adr">
|
||||
{{if $profile.address}}<div class="street-address p-street-address">{{$profile.address nofilter}}</div>{{/if}}
|
||||
<span class="city-state-zip">
|
||||
<span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}}
|
||||
<span class="region p-region">{{$profile.region}}</span>
|
||||
<span class="postal-code p-postal-code">{{$profile.postal_code}}</span>
|
||||
</span>
|
||||
{{if $profile.country_name}}<span class="country-name p-country-name">{{$profile.country_name}}</span>{{/if}}
|
||||
</dd>
|
||||
<dl class="location">
|
||||
<dt class="location-label">{{$location}}</dt>
|
||||
<dd class="adr h-adr">
|
||||
{{if $profile.address}}<p class="street-address p-street-address">{{$profile.address nofilter}}</p>{{/if}}
|
||||
{{if $profile.location}}<p class="p-location">{{$profile.location}}</p>{{/if}}
|
||||
</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
|
|
@ -4500,11 +4500,6 @@ hr.line-dots {
|
|||
#page-footer {}
|
||||
#live-profile {}
|
||||
|
||||
.city-state-zip {}
|
||||
.country-name {}
|
||||
.locality {}
|
||||
.region {}
|
||||
.postal-code {}
|
||||
.mpfriend {}
|
||||
.toplevel_item {}
|
||||
|
||||
|
|
|
@ -20,16 +20,12 @@
|
|||
{{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
|
||||
{{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
|
||||
{{if $location}}
|
||||
<dl class="location"><dt class="location-label">{{$location}}</dt>
|
||||
<dd class="adr h-adr">
|
||||
{{if $profile.address}}<div class="street-address p-street-address">{{$profile.address nofilter}}</div>{{/if}}
|
||||
<span class="city-state-zip">
|
||||
<span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}}
|
||||
<span class="region p-region">{{$profile.region}}</span>
|
||||
<span class="postal-code p-postal-code">{{$profile.postal_code}}</span>
|
||||
</span>
|
||||
{{if $profile.country_name}}<span class="country-name p-country-name">{{$profile.country_name}}</span>{{/if}}
|
||||
</dd>
|
||||
<dl class="location">
|
||||
<dt class="location-label">{{$location}}</dt>
|
||||
<dd class="adr h-adr">
|
||||
{{if $profile.address}}<p class="street-address p-street-address">{{$profile.address nofilter}}</p>{{/if}}
|
||||
{{if $profile.location}}<p class="p-location">{{$profile.location}}</p>{{/if}}
|
||||
</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue