mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Make differentialRevisionListView always have the no data string be "No revisions found."
Summary: the existing, more custom text doesn't make sense when viewing someone else's revisions AND in someplaces its the less interesting "no data found". Test Plan: clicked around the various http://phabricator.dev/differential/filter/* pages with various users. Reviewers: epriestley, ry Reviewed By: epriestley CC: aran, Koolvin Maniphest Tasks: T1222 Differential Revision: https://secure.phabricator.com/D2475
This commit is contained in:
parent
ed57869fc2
commit
6865f024c8
2 changed files with 4 additions and 13 deletions
|
@ -439,8 +439,7 @@ final class DifferentialRevisionListController extends DifferentialController {
|
||||||
$user_phid);
|
$user_phid);
|
||||||
|
|
||||||
$view = id(clone $template)
|
$view = id(clone $template)
|
||||||
->setRevisions($active)
|
->setRevisions($active);
|
||||||
->setNoDataString("You have no active revisions requiring action.");
|
|
||||||
$views[] = array(
|
$views[] = array(
|
||||||
'title' => 'Action Required',
|
'title' => 'Action Required',
|
||||||
'view' => $view,
|
'view' => $view,
|
||||||
|
@ -469,8 +468,7 @@ final class DifferentialRevisionListController extends DifferentialController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$view = id(clone $template)
|
$view = id(clone $template)
|
||||||
->setRevisions($waiting)
|
->setRevisions($waiting);
|
||||||
->setNoDataString("You have no active revisions waiting on others.");
|
|
||||||
$views[] = array(
|
$views[] = array(
|
||||||
'title' => 'Waiting On Others',
|
'title' => 'Waiting On Others',
|
||||||
'view' => $view,
|
'view' => $view,
|
||||||
|
|
|
@ -24,8 +24,8 @@ final class DifferentialRevisionListView extends AphrontView {
|
||||||
private $revisions;
|
private $revisions;
|
||||||
private $handles;
|
private $handles;
|
||||||
private $user;
|
private $user;
|
||||||
private $noDataString;
|
|
||||||
private $fields;
|
private $fields;
|
||||||
|
const NO_DATA_STRING = 'No revisions found.';
|
||||||
|
|
||||||
public function setFields(array $fields) {
|
public function setFields(array $fields) {
|
||||||
assert_instances_of($fields, 'DifferentialFieldSpecification');
|
assert_instances_of($fields, 'DifferentialFieldSpecification');
|
||||||
|
@ -60,11 +60,6 @@ final class DifferentialRevisionListView extends AphrontView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setNoDataString($no_data_string) {
|
|
||||||
$this->noDataString = $no_data_string;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
|
|
||||||
$user = $this->user;
|
$user = $this->user;
|
||||||
|
@ -97,9 +92,7 @@ final class DifferentialRevisionListView extends AphrontView {
|
||||||
$table->setHeaders($headers);
|
$table->setHeaders($headers);
|
||||||
$table->setColumnClasses($classes);
|
$table->setColumnClasses($classes);
|
||||||
|
|
||||||
if ($this->noDataString) {
|
$table->setNoDataString(DifferentialRevisionListView::NO_DATA_STRING);
|
||||||
$table->setNoDataString($this->noDataString);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $table->render();
|
return $table->render();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue