Remove over-specific location fields from vcard in favor of "location"

This commit is contained in:
Hypolite Petovan 2020-09-09 01:21:56 -04:00
parent fb7f7435c0
commit 6ad75f5b41
7 changed files with 27 additions and 63 deletions

View File

@ -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']);
}

View File

@ -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}}

View File

@ -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}}

View File

@ -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}}

View File

@ -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}}

View File

@ -4500,11 +4500,6 @@ hr.line-dots {
#page-footer {}
#live-profile {}
.city-state-zip {}
.country-name {}
.locality {}
.region {}
.postal-code {}
.mpfriend {}
.toplevel_item {}

View File

@ -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}}