Page MenuHomePhabricator

D11192.diff
No OneTemporary

D11192.diff

diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php
--- a/src/applications/project/controller/PhabricatorProjectProfileController.php
+++ b/src/applications/project/controller/PhabricatorProjectProfileController.php
@@ -137,6 +137,7 @@
private function renderTasksPage(PhabricatorProject $project) {
$user = $this->getRequest()->getUser();
+ $limit = 10;
$query = id(new ManiphestTaskQuery())
->setViewer($user)
@@ -144,8 +145,12 @@
->withStatuses(ManiphestTaskStatus::getOpenStatusConstants())
->setOrderBy(ManiphestTaskQuery::ORDER_PRIORITY)
->needProjectPHIDs(true)
- ->setLimit(10);
+ ->setLimit(($limit + 1));
$tasks = $query->execute();
+ $count = count($tasks);
+ if ($count == ($limit + 1)) {
+ array_pop($tasks);
+ }
$phids = mpull($tasks, 'getOwnerPHID');
$phids = array_merge(
@@ -180,10 +185,15 @@
->setHref($create_uri)
->setIcon($icon_new);
- $header = id(new PHUIHeaderView())
- ->setHeader(pht('Open Tasks'))
- ->addActionLink($button_add)
- ->addActionLink($button_view);
+ $header = id(new PHUIHeaderView())
+ ->addActionLink($button_add)
+ ->addActionLink($button_view);
+
+ if ($count > $limit) {
+ $header->setHeader(pht('Highest Priority (some)'));
+ } else {
+ $header->setHeader(pht('Highest Priority (all)'));
+ }
$content = id(new PHUIObjectBoxView())
->setHeader($header)

File Metadata

Mime Type
text/plain
Expires
Tue, Mar 18, 6:00 PM (3 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7425956
Default Alt Text
D11192.diff (1 KB)

Event Timeline