mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Improve task list filtering views.
Summary: Test Plan: Reviewers: CC:
This commit is contained in:
parent
38c6ce273a
commit
5d586f149d
3 changed files with 39 additions and 13 deletions
|
@ -27,21 +27,35 @@ class ManiphestTaskListController extends ManiphestController {
|
||||||
public function processRequest() {
|
public function processRequest() {
|
||||||
|
|
||||||
$views = array(
|
$views = array(
|
||||||
|
'Your Tasks',
|
||||||
'action' => 'Action Required',
|
'action' => 'Action Required',
|
||||||
// 'activity' => 'Recently Active',
|
// 'activity' => 'Recently Active',
|
||||||
// 'closed' => 'Recently Closed',
|
// 'closed' => 'Recently Closed',
|
||||||
'created' => 'Created',
|
'created' => 'Created',
|
||||||
'triage' => 'Need Triage',
|
'triage' => 'Need Triage',
|
||||||
|
'<hr />',
|
||||||
|
'All Open Tasks',
|
||||||
|
'alltriage' => 'Need Triage',
|
||||||
|
'unassigned' => 'Unassigned',
|
||||||
|
'allopen' => 'All Open',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (empty($views[$this->view])) {
|
if (empty($views[$this->view])) {
|
||||||
$this->view = key($views);
|
$this->view = 'action';
|
||||||
}
|
}
|
||||||
|
|
||||||
$tasks = $this->loadTasks();
|
$tasks = $this->loadTasks();
|
||||||
|
|
||||||
$nav = new AphrontSideNavView();
|
$nav = new AphrontSideNavView();
|
||||||
foreach ($views as $view => $name) {
|
foreach ($views as $view => $name) {
|
||||||
|
if (is_integer($view)) {
|
||||||
|
$nav->addNavItem(
|
||||||
|
phutil_render_tag(
|
||||||
|
'span',
|
||||||
|
array(),
|
||||||
|
$name));
|
||||||
|
} else {
|
||||||
$nav->addNavItem(
|
$nav->addNavItem(
|
||||||
phutil_render_tag(
|
phutil_render_tag(
|
||||||
'a',
|
'a',
|
||||||
|
@ -53,6 +67,7 @@ class ManiphestTaskListController extends ManiphestController {
|
||||||
),
|
),
|
||||||
phutil_escape_html($name)));
|
phutil_escape_html($name)));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$handle_phids = mpull($tasks, 'getOwnerPHID');
|
$handle_phids = mpull($tasks, 'getOwnerPHID');
|
||||||
$handles = id(new PhabricatorObjectHandleData($handle_phids))
|
$handles = id(new PhabricatorObjectHandleData($handle_phids))
|
||||||
|
@ -93,9 +108,20 @@ class ManiphestTaskListController extends ManiphestController {
|
||||||
'authorPHID in (%Ls) AND status = 0',
|
'authorPHID in (%Ls) AND status = 0',
|
||||||
$phids);
|
$phids);
|
||||||
case 'triage':
|
case 'triage':
|
||||||
|
return id(new ManiphestTask())->loadAllWhere(
|
||||||
|
'ownerPHID in (%Ls) and status = %d',
|
||||||
|
$phids,
|
||||||
|
ManiphestTaskPriority::PRIORITY_TRIAGE);
|
||||||
|
case 'alltriage':
|
||||||
return id(new ManiphestTask())->loadAllWhere(
|
return id(new ManiphestTask())->loadAllWhere(
|
||||||
'status = %d',
|
'status = %d',
|
||||||
ManiphestTaskPriority::PRIORITY_TRIAGE);
|
ManiphestTaskPriority::PRIORITY_TRIAGE);
|
||||||
|
case 'unassigned':
|
||||||
|
return id(new ManiphestTask())->loadAllWhere(
|
||||||
|
'ownerPHID IS NULL');
|
||||||
|
case 'allopen':
|
||||||
|
return id(new ManiphestTask())->loadAllWhere(
|
||||||
|
'status = 0');
|
||||||
}
|
}
|
||||||
|
|
||||||
return array();
|
return array();
|
||||||
|
|
|
@ -147,7 +147,6 @@ class ManiphestTransactionEditor {
|
||||||
"TASK DETAIL\n".
|
"TASK DETAIL\n".
|
||||||
" ".$task_uri."\n";
|
" ".$task_uri."\n";
|
||||||
|
|
||||||
|
|
||||||
$base = substr(md5($task->getPHID()), 0, 27).' '.pack("N", time());
|
$base = substr(md5($task->getPHID()), 0, 27).' '.pack("N", time());
|
||||||
$thread_index = base64_encode($base);
|
$thread_index = base64_encode($base);
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,8 @@ th.aphront-side-nav-navigation {
|
||||||
border-right: 1px solid #bbbbbb;
|
border-right: 1px solid #bbbbbb;
|
||||||
}
|
}
|
||||||
|
|
||||||
th.aphront-side-nav-navigation a {
|
th.aphront-side-nav-navigation a,
|
||||||
|
th.aphront-side-nav-navigation span {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 0 2px;
|
margin: 0 0 2px;
|
||||||
min-width: 150px;
|
min-width: 150px;
|
||||||
|
|
Loading…
Reference in a new issue