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/Content/Widget/VCard.php b/src/Content/Widget/VCard.php index 62a8e90853..d5a565f925 100644 --- a/src/Content/Widget/VCard.php +++ b/src/Content/Widget/VCard.php @@ -119,6 +119,8 @@ class VCard '$unfollow_link' => $unfollow_link, '$wallmessage' => DI::l10n()->t('Message'), '$wallmessage_link' => $wallmessage_link, + '$mentioning' => DI::l10n()->t('Mention'), + '$post2group' => DI::l10n()->t('Post to group'), ]); } } diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 243b48ad1d..02132c0f1d 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1177,8 +1177,10 @@ class Contact } $pm_url = ''; + $mention_url = ''; $status_link = ''; $photos_link = ''; + $self = false; if (($contact['network'] === Protocol::DFRN) && !$contact['self'] && empty($contact['pending'])) { $profile_link = 'contact/redir/' . $contact['id']; @@ -1197,8 +1199,20 @@ class Contact $pm_url = 'message/new/' . $contact['id']; } + if (in_array($contact['rel'], [contact::SHARING])) { + $mention_url = 'compose/0?body=!' . $contact['addr']; + } else { + $mention_url = 'compose/0?body=@' . $contact['addr']; + } + + + if (in_array($contact['rel'], [contact::SHARING])) { + $self = true; + } + $contact_url = 'contact/' . $contact['id']; $posts_link = 'contact/' . $contact['id'] . '/conversations'; + $group_link = 'network/group/' . $contact['id']; $follow_link = ''; $unfollow_link = ''; @@ -1221,6 +1235,8 @@ class Contact 'edit' => [DI::l10n()->t('View Contact'), $contact_url, false], 'follow' => [DI::l10n()->t('Connect/Follow'), $follow_link, true], 'unfollow' => [DI::l10n()->t('Unfollow'), $unfollow_link, true], + 'mention' => [DI::l10n()->t('Mention'), DI::l10n()->t('Post to group'), $mention_url, false], + 'group' => [DI::l10n()->t('View group'), $group_link, $contact['forum'], true], ]; } else { $menu = [ @@ -1230,8 +1246,11 @@ 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], + 'group' => [DI::l10n()->t('View group'), $group_link, $contact['forum'], true], + 'self' => [$self], ]; if (!empty($contact['pending'])) { diff --git a/view/lang/de/strings.php b/view/lang/de/strings.php index f20617d0b2..e9c35e6669 100644 --- a/view/lang/de/strings.php +++ b/view/lang/de/strings.php @@ -2961,3 +2961,6 @@ $a->strings['Connect Services'] = 'Verbinde Dienste'; $a->strings['Find Friends'] = 'Kontakte finden'; $a->strings['Last users'] = 'Letzte Nutzer'; $a->strings['Quick Start'] = 'Schnell-Start'; +$a->strings['Mention'] = 'Erwähne'; +$a->strings['Post to group'] = 'In Gruppe posten'; + diff --git a/view/templates/hovercard.tpl b/view/templates/hovercard.tpl index 563a5a248e..0fdcffaf24 100644 --- a/view/templates/hovercard.tpl +++ b/view/templates/hovercard.tpl @@ -22,6 +22,7 @@ {{* @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 && !$profile.actions.self}}{{/if}}
{{if $profile.actions.network}}{{/if}} diff --git a/view/theme/frio/templates/profile/vcard.tpl b/view/theme/frio/templates/profile/vcard.tpl index cc67227a2a..f707e7d6af 100644 --- a/view/theme/frio/templates/profile/vcard.tpl +++ b/view/theme/frio/templates/profile/vcard.tpl @@ -70,6 +70,13 @@
{{/if}} + {{if $profile.addr}} + + {{/if}} {{/if}} diff --git a/view/theme/frio/templates/widget/vcard.tpl b/view/theme/frio/templates/widget/vcard.tpl index 9fef57a9d7..ecc47bea29 100644 --- a/view/theme/frio/templates/widget/vcard.tpl +++ b/view/theme/frio/templates/widget/vcard.tpl @@ -56,6 +56,14 @@ {{/if}} + {{if $contact.addr}} + + {{/if}}