]> git.mxchange.org Git - friendica.git/commitdiff
set label in hovercard for mentionings
authorJakobus Schürz (admin) <adminjs@schuerz.at>
Sun, 1 Oct 2023 12:03:03 +0000 (14:03 +0200)
committerJakobus Schürz (admin) <adminjs@schuerz.at>
Sun, 1 Oct 2023 12:03:03 +0000 (14:03 +0200)
src/Content/Item.php
src/Model/Contact.php
view/templates/hovercard.tpl

index c94ec1299b3f5bc0bb9482cc1e8844cc2b91e705..9e50602df6f3e579839a8451195b809fd9345d91 100644 (file)
@@ -432,6 +432,8 @@ class Item
                                $this->l10n->t('Network Posts') => $posts_link,
                                $this->l10n->t('View Contact') => $contact_url,
                                $this->l10n->t('Send PM') => $pm_url,
+                               $this->l10n->t('Mention') => $mention_url,
+                               $this->l10n->t('Post to group') => $mention_url,
                                $this->l10n->t('Block') => $block_link,
                                $this->l10n->t('Ignore') => $ignore_link,
                                $this->l10n->t('Collapse') => $collapse_link,
index 243b48ad1d2124c6c08724f41f21bbdf1fe293f9..a8ee936861ae2b87f11c315d582a056a42ccbc7d 100644 (file)
@@ -1177,6 +1177,7 @@ class Contact
                }
 
                $pm_url      = '';
+               $mention_url = '';
                $status_link = '';
                $photos_link = '';
 
@@ -1197,6 +1198,7 @@ class Contact
                        $pm_url = 'message/new/' . $contact['id'];
                }
 
+               $mention_url = 'compose/0?body=@' . $contact['addr'];
                $contact_url = 'contact/' . $contact['id'];
                $posts_link = 'contact/' . $contact['id'] . '/conversations';
 
@@ -1230,8 +1232,10 @@ class Contact
                                'network'  => [DI::l10n()->t('Network Posts'), $posts_link, false],
                                'edit'     => [DI::l10n()->t('View Contact'), $contact_url, false],
                                'pm'       => [DI::l10n()->t('Send PM'), $pm_url, false],
+                               'mention'  => [DI::l10n()->t('Mention'), DI::l10n()->t('Post to group'), $mention_url, false],
                                'follow'   => [DI::l10n()->t('Connect/Follow'), $follow_link, true],
                                'unfollow' => [DI::l10n()->t('Unfollow'), $unfollow_link, true],
+                               'isgroup'  => [$contact['forum'], true],
                        ];
 
                        if (!empty($contact['pending'])) {
index ff3b3101a30ce3286cca1c5afdd9adf72322e7d5..0162b8327eb0345fc221d0e6c244ffec83850619 100644 (file)
@@ -22,9 +22,9 @@
                                {{* @todo we have two different photo menus one for contacts and one for items at the network stream. We currently use the contact photo menu, so the items options are missing We need to move them *}}
                                <div class="hover-card-actions-social">
                                        {{if $profile.actions.pm}}<a class="btn btn-labeled btn-primary btn-sm add-to-modal" href="{{$profile.actions.pm.1}}" aria-label="{{$profile.actions.pm.0}}"><i class="fa fa-envelope" aria-hidden="true" title="{{$profile.actions.pm.0}}"></i><span class="sr-only">{{$profile.actions.pm.0}}</span></a>{{/if}}
+                                       {{if $profile.addr}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.mention.2}}" aria-label="{{if $profile.forum==1}}{{$profile.actions.mention.1}}{{else}}{{$profile.actions.mention.0}}{{/if}}" title="{{if $profile.actions.isgroup.0==1}}{{$profile.actions.mention.1}}{{else}}{{$profile.actions.mention.0}}{{/if}}"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>{{/if}}
                                </div>
                                <div class="hover-card-actions-connection">
-                                       {{if $profile.addr}}<a class="btn btn-labeled btn-primary btn-sm{{if !$always_open_compose}} modal-open{{/if}}" href="compose/0?body=@{{$profile.addr}}" aria-label="{{$mentioning}}" title="{{$mentioning}}"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>{{/if}}
                                        {{if $profile.actions.network}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.network.1}}" aria-label="{{$profile.actions.network.0}}" title="{{$profile.actions.network.0}}"><i class="fa fa-cloud" aria-hidden="true"></i></a>{{/if}}
                                        {{if $profile.actions.edit}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.edit.1}}" aria-label="{{$profile.actions.edit.0}}" title="{{$profile.actions.edit.0}}"><i class="fa fa-user" aria-hidden="true"></i></a>{{/if}}
                                        {{if $profile.actions.follow}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.follow.1}}" aria-label="{{$profile.actions.follow.0}}" title="{{$profile.actions.follow.0}}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{{/if}}