Page MenuHomePhabricator

D8039.diff
No OneTemporary

D8039.diff

Index: resources/celerity/map.php
===================================================================
--- resources/celerity/map.php
+++ resources/celerity/map.php
@@ -7,7 +7,7 @@
return array(
'names' =>
array(
- 'core.pkg.css' => '2eafddad',
+ 'core.pkg.css' => '6c70dd0e',
'core.pkg.js' => 'c907bd96',
'darkconsole.pkg.js' => 'ca8671ce',
'differential.pkg.css' => '5a65a762',
@@ -40,7 +40,7 @@
'rsrc/css/aphront/typeahead.css' => '00c9a200',
'rsrc/css/application/auth/auth.css' => '1e655982',
'rsrc/css/application/base/main-menu-view.css' => 'aba0b7a6',
- 'rsrc/css/application/base/notification-menu.css' => '07433791',
+ 'rsrc/css/application/base/notification-menu.css' => 'fc9a363c',
'rsrc/css/application/base/phabricator-application-launch-view.css' => '6f8453d9',
'rsrc/css/application/base/standard-page-view.css' => '517cdfb1',
'rsrc/css/application/chatlog/chatlog.css' => '0cd2bc78',
@@ -693,7 +693,7 @@
'phabricator-nav-view-css' => 'd0d4a509',
'phabricator-notification' => '95944043',
'phabricator-notification-css' => '6901121e',
- 'phabricator-notification-menu-css' => '07433791',
+ 'phabricator-notification-menu-css' => 'fc9a363c',
'phabricator-object-list-view-css' => '1a1ea560',
'phabricator-object-selector-css' => '029a133d',
'phabricator-phtize' => 'd254d646',
Index: src/applications/notification/builder/PhabricatorNotificationBuilder.php
===================================================================
--- src/applications/notification/builder/PhabricatorNotificationBuilder.php
+++ src/applications/notification/builder/PhabricatorNotificationBuilder.php
@@ -3,11 +3,17 @@
final class PhabricatorNotificationBuilder {
private $stories;
+ private $user = null;
public function __construct(array $stories) {
$this->stories = $stories;
}
+ public function setUser($user) {
+ $this->user = $user;
+ return $this;
+ }
+
public function buildView() {
$stories = $this->stories;
@@ -124,8 +130,7 @@
foreach ($stories as $story) {
$view = $story->renderView();
-
- $null_view->appendChild($view->renderNotification());
+ $null_view->appendChild($view->renderNotification($this->user));
}
return $null_view;
Index: src/applications/notification/controller/PhabricatorNotificationListController.php
===================================================================
--- src/applications/notification/controller/PhabricatorNotificationListController.php
+++ src/applications/notification/controller/PhabricatorNotificationListController.php
@@ -43,6 +43,7 @@
if ($notifications) {
$builder = new PhabricatorNotificationBuilder($notifications);
+ $builder->setUser($user);
$view = $builder->buildView()->render();
} else {
$view = phutil_tag_div(
Index: src/view/phui/PHUIFeedStoryView.php
===================================================================
--- src/view/phui/PHUIFeedStoryView.php
+++ src/view/phui/PHUIFeedStoryView.php
@@ -99,7 +99,7 @@
return $this->href;
}
- public function renderNotification() {
+ public function renderNotification($user) {
$classes = array(
'phabricator-notification',
);
@@ -107,6 +107,20 @@
if (!$this->viewed) {
$classes[] = 'phabricator-notification-unread';
}
+ if ($this->epoch) {
+ if ($user) {
+ $foot = phabricator_datetime($this->epoch, $user);
+ $foot = phutil_tag(
+ 'span',
+ array(
+ 'class' => 'phabricator-notification-date'),
+ $foot);
+ } else {
+ $foot = null;
+ }
+ } else {
+ $foot = pht('No time specified.');
+ }
return javelin_tag(
'div',
@@ -117,7 +131,7 @@
'href' => $this->getHref(),
),
),
- $this->title);
+ array($this->title, $foot));
}
public function render() {
Index: webroot/rsrc/css/application/base/notification-menu.css
===================================================================
--- webroot/rsrc/css/application/base/notification-menu.css
+++ webroot/rsrc/css/application/base/notification-menu.css
@@ -13,6 +13,11 @@
border-radius: 3px;
}
+.phabricator-notification .phabricator-notification-date {
+ margin-left: 8px;
+ color: {$lightgreytext};
+}
+
.phabricator-notification-menu-loading {
text-align: center;
padding: 10px 0;

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 15, 6:06 PM (1 w, 13 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7700341
Default Alt Text
D8039.diff (4 KB)

Event Timeline