Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/maniphest/event/ManiphestPeopleMenuEventListener.php b/src/applications/maniphest/event/ManiphestPeopleMenuEventListener.php
index 385aaa6bd8..97c7f091ec 100644
--- a/src/applications/maniphest/event/ManiphestPeopleMenuEventListener.php
+++ b/src/applications/maniphest/event/ManiphestPeopleMenuEventListener.php
@@ -1,37 +1,42 @@
<?php
final class ManiphestPeopleMenuEventListener extends PhutilEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS);
}
public function handleEvent(PhutilEvent $event) {
switch ($event->getType()) {
case PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS:
$this->handleActionsEvent($event);
break;
}
}
private function handleActionsEvent($event) {
$actions = $event->getValue('actions');
$action = id(new PhabricatorActionView())
->setIcon('maniphest-dark')
->setIconSheet(PHUIIconView::SPRITE_APPS)
->setName(pht('View Tasks'));
$object = $event->getValue('object');
if ($object instanceof PhabricatorUser) {
$href = '/maniphest/view/action/?users='.$object->getPHID();
$actions[] = $action->setHref($href);
} else if ($object instanceof PhabricatorProject) {
$href = '/maniphest/view/all/?projects='.$object->getPHID();
$actions[] = $action->setHref($href);
+
+ $actions[] = id(new PhabricatorActionView())
+ ->setName(pht("Add Task"))
+ ->setIcon('create')
+ ->setHref('/maniphest/task/create/?projects=' . $object->getPHID());
}
$event->setValue('actions', $actions);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Jun 10, 11:07 AM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
140351
Default Alt Text
(1 KB)

Event Timeline