Merge pull request #9168 from annando/issue-9135
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 9 Sep 2020 14:46:01 +0000 (10:46 -0400)
committerGitHub <noreply@github.com>
Wed, 9 Sep 2020 14:46:01 +0000 (10:46 -0400)
Issue 9135: Display only reshared posts at the top

CREDITS.txt
bin/dev/make_credits.py
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 402c356..1afbf16 100644 (file)
@@ -212,6 +212,7 @@ repat
 Ricardo Pereira
 Rik 4
 RJ Madsen
+Roger Meyer
 Roland Häder
 Rui Andrada
 rwa
index d895213..be7a52e 100755 (executable)
@@ -34,7 +34,7 @@ dontinclude = ['root', 'friendica', 'bavatar', 'tony baldwin', 'Taek', 'silke m'
 path = os.path.abspath(argv[0].split('bin/dev/make_credits.py')[0])
 print('> base directory is assumed to be: '+path)
 #  a place to store contributors
-contributors = ["Andi Stadler", "Ratten", "Vít Šesták 'v6ak'"]
+contributors = ["Andi Stadler", "Ratten", "Roger Meyer", "Vít Šesták 'v6ak'"]
 #  get the contributors
 print('> getting contributors to the friendica core repository')
 p = subprocess.Popen(['git', 'shortlog', '--no-merges', '-s'],
index 3cd3afe..0ed3930 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 ccf3a10..c4e9ea1 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 f40e98e..ed6d522 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 550bb62..b1d4ada 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 66422dd..992700f 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 f997f25..207aebb 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 5f8e718..06c7a02 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}}