* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function getTabsHTML(App $a, string $current, bool $is_owner, array $profile)
+ public static function getTabsHTML(App $a, string $current, bool $is_owner, string $nickname, bool $hide_friends)
{
- $nickname = $profile['nickname'];
-
$baseProfileUrl = DI::baseUrl() . '/profile/' . $nickname;
$tabs = [
'accesskey' => 'h',
],
[
- 'label' => DI::l10n()->t('Videos'),
- 'url' => DI::baseUrl() . '/videos/' . $nickname,
- 'sel' => $current == 'videos' ? 'active' : '',
- 'title' => DI::l10n()->t('Videos'),
- 'id' => 'video-tab',
- 'accesskey' => 'v',
+ 'label' => DI::l10n()->t('Media'),
+ 'url' => $baseProfileUrl . '/media',
+ 'sel' => $current == 'media' ? 'active' : '',
+ 'title' => DI::l10n()->t('Media'),
+ 'id' => 'media-tab',
+ 'accesskey' => 'd',
],
];
'id' => 'notes-tab',
'accesskey' => 't',
];
+ $tabs[] = [
+ 'label' => DI::l10n()->t('Scheduled Posts'),
+ 'url' => $baseProfileUrl . '/schedule',
+ 'sel' => $current == 'schedule' ? 'active' : '',
+ 'title' => DI::l10n()->t('Posts that are scheduled for publishing'),
+ 'id' => 'schedule-tab',
+ 'accesskey' => 'o',
+ ];
}
- if (empty($profile['hide-friends'])) {
+ if (!$hide_friends) {
$tabs[] = [
'label' => DI::l10n()->t('Contacts'),
'url' => $baseProfileUrl . '/contacts',