Differential D20154 Diff 48161 src/applications/notification/controller/PhabricatorNotificationPanelController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/notification/controller/PhabricatorNotificationPanelController.php
Show All 19 Lines | public function handleRequest(AphrontRequest $request) { | ||||
$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 = id(new PhabricatorNotificationBuilder($stories)) | $builder = id(new PhabricatorNotificationBuilder($stories)) | ||||
->setUser($viewer); | ->setUser($viewer); | ||||
$notifications_view = $builder->buildView(); | $notifications_view = $builder->buildView(); | ||||
$content = $notifications_view->render(); | $content = $notifications_view->render(); | ||||
$clear_uri->setQueryParam( | $clear_uri->replaceQueryParam( | ||||
'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', | ||||
pht('You have no notifications.')); | pht('You have no notifications.')); | ||||
$clear_ui_class .= ' disabled'; | $clear_ui_class .= ' disabled'; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |