diff --git a/src/applications/maniphest/application/PhabricatorManiphestApplication.php b/src/applications/maniphest/application/PhabricatorManiphestApplication.php index 7588d26309..1df47ad390 100644 --- a/src/applications/maniphest/application/PhabricatorManiphestApplication.php +++ b/src/applications/maniphest/application/PhabricatorManiphestApplication.php @@ -1,147 +1,151 @@ [1-9]\d*)' => 'ManiphestTaskDetailController', '/maniphest/' => array( '(?:query/(?P[^/]+)/)?' => 'ManiphestTaskListController', 'report/(?:(?P\w+)/)?' => 'ManiphestReportController', 'batch/' => 'ManiphestBatchEditController', 'task/' => array( 'create/' => 'ManiphestTaskEditController', 'edit/(?P[1-9]\d*)/' => 'ManiphestTaskEditController', 'descriptionpreview/' => 'PhabricatorMarkupPreviewController', ), 'transaction/' => array( 'save/' => 'ManiphestTransactionSaveController', 'preview/(?P[1-9]\d*)/' => 'ManiphestTransactionPreviewController', ), 'export/(?P[^/]+)/' => 'ManiphestExportController', 'subpriority/' => 'ManiphestSubpriorityController', ), ); } public function loadStatus(PhabricatorUser $user) { $status = array(); if (!$user->isLoggedIn()) { return $status; } $query = id(new ManiphestTaskQuery()) ->setViewer($user) ->withStatuses(ManiphestTaskStatus::getOpenStatusConstants()) ->withOwners(array($user->getPHID())) ->setLimit(self::MAX_STATUS_ITEMS); $count = count($query->execute()); $count_str = self::formatStatusCount( $count, '%s Assigned Tasks', '%d Assigned Task(s)'); $type = PhabricatorApplicationStatusView::TYPE_WARNING; $status[] = id(new PhabricatorApplicationStatusView()) ->setType($type) ->setText($count_str) ->setCount($count); return $status; } public function getQuickCreateItems(PhabricatorUser $viewer) { $items = array(); $item = id(new PHUIListItemView()) ->setName(pht('Maniphest Task')) ->setIcon('fa-anchor') ->setHref($this->getBaseURI().'task/create/'); $items[] = $item; return $items; } public function supportsEmailIntegration() { return true; } public function getAppEmailBlurb() { return pht( 'Send email to these addresses to create tasks. %s', phutil_tag( 'a', array( 'href' => $this->getInboundEmailSupportLink(),), pht('Learn More'))); } protected function getCustomCapabilities() { return array( ManiphestDefaultViewCapability::CAPABILITY => array( 'caption' => pht('Default view policy for newly created tasks.'), ), ManiphestDefaultEditCapability::CAPABILITY => array( 'caption' => pht('Default edit policy for newly created tasks.'), ), ManiphestEditStatusCapability::CAPABILITY => array(), ManiphestEditAssignCapability::CAPABILITY => array(), ManiphestEditPoliciesCapability::CAPABILITY => array(), ManiphestEditPriorityCapability::CAPABILITY => array(), ManiphestEditProjectsCapability::CAPABILITY => array(), ManiphestBulkEditCapability::CAPABILITY => array(), ); } }