mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +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 $showBatchControls;
|
||||
private $showSubpriorityControls;
|
||||
private $noDataString;
|
||||
|
||||
public function setTasks(array $tasks) {
|
||||
assert_instances_of($tasks, 'ManiphestTask');
|
||||
|
@ -29,6 +30,11 @@ final class ManiphestTaskListView extends ManiphestView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setNoDataString($text) {
|
||||
$this->noDataString = $text;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
$handles = $this->handles;
|
||||
|
||||
|
@ -37,6 +43,12 @@ final class ManiphestTaskListView extends ManiphestView {
|
|||
$list = new PHUIObjectItemListView();
|
||||
$list->setFlush(true);
|
||||
|
||||
if ($this->noDataString) {
|
||||
$list->setNoDataString($this->noDataString);
|
||||
} else {
|
||||
$list->setNoDataString(pht('No tasks.'));
|
||||
}
|
||||
|
||||
$status_map = ManiphestTaskStatus::getTaskStatusMap();
|
||||
$color_map = ManiphestTaskPriority::getColorMap();
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ final class PhabricatorProjectProfileController
|
|||
$task_list->setUser($user);
|
||||
$task_list->setTasks($tasks);
|
||||
$task_list->setHandles($handles);
|
||||
$task_list->setNoDataString(pht('This project has no open tasks.'));
|
||||
|
||||
$phid = $project->getPHID();
|
||||
$view_uri = urisprintf(
|
||||
|
|
Loading…
Reference in a new issue