mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-17 01:08:41 +01:00
Better text when project home has no tasks
Summary: Adds more user friendly copy to the result list Test Plan: Test on a project with and without tasks. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11352
This commit is contained in:
parent
270a0c54b4
commit
25167776dc
2 changed files with 13 additions and 0 deletions
|
@ -6,6 +6,7 @@ final class ManiphestTaskListView extends ManiphestView {
|
||||||
private $handles;
|
private $handles;
|
||||||
private $showBatchControls;
|
private $showBatchControls;
|
||||||
private $showSubpriorityControls;
|
private $showSubpriorityControls;
|
||||||
|
private $noDataString;
|
||||||
|
|
||||||
public function setTasks(array $tasks) {
|
public function setTasks(array $tasks) {
|
||||||
assert_instances_of($tasks, 'ManiphestTask');
|
assert_instances_of($tasks, 'ManiphestTask');
|
||||||
|
@ -29,6 +30,11 @@ final class ManiphestTaskListView extends ManiphestView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setNoDataString($text) {
|
||||||
|
$this->noDataString = $text;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
$handles = $this->handles;
|
$handles = $this->handles;
|
||||||
|
|
||||||
|
@ -37,6 +43,12 @@ final class ManiphestTaskListView extends ManiphestView {
|
||||||
$list = new PHUIObjectItemListView();
|
$list = new PHUIObjectItemListView();
|
||||||
$list->setFlush(true);
|
$list->setFlush(true);
|
||||||
|
|
||||||
|
if ($this->noDataString) {
|
||||||
|
$list->setNoDataString($this->noDataString);
|
||||||
|
} else {
|
||||||
|
$list->setNoDataString(pht('No tasks.'));
|
||||||
|
}
|
||||||
|
|
||||||
$status_map = ManiphestTaskStatus::getTaskStatusMap();
|
$status_map = ManiphestTaskStatus::getTaskStatusMap();
|
||||||
$color_map = ManiphestTaskPriority::getColorMap();
|
$color_map = ManiphestTaskPriority::getColorMap();
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,7 @@ final class PhabricatorProjectProfileController
|
||||||
$task_list->setUser($user);
|
$task_list->setUser($user);
|
||||||
$task_list->setTasks($tasks);
|
$task_list->setTasks($tasks);
|
||||||
$task_list->setHandles($handles);
|
$task_list->setHandles($handles);
|
||||||
|
$task_list->setNoDataString(pht('This project has no open tasks.'));
|
||||||
|
|
||||||
$phid = $project->getPHID();
|
$phid = $project->getPHID();
|
||||||
$view_uri = urisprintf(
|
$view_uri = urisprintf(
|
||||||
|
|
Loading…
Add table
Reference in a new issue