set label in hovercard for mentionings

This commit is contained in:
Jakobus Schürz (admin) 2023-10-01 14:03:03 +02:00
parent ed9d20b291
commit 9dfe39b83d
3 changed files with 7 additions and 1 deletions

View 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,

View 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'])) {

View 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}}