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
|
||||
* n - Network
|
||||
* c - Community
|
||||
* s - Search
|
||||
* s - Search
|
||||
* a - Admin
|
||||
* f - Notifications
|
||||
* u - User menu
|
||||
|
@ -35,6 +35,7 @@ General
|
|||
* v - Videos
|
||||
* e - Events and Calendar
|
||||
* t - Personal Notes
|
||||
* o - Scheduled Posts
|
||||
* k - View Contacts
|
||||
|
||||
../contacts (contact list)
|
||||
|
@ -66,7 +67,6 @@ General
|
|||
* t - Sort by Post Date
|
||||
* r - Conversation (Posts that mention or involve you)
|
||||
* w - New posts
|
||||
* b - Bookmarks
|
||||
* m - Favourite Posts
|
||||
|
||||
../notifications
|
||||
|
|
|
@ -70,14 +70,15 @@ class BaseProfile extends BaseModule
|
|||
'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',
|
||||
],
|
||||
// @todo Currently deactivated since it doesn't really work
|
||||
// [
|
||||
// 'label' => DI::l10n()->t('Videos'),
|
||||
// 'url' => DI::baseUrl() . '/videos/' . $nickname,
|
||||
// 'sel' => $current == 'videos' ? 'active' : '',
|
||||
// 'title' => DI::l10n()->t('Videos'),
|
||||
// 'id' => 'video-tab',
|
||||
// 'accesskey' => 'v',
|
||||
// ],
|
||||
];
|
||||
|
||||
// the calendar link for the full featured events calendar
|
||||
|
@ -112,6 +113,14 @@ 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($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 = [
|
||||
'' => [Module\Profile\Index::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[/{type}]' => [Module\Profile\Contacts::class, [R::GET]],
|
||||
'/status[/{category}[/{date1}[/{date2}]]]' => [Module\Profile\Status::class, [R::GET]],
|
||||
|
|
Loading…
Reference in a new issue