Moved the notification list into the global space
authorAlexander Ebert <ebert@woltlab.com>
Mon, 23 May 2022 15:23:28 +0000 (17:23 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 23 May 2022 15:23:28 +0000 (17:23 +0200)
The notification list was placed in the user menu a long time ago, but never really fitted in there. The link was already (and continues to be) reachable through the drop-down menu, removing the need of an additional location.

Moving the notification list into the global page space makes more sense and aligns with similar lists such as the conversations.

com.woltlab.wcf/page.xml
com.woltlab.wcf/templates/notificationList.tpl
com.woltlab.wcf/userMenu.xml
wcfsetup/install/files/lib/page/NotificationListPage.class.php

index 12e29354bbed99e0e68d2eabfb3157a3e2583193..466ead8cad63360fe9cd55f64eed26eed32d4722 100644 (file)
                        <name language="de">Benachrichtigungen</name>
                        <name language="en">Notifications</name>
                        <hasFixedParent>1</hasFixedParent>
-                       <parent>com.woltlab.wcf.AccountManagement</parent>
                        <content language="en">
                                <title>Notifications</title>
                        </content>
@@ -877,4 +876,8 @@ E-Mail: [E-Mail-Adresse der verantwortlichen Stelle]</p><p><br></p><p>Verantwort
                        </content>
                </page>
        </import>
+       <delete>
+               <!-- The notification list is no longer part of the user menu. -->
+               <page identifier="com.woltlab.wcf.NotificationList"/>
+       </delete>
 </data>
index 62cd9904a6dbc8d996e714987627974f76ce8b3a..8d170328ec7dab556316dbb96d5aba9091d747f1 100644 (file)
@@ -1,27 +1,9 @@
-{capture assign='contentHeader'}
-       <header class="contentHeader">
-               <div class="contentHeaderTitle">
-                       <h1 class="contentTitle">{$__wcf->getActivePage()->getTitle()} <span class="badge jsNotificationsBadge">{#$__wcf->getUserNotificationHandler()->countAllNotifications()}</span></h1>
-               </div>
-               
-               {hascontent}
-                       <nav class="contentHeaderNavigation">
-                               <ul>
-                                       {content}
-                                               {event name='contentHeaderNavigation'}
-                                       {/content}
-                               </ul>
-                       </nav>
-               {/hascontent}
-       </header>
-{/capture}
+{capture assign='contentTitleBadge'}<span class="badge jsNotificationsBadge">{#$__wcf->getUserNotificationHandler()->countAllNotifications()}</span>{/capture}
 
 {capture assign='headContent'}
        <link rel="alternate" type="application/rss+xml" title="{lang}wcf.global.button.rss{/lang}" href="{link controller='NotificationFeed'}at={@$__wcf->getUser()->userID}-{@$__wcf->getUser()->accessToken}{/link}">
 {/capture}
 
-{include file='userMenuSidebar'}
-
 {capture assign='contentInteractionPagination'}
        {pages print=true assign=pagesLinks controller='NotificationList' link="pageNo=%d"}
 {/capture}
index 960dc94f4e2e055dac5eb3762ac911f3f525c195..b85053cf66171f6b0bb125df20c5279722f2d6ef 100644 (file)
                        <showorder>3</showorder>
                        <iconclassname>fa-globe</iconclassname>
                </usermenuitem>
-               <usermenuitem name="wcf.user.menu.community.notification">
-                       <controller>wcf\page\NotificationListPage</controller>
-                       <parent>wcf.user.menu.community</parent>
-                       <showorder>1</showorder>
-               </usermenuitem>
                <usermenuitem name="wcf.user.menu.community.following">
                        <controller>wcf\page\FollowingPage</controller>
                        <parent>wcf.user.menu.community</parent>
-                       <showorder>2</showorder>
+                       <showorder>1</showorder>
                </usermenuitem>
                <usermenuitem name="wcf.user.menu.community.ignoredUsers">
                        <controller>wcf\page\IgnoredUsersPage</controller>
                        <parent>wcf.user.menu.community</parent>
-                       <showorder>3</showorder>
+                       <showorder>2</showorder>
                </usermenuitem>
        </import>
+       <delete>
+               <usermenuitem name="wcf.user.menu.community.notification"/>
+       </delete>
 </data>
index ef1278d19bd8386780f1aac43b5f711da8a08f26..66646e7915961c4a4270b498851030dfe4106001 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace wcf\page;
 
-use wcf\system\menu\user\UserMenu;
 use wcf\system\user\notification\UserNotificationHandler;
 use wcf\system\WCF;
 
@@ -74,15 +73,4 @@ class NotificationListPage extends MultipleLinkPage
             'notifications' => $this->notifications,
         ]);
     }
-
-    /**
-     * @inheritDoc
-     */
-    public function show()
-    {
-        // set active tab
-        UserMenu::getInstance()->setActiveMenuItem('wcf.user.menu.community.notification');
-
-        parent::show();
-    }
 }