From: Jakobus Schürz (admin) Date: Sun, 1 Oct 2023 12:03:03 +0000 (+0200) Subject: set label in hovercard for mentionings X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9dfe39b83dd181590fe9ff59c11b69710d2f8d73;p=friendica.git set label in hovercard for mentionings --- diff --git a/src/Content/Item.php b/src/Content/Item.php index c94ec1299b..9e50602df6 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -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, diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 243b48ad1d..a8ee936861 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -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'])) { diff --git a/view/templates/hovercard.tpl b/view/templates/hovercard.tpl index ff3b3101a3..0162b8327e 100644 --- a/view/templates/hovercard.tpl +++ b/view/templates/hovercard.tpl @@ -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 *}}
{{if $profile.actions.pm}}{{$profile.actions.pm.0}}{{/if}} + {{if $profile.addr}}{{/if}}
- {{if $profile.addr}}{{/if}} {{if $profile.actions.network}}{{/if}} {{if $profile.actions.edit}}{{/if}} {{if $profile.actions.follow}}{{/if}}