From dc69c4e58c2ae71b1cfc60fdbc2c28dca5e3b56e Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 14 Aug 2014 17:19:01 -0700 Subject: [PATCH] Touch up notification/messages panels Summary: Fixes T5575. Moves "All" links into title/header. Mark all read floats left, and connection status sits in footer. Also added hints to enable notifications (it's a cool feature). Test Plan: Tested locally both menus. {F190630} Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T5575 Differential Revision: https://secure.phabricator.com/D10269 --- resources/celerity/map.php | 6 ++-- ...ConpherenceNotificationPanelController.php | 11 ++----- ...PhabricatorNotificationPanelController.php | 33 +++++++++++-------- .../application/base/notification-menu.css | 19 ++++++++--- 4 files changed, 39 insertions(+), 30 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index e5938a988a..e232017e26 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -7,7 +7,7 @@ */ return array( 'names' => array( - 'core.pkg.css' => 'f8054294', + 'core.pkg.css' => '383d0947', 'core.pkg.js' => '7c8455ef', 'darkconsole.pkg.js' => 'df001cab', 'differential.pkg.css' => '4a93db37', @@ -37,7 +37,7 @@ return array( 'rsrc/css/aphront/typeahead.css' => 'a989b5b3', 'rsrc/css/application/auth/auth.css' => '1e655982', 'rsrc/css/application/base/main-menu-view.css' => 'aceca0e9', - 'rsrc/css/application/base/notification-menu.css' => '5e3b5c86', + 'rsrc/css/application/base/notification-menu.css' => '6aa0a74b', 'rsrc/css/application/base/phabricator-application-launch-view.css' => '8b7e271d', 'rsrc/css/application/base/standard-page-view.css' => '517cdfb1', 'rsrc/css/application/chatlog/chatlog.css' => '852140ff', @@ -730,7 +730,7 @@ return array( 'phabricator-nav-view-css' => '9283c2df', 'phabricator-notification' => '0c6946e7', 'phabricator-notification-css' => 'ef2c9b34', - 'phabricator-notification-menu-css' => '5e3b5c86', + 'phabricator-notification-menu-css' => '6aa0a74b', 'phabricator-object-selector-css' => '029a133d', 'phabricator-phtize' => 'd254d646', 'phabricator-prefab' => 'bbae734c', diff --git a/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php b/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php index 6201b04b21..c46b975c4b 100644 --- a/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php +++ b/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php @@ -75,21 +75,14 @@ final class ConpherenceNotificationPanelController $content = hsprintf( '
%s
'. - '%s'. - '
%s
', + '%s', phutil_tag( 'a', array( 'href' => '/conpherence/', ), pht('Messages')), - $content, - phutil_tag( - 'a', - array( - 'href' => '/conpherence/', - ), - 'View All Conpherences')); + $content); $unread = id(new ConpherenceParticipantCountQuery()) ->withParticipantPHIDs(array($user->getPHID())) diff --git a/src/applications/notification/controller/PhabricatorNotificationPanelController.php b/src/applications/notification/controller/PhabricatorNotificationPanelController.php index 6c0ffadfb6..0dd0e22fc4 100644 --- a/src/applications/notification/controller/PhabricatorNotificationPanelController.php +++ b/src/applications/notification/controller/PhabricatorNotificationPanelController.php @@ -46,7 +46,23 @@ final class PhabricatorNotificationPanelController ), pht('Notifications')); - $connection_status = new PhabricatorNotificationStatusView(); + if (PhabricatorEnv::getEnvConfig('notification.enabled')) { + $connection_status = new PhabricatorNotificationStatusView(); + } else { + $connection_status = phutil_tag( + 'a', + array( + 'href' => PhabricatorEnv::getDoclink( + 'Notifications User Guide: Setup and Configuration'), + ), + pht('Notification Server not enabled.')); + } + $connection_ui = phutil_tag( + 'div', + array( + 'class' => 'phabricator-notification-footer' + ), + $connection_status); $header = phutil_tag( 'div', @@ -54,24 +70,15 @@ final class PhabricatorNotificationPanelController 'class' => 'phabricator-notification-header', ), array( - $connection_status, $notifications_link, + $clear_ui, )); $content = hsprintf( - '%s'. - '%s'. - '
%s %s %s
', + '%s%s%s', $header, $content, - $clear_ui, - " \xC2\xB7 ", - phutil_tag( - 'a', - array( - 'href' => '/notification/', - ), - pht('View All Notifications'))); + $connection_ui); $unread_count = id(new PhabricatorFeedStoryNotification()) ->countUnread($user); diff --git a/webroot/rsrc/css/application/base/notification-menu.css b/webroot/rsrc/css/application/base/notification-menu.css index 42feac0179..74b80958b7 100644 --- a/webroot/rsrc/css/application/base/notification-menu.css +++ b/webroot/rsrc/css/application/base/notification-menu.css @@ -81,26 +81,35 @@ color: {$darkgreytext}; } +.phabricator-notification-header a:hover { + text-decoration: underline; +} + .phabricator-notification-header .phabricator-notification-clear-all { color: #18559D; float: right; font-weight: normal; } -.phabricator-notification-view-all { - text-align: center; - font-weight: bold; +.phabricator-notification-footer { background: {$greybackground}; border-top: 1px solid {$thinblueborder}; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; padding: 8px; font-size: 12px; + color: {$darkgreytext}; +} + +.phabricator-notification-footer a { + color: {$darkgreytext}; +} + +.phabricator-notification-footer a:hover { + text-decoration: underline; } .phabricator-notification-menu .aphlict-connection-status { - float: right; - font-weight: normal; color: {$lightgreytext}; }