Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14012209
D11684.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11684.diff
View Options
diff --git a/src/applications/home/application/PhabricatorHomeApplication.php b/src/applications/home/application/PhabricatorHomeApplication.php
--- a/src/applications/home/application/PhabricatorHomeApplication.php
+++ b/src/applications/home/application/PhabricatorHomeApplication.php
@@ -46,9 +46,12 @@
PhabricatorUser $user,
PhabricatorController $controller = null) {
+ $quick_create_items = $this->loadAllQuickCreateItems($user);
$items = array();
- if ($user->isLoggedIn() && $user->isUserActivated()) {
+ if ($user->isLoggedIn() &&
+ $user->isUserActivated() &&
+ $quick_create_items) {
$create_id = celerity_generate_unique_node_id();
Javelin::initBehavior(
'aphlict-dropdown',
@@ -98,20 +101,24 @@
$items = $this->loadAllQuickCreateItems($viewer);
- $view = new PHUIListView();
- $view->newLabel(pht('Create New...'));
- foreach ($items as $item) {
- $view->addMenuItem($item);
- }
+ $view = null;
+ if ($items) {
+ $view = new PHUIListView();
+ $view->newLabel(pht('Create New...'));
+ foreach ($items as $item) {
+ $view->addMenuItem($item);
+ }
- return phutil_tag(
- 'div',
- array(
- 'id' => 'phabricator-quick-create-menu',
- 'class' => 'phabricator-main-menu-dropdown phui-list-sidenav',
- 'style' => 'display: none',
- ),
- $view);
+ return phutil_tag(
+ 'div',
+ array(
+ 'id' => 'phabricator-quick-create-menu',
+ 'class' => 'phabricator-main-menu-dropdown phui-list-sidenav',
+ 'style' => 'display: none',
+ ),
+ $view);
+ }
+ return $view;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 2, 8:39 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6742215
Default Alt Text
D11684.diff (1 KB)
Attached To
Mode
D11684: Policy - make sure "quick create" menu doesn't show up if you have nothing you can quick create
Attached
Detach File
Event Timeline
Log In to Comment