]> git.mxchange.org Git - friendica.git/commitdiff
Remove over-specific location fields from vcard in favor of "location"
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 9 Sep 2020 05:21:56 +0000 (01:21 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 9 Sep 2020 05:21:56 +0000 (01:21 -0400)
src/Model/Profile.php
view/templates/profile/vcard.tpl
view/theme/duepuntozero/templates/profile/vcard.tpl
view/theme/frio/templates/profile/vcard.tpl
view/theme/quattro/templates/profile/vcard.tpl
view/theme/smoothly/style.css
view/theme/vier/templates/profile/vcard.tpl

index 3cd3afe6cbea0f654bfad4648935522181d30df6..0ed393022b3f7ea108c6ca40d03fcfe1949990a0 100644 (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']);
                }
index ccf3a10bd59aad6f76784addaf95f6258be62f02..c4e9ea1d15f90adb69438ef0700d1cbbedc234ab 100644 (file)
        {{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}}
 
index f40e98e464fdcf4b2be0b27eec157601a362208f..ed6d52249468c41901f06bf3348c7424f8afd59a 100644 (file)
        {{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}}
 
index 550bb6265e39573801e46eba0a9b7c34f35268d7..b1d4ada2d5fed7dcd36c4658446c6720d0cf3267 100644 (file)
                <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}}
index 66422dd980e2862277e11b2757c864a3dbe1554a..992700f1084bd46b95bc296eb60664c5c33f6b65 100644 (file)
        {{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}}
 
index f997f2545ffdecc82dd0d7b2800a97576199135f..207aebbef2e88630d4ede0819dd9df1e9b248470 100644 (file)
@@ -4500,11 +4500,6 @@ hr.line-dots {
 #page-footer {}
 #live-profile {}
 
-.city-state-zip {}
-.country-name {}
-.locality {}
-.region {}
-.postal-code {}
 .mpfriend {}
 .toplevel_item {}
 
index 5f8e718f08439fc458f3f5277ddaa792f20de6a5..06c7a0235b36b86e39d733e19390c70cce6e3327 100644 (file)
        {{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}}