Differential D16036 Diff 38602 src/applications/notification/controller/PhabricatorNotificationPanelController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/notification/controller/PhabricatorNotificationPanelController.php
| Show All 10 Lines | $query = id(new PhabricatorNotificationQuery()) | ||||
| ->withUserPHIDs(array($viewer->getPHID())) | ->withUserPHIDs(array($viewer->getPHID())) | ||||
| ->setLimit(15); | ->setLimit(15); | ||||
| $stories = $query->execute(); | $stories = $query->execute(); | ||||
| $clear_ui_class = 'phabricator-notification-clear-all'; | $clear_ui_class = 'phabricator-notification-clear-all'; | ||||
| $clear_uri = id(new PhutilURI('/notification/clear/')); | $clear_uri = id(new PhutilURI('/notification/clear/')); | ||||
| if ($stories) { | if ($stories) { | ||||
| $builder = new PhabricatorNotificationBuilder($stories); | $builder = id(new PhabricatorNotificationBuilder($stories)) | ||||
| ->setUser($viewer); | |||||
| $notifications_view = $builder->buildView(); | $notifications_view = $builder->buildView(); | ||||
| $content = $notifications_view->render(); | $content = $notifications_view->render(); | ||||
| $clear_uri->setQueryParam( | $clear_uri->setQueryParam( | ||||
| 'chronoKey', | 'chronoKey', | ||||
| head($stories)->getChronologicalKey()); | head($stories)->getChronologicalKey()); | ||||
| } else { | } else { | ||||
| $content = phutil_tag_div( | $content = phutil_tag_div( | ||||
| 'phabricator-notification no-notifications', | 'phabricator-notification no-notifications', | ||||
| ▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines | |||||