Placeholder page for scheduled posts
This commit is contained in:
parent
302b2cecce
commit
ec5ed0cf46
4 changed files with 63 additions and 10 deletions
|
@ -17,7 +17,7 @@ General
|
||||||
* p - Profile
|
* p - Profile
|
||||||
* n - Network
|
* n - Network
|
||||||
* c - Community
|
* c - Community
|
||||||
* s - Search
|
* s - Search
|
||||||
* a - Admin
|
* a - Admin
|
||||||
* f - Notifications
|
* f - Notifications
|
||||||
* u - User menu
|
* u - User menu
|
||||||
|
@ -35,6 +35,7 @@ General
|
||||||
* v - Videos
|
* v - Videos
|
||||||
* e - Events and Calendar
|
* e - Events and Calendar
|
||||||
* t - Personal Notes
|
* t - Personal Notes
|
||||||
|
* o - Scheduled Posts
|
||||||
* k - View Contacts
|
* k - View Contacts
|
||||||
|
|
||||||
../contacts (contact list)
|
../contacts (contact list)
|
||||||
|
@ -66,7 +67,6 @@ General
|
||||||
* t - Sort by Post Date
|
* t - Sort by Post Date
|
||||||
* r - Conversation (Posts that mention or involve you)
|
* r - Conversation (Posts that mention or involve you)
|
||||||
* w - New posts
|
* w - New posts
|
||||||
* b - Bookmarks
|
|
||||||
* m - Favourite Posts
|
* m - Favourite Posts
|
||||||
|
|
||||||
../notifications
|
../notifications
|
||||||
|
|
|
@ -70,14 +70,15 @@ class BaseProfile extends BaseModule
|
||||||
'id' => 'photo-tab',
|
'id' => 'photo-tab',
|
||||||
'accesskey' => 'h',
|
'accesskey' => 'h',
|
||||||
],
|
],
|
||||||
[
|
// @todo Currently deactivated since it doesn't really work
|
||||||
'label' => DI::l10n()->t('Videos'),
|
// [
|
||||||
'url' => DI::baseUrl() . '/videos/' . $nickname,
|
// 'label' => DI::l10n()->t('Videos'),
|
||||||
'sel' => $current == 'videos' ? 'active' : '',
|
// 'url' => DI::baseUrl() . '/videos/' . $nickname,
|
||||||
'title' => DI::l10n()->t('Videos'),
|
// 'sel' => $current == 'videos' ? 'active' : '',
|
||||||
'id' => 'video-tab',
|
// 'title' => DI::l10n()->t('Videos'),
|
||||||
'accesskey' => 'v',
|
// 'id' => 'video-tab',
|
||||||
],
|
// 'accesskey' => 'v',
|
||||||
|
// ],
|
||||||
];
|
];
|
||||||
|
|
||||||
// the calendar link for the full featured events calendar
|
// the calendar link for the full featured events calendar
|
||||||
|
@ -112,6 +113,14 @@ class BaseProfile extends BaseModule
|
||||||
'id' => 'notes-tab',
|
'id' => 'notes-tab',
|
||||||
'accesskey' => 't',
|
'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 (empty($profile['hide-friends'])) {
|
||||||
|
|
43
src/Module/Profile/Schedule.php
Normal file
43
src/Module/Profile/Schedule.php
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @copyright Copyright (C) 2010-2021, the Friendica project
|
||||||
|
*
|
||||||
|
* @license GNU AGPL version 3 or any later version
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Friendica\Module\Profile;
|
||||||
|
|
||||||
|
use Friendica\DI;
|
||||||
|
use Friendica\Module\BaseProfile;
|
||||||
|
use Friendica\Network\HTTPException;
|
||||||
|
|
||||||
|
class Schedule extends BaseProfile
|
||||||
|
{
|
||||||
|
public static function content(array $parameters = [])
|
||||||
|
{
|
||||||
|
if (!local_user()) {
|
||||||
|
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$a = DI::app();
|
||||||
|
|
||||||
|
$o = self::getTabsHTML($a, 'schedule', true, $a->user);
|
||||||
|
|
||||||
|
$o .= DI::l10n()->t('Currently here is no functionality here. Please use an app to have a look at your scheduled posts.');
|
||||||
|
return $o;
|
||||||
|
}
|
||||||
|
}
|
|
@ -33,6 +33,7 @@ use Friendica\Module;
|
||||||
$profileRoutes = [
|
$profileRoutes = [
|
||||||
'' => [Module\Profile\Index::class, [R::GET]],
|
'' => [Module\Profile\Index::class, [R::GET]],
|
||||||
'/profile' => [Module\Profile\Profile::class, [R::GET]],
|
'/profile' => [Module\Profile\Profile::class, [R::GET]],
|
||||||
|
'/schedule' => [Module\Profile\Schedule::class, [R::GET]],
|
||||||
'/contacts/common' => [Module\Profile\Common::class, [R::GET]],
|
'/contacts/common' => [Module\Profile\Common::class, [R::GET]],
|
||||||
'/contacts[/{type}]' => [Module\Profile\Contacts::class, [R::GET]],
|
'/contacts[/{type}]' => [Module\Profile\Contacts::class, [R::GET]],
|
||||||
'/status[/{category}[/{date1}[/{date2}]]]' => [Module\Profile\Status::class, [R::GET]],
|
'/status[/{category}[/{date1}[/{date2}]]]' => [Module\Profile\Status::class, [R::GET]],
|
||||||
|
|
Loading…
Reference in a new issue