X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FBaseProfile.php;h=1347ae0df335fbad2eee7e4af7afc2013a87fddc;hb=ae76fa1174f56e3d68473cf2a4b606838b514521;hp=be38a958377b93c93e09dd17595063b70d41e5d7;hpb=e80d68ba53776bed047d897f52db7e25b35a479d;p=friendica.git diff --git a/src/Module/BaseProfile.php b/src/Module/BaseProfile.php index be38a95837..1347ae0df3 100644 --- a/src/Module/BaseProfile.php +++ b/src/Module/BaseProfile.php @@ -1,6 +1,6 @@ user['nickname']; - } - $baseProfileUrl = DI::baseUrl() . '/profile/' . $nickname; $tabs = [ @@ -66,42 +61,42 @@ class BaseProfile extends BaseModule ], [ 'label' => DI::l10n()->t('Photos'), - 'url' => DI::baseUrl() . '/photos/' . $nickname, + 'url' => $baseProfileUrl . '/photos', 'sel' => $current == 'photos' ? 'active' : '', 'title' => DI::l10n()->t('Photo Albums'), 'id' => 'photo-tab', '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', ], ]; - // the calendar link for the full featured events calendar - if ($is_owner && $a->theme_events_in_profile) { + // the calendar link for the full-featured events calendar + if ($is_owner) { $tabs[] = [ - 'label' => DI::l10n()->t('Events'), - 'url' => DI::baseUrl() . '/events', - 'sel' => $current == 'events' ? 'active' : '', - 'title' => DI::l10n()->t('Events and Calendar'), - 'id' => 'events-tab', - 'accesskey' => 'e', + 'label' => DI::l10n()->t('Calendar'), + 'url' => DI::baseUrl() . '/calendar', + 'sel' => $current == 'calendar' ? 'active' : '', + 'title' => DI::l10n()->t('Calendar'), + 'id' => 'calendar-tab', + 'accesskey' => 'c', ]; // if the user is not the owner of the calendar we only show a calendar // with the public events of the calendar owner - } elseif (!$is_owner) { + } else { $tabs[] = [ - 'label' => DI::l10n()->t('Events'), - 'url' => DI::baseUrl() . '/cal/' . $nickname, - 'sel' => $current == 'cal' ? 'active' : '', - 'title' => DI::l10n()->t('Events and Calendar'), - 'id' => 'events-tab', - 'accesskey' => 'e', + 'label' => DI::l10n()->t('Calendar'), + 'url' => DI::baseUrl() . '/calendar/show/' . $nickname, + 'sel' => $current == 'calendar' ? 'active' : '', + 'title' => DI::l10n()->t('Calendar'), + 'id' => 'calendar-tab', + 'accesskey' => 'c', ]; } @@ -114,9 +109,17 @@ class BaseProfile extends BaseModule '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($a->profile['hide-friends'])) { + if (!$hide_friends) { $tabs[] = [ 'label' => DI::l10n()->t('Contacts'), 'url' => $baseProfileUrl . '/contacts',