mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 13:30:55 +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,31 +27,46 @@ class ManiphestTaskListController extends ManiphestController {
|
|||
public function processRequest() {
|
||||
|
||||
$views = array(
|
||||
'Your Tasks',
|
||||
'action' => 'Action Required',
|
||||
// 'activity' => 'Recently Active',
|
||||
// 'closed' => 'Recently Closed',
|
||||
'created' => 'Created',
|
||||
'triage' => 'Need Triage',
|
||||
'<hr />',
|
||||
'All Open Tasks',
|
||||
'alltriage' => 'Need Triage',
|
||||
'unassigned' => 'Unassigned',
|
||||
'allopen' => 'All Open',
|
||||
|
||||
);
|
||||
|
||||
if (empty($views[$this->view])) {
|
||||
$this->view = key($views);
|
||||
$this->view = 'action';
|
||||
}
|
||||
|
||||
$tasks = $this->loadTasks();
|
||||
|
||||
$nav = new AphrontSideNavView();
|
||||
foreach ($views as $view => $name) {
|
||||
$nav->addNavItem(
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/maniphest/view/'.$view.'/',
|
||||
'class' => ($this->view == $view)
|
||||
? 'aphront-side-nav-selected'
|
||||
: null,
|
||||
),
|
||||
phutil_escape_html($name)));
|
||||
if (is_integer($view)) {
|
||||
$nav->addNavItem(
|
||||
phutil_render_tag(
|
||||
'span',
|
||||
array(),
|
||||
$name));
|
||||
} else {
|
||||
$nav->addNavItem(
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/maniphest/view/'.$view.'/',
|
||||
'class' => ($this->view == $view)
|
||||
? 'aphront-side-nav-selected'
|
||||
: null,
|
||||
),
|
||||
phutil_escape_html($name)));
|
||||
}
|
||||
}
|
||||
|
||||
$handle_phids = mpull($tasks, 'getOwnerPHID');
|
||||
|
@ -93,9 +108,20 @@ class ManiphestTaskListController extends ManiphestController {
|
|||
'authorPHID in (%Ls) AND status = 0',
|
||||
$phids);
|
||||
case 'triage':
|
||||
return id(new ManiphestTask())->loadAllWhere(
|
||||
'ownerPHID in (%Ls) and status = %d',
|
||||
$phids,
|
||||
ManiphestTaskPriority::PRIORITY_TRIAGE);
|
||||
case 'alltriage':
|
||||
return id(new ManiphestTask())->loadAllWhere(
|
||||
'status = %d',
|
||||
ManiphestTaskPriority::PRIORITY_TRIAGE);
|
||||
case 'unassigned':
|
||||
return id(new ManiphestTask())->loadAllWhere(
|
||||
'ownerPHID IS NULL');
|
||||
case 'allopen':
|
||||
return id(new ManiphestTask())->loadAllWhere(
|
||||
'status = 0');
|
||||
}
|
||||
|
||||
return array();
|
||||
|
|
|
@ -147,7 +147,6 @@ class ManiphestTransactionEditor {
|
|||
"TASK DETAIL\n".
|
||||
" ".$task_uri."\n";
|
||||
|
||||
|
||||
$base = substr(md5($task->getPHID()), 0, 27).' '.pack("N", time());
|
||||
$thread_index = base64_encode($base);
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@ th.aphront-side-nav-navigation {
|
|||
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;
|
||||
margin: 0 0 2px;
|
||||
min-width: 150px;
|
||||
|
|
Loading…
Reference in a new issue