]> git.mxchange.org Git - friendica.git/commitdiff
Placeholder page for scheduled posts
authorMichael <heluecht@pirati.ca>
Mon, 2 Aug 2021 12:10:03 +0000 (12:10 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 2 Aug 2021 12:10:03 +0000 (12:10 +0000)
doc/Accesskeys.md
src/Module/BaseProfile.php
src/Module/Profile/Schedule.php [new file with mode: 0644]
static/routes.config.php

index 9158efd58216fd40b26f75a8fa86550011ab5cbf..599d2b11904d78f8f1183f2e29d6dc18fa639c24 100644 (file)
@@ -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
index dca88f01c2b12d24a2286e83d4b59a2d0500f98b..832c8fd2f8928e53881f845159dc20ed5b2ed4a9 100644 (file)
@@ -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'])) {
diff --git a/src/Module/Profile/Schedule.php b/src/Module/Profile/Schedule.php
new file mode 100644 (file)
index 0000000..9ea5e0c
--- /dev/null
@@ -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;
+       }
+}
index 40739de7e2de87995d007def5026ac8892be8db2..825be5a94576f51fa4dfc9ed7a78d96562d6aef2 100644 (file)
@@ -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]],