]> git.mxchange.org Git - friendica.git/commitdiff
Contacts can now be updated from every theme
authorMichael <heluecht@pirati.ca>
Sun, 22 Nov 2020 08:15:17 +0000 (08:15 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 22 Nov 2020 08:15:17 +0000 (08:15 +0000)
src/Module/Contact.php
src/Module/Contact/Advanced.php
view/templates/contact/advanced.tpl
view/templates/contact_edit.tpl
view/theme/frio/templates/contact/advanced.tpl
view/theme/vier/templates/contact_edit.tpl

index 08256bcf566093dda03f3b6535b6706352c225f7..4642401a28e4d47cf5b0d0e1e6e3d235d8bc084b 100644 (file)
@@ -1139,7 +1139,7 @@ class Contact extends BaseModule
                        ];
                }
 
-               if (in_array($contact['network'], Protocol::FEDERATED)) {
+               if (in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
                        $contact_actions['updateprofile'] = [
                                'label' => DI::l10n()->t('Refetch contact data'),
                                'url'   => 'contact/' . $contact['id'] . '/updateprofile',
index 91536a8889555317b00b6e9281f08b7e2f896849..b37a9affc95abf8a814c69defa784a9bebdfeae1 100644 (file)
@@ -128,8 +128,6 @@ class Advanced extends BaseModule
                        '$info'              => $info,
                        '$returnaddr'        => $returnaddr,
                        '$return'            => DI::l10n()->t('Return to contact editor'),
-                       '$update_profile'    => in_array($contact['network'], Protocol::FEDERATED),
-                       '$udprofilenow'      => DI::l10n()->t('Refetch contact data'),
                        '$contact_id'        => $contact['id'],
                        '$lbl_submit'        => DI::l10n()->t('Submit'),
 
index 487f27a0eb0fc3b7a0c3685e6686110cb3e88e35..004de53c15cf286985628a112cdf665b1b64e725 100644 (file)
 
        <!-- <h4>{{$contact_name}}</h4> -->
 
-       <div id="contact-update-profile-wrapper">
-       {{if $update_profile}}
-               <span id="contact-update-profile-now" class="button"><a href="contact/{{$contact_id}}/updateprofile" >{{$udprofilenow}}</a></span>
-       {{/if}}
-       </div>
-
        {{include file="field_input.tpl" field=$name}}
 
        {{include file="field_input.tpl" field=$nick}}
index 9d93494a1b24c13065424f497405d236c2d5df01..c98b44e439e44db650638b28976994190786c2e2 100644 (file)
@@ -17,6 +17,7 @@
                                                <ul role="menu" aria-haspopup="true" id="contact-actions-menu" class="menu-popup" >
                                                        {{if $lblsuggest}}<li role="menuitem"><a  href="#" title="{{$contact_actions.suggest.title}}" onclick="window.location.href='{{$contact_actions.suggest.url}}'; return false;">{{$contact_actions.suggest.label}}</a></li>{{/if}}
                                                        {{if $poll_enabled}}<li role="menuitem"><a  href="#" title="{{$contact_actions.update.title}}" onclick="window.location.href='{{$contact_actions.update.url}}'; return false;">{{$contact_actions.update.label}}</a></li>{{/if}}
+                                                       {{if $contact_actions.updateprofile}}<li role="menuitem"><a href="{{$contact_actions.updateprofile.url}}" title="{{$contact_actions.updateprofile.title}}">{{$contact_actions.updateprofile.label}}</a></li>{{/if}}
                                                        <li class="divider"></li>
                                                        <li role="menuitem"><a  href="#" title="{{$contact_actions.block.title}}" onclick="window.location.href='{{$contact_actions.block.url}}'; return false;">{{$contact_actions.block.label}}</a></li>
                                                        <li role="menuitem"><a  href="#" title="{{$contact_actions.ignore.title}}" onclick="window.location.href='{{$contact_actions.ignore.url}}'; return false;">{{$contact_actions.ignore.label}}</a></li>
index 6dff44a755c011ce06fac2951e9ee914d2f2ca4d..9aca5997a52aa8ec19e9bfbdb89262139dcc151b 100644 (file)
 
                <!-- <h4>{{$contact_name}}</h4> -->
 
-               <div id="contact-update-profile-wrapper">
-               {{if $update_profile}}
-                       <span id="contact-update-profile-now" class="button"><a href="contact/{{$contact_id}}/updateprofile" >{{$udprofilenow}}</a></span>
-               {{/if}}
-               </div>
-
                {{include file="field_input.tpl" field=$name}}
 
                {{include file="field_input.tpl" field=$nick}}
index e4e9ec44fb8ca10a7117dca113f857a9f01d47af..f89915d5f990f4c0e44fa1415306154c4c19e804 100644 (file)
@@ -18,6 +18,7 @@
                                                <ul role="menu" aria-haspopup="true" id="contact-actions-menu" class="menu-popup" >
                                                        {{if $lblsuggest}}<li role="menuitem"><a  href="#" title="{{$contact_actions.suggest.title}}" onclick="window.location.href='{{$contact_actions.suggest.url}}'; return false;">{{$contact_actions.suggest.label}}</a></li>{{/if}}
                                                        {{if $poll_enabled}}<li role="menuitem"><a  href="#" title="{{$contact_actions.update.title}}" onclick="window.location.href='{{$contact_actions.update.url}}'; return false;">{{$contact_actions.update.label}}</a></li>{{/if}}
+                                                       {{if $contact_actions.updateprofile}}<li role="menuitem"><a href="{{$contact_actions.updateprofile.url}}" title="{{$contact_actions.updateprofile.title}}">{{$contact_actions.updateprofile.label}}</a></li>{{/if}}
                                                        <li class="divider"></li>
                                                        <li role="menuitem"><a  href="#" title="{{$contact_actions.block.title}}" onclick="window.location.href='{{$contact_actions.block.url}}'; return false;">{{$contact_actions.block.label}}</a></li>
                                                        <li role="menuitem"><a  href="#" title="{{$contact_actions.ignore.title}}" onclick="window.location.href='{{$contact_actions.ignore.url}}'; return false;">{{$contact_actions.ignore.label}}</a></li>