Differential D17238 Diff 41457 src/applications/maniphest/application/PhabricatorManiphestApplication.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/application/PhabricatorManiphestApplication.php
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | return array( | ||||
=> 'ManiphestTaskEditController', | => 'ManiphestTaskEditController', | ||||
), | ), | ||||
'export/(?P<key>[^/]+)/' => 'ManiphestExportController', | 'export/(?P<key>[^/]+)/' => 'ManiphestExportController', | ||||
'subpriority/' => 'ManiphestSubpriorityController', | 'subpriority/' => 'ManiphestSubpriorityController', | ||||
), | ), | ||||
); | ); | ||||
} | } | ||||
public function loadStatus(PhabricatorUser $user) { | |||||
$status = array(); | |||||
if (!$user->isLoggedIn()) { | |||||
return $status; | |||||
} | |||||
$limit = self::MAX_STATUS_ITEMS; | |||||
$query = id(new ManiphestTaskQuery()) | |||||
->setViewer($user) | |||||
->withStatuses(ManiphestTaskStatus::getOpenStatusConstants()) | |||||
->withOwners(array($user->getPHID())) | |||||
->setLimit($limit); | |||||
$count = count($query->execute()); | |||||
if ($count >= $limit) { | |||||
$count_str = pht('%s+ Assigned Task(s)', new PhutilNumber($limit - 1)); | |||||
} else { | |||||
$count_str = pht('%s Assigned Task(s)', new PhutilNumber($count)); | |||||
} | |||||
$type = PhabricatorApplicationStatusView::TYPE_WARNING; | |||||
$status[] = id(new PhabricatorApplicationStatusView()) | |||||
->setType($type) | |||||
->setText($count_str) | |||||
->setCount($count); | |||||
return $status; | |||||
} | |||||
public function supportsEmailIntegration() { | public function supportsEmailIntegration() { | ||||
return true; | return true; | ||||
} | } | ||||
public function getAppEmailBlurb() { | public function getAppEmailBlurb() { | ||||
return pht( | return pht( | ||||
'Send email to these addresses to create tasks. %s', | 'Send email to these addresses to create tasks. %s', | ||||
phutil_tag( | phutil_tag( | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |