1
0
Fork 0
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:
Bob Trahan 2012-05-15 14:44:03 -07:00
parent ed57869fc2
commit 6865f024c8
2 changed files with 4 additions and 13 deletions

View file

@ -439,8 +439,7 @@ final class DifferentialRevisionListController extends DifferentialController {
$user_phid);
$view = id(clone $template)
->setRevisions($active)
->setNoDataString("You have no active revisions requiring action.");
->setRevisions($active);
$views[] = array(
'title' => 'Action Required',
'view' => $view,
@ -469,8 +468,7 @@ final class DifferentialRevisionListController extends DifferentialController {
}
$view = id(clone $template)
->setRevisions($waiting)
->setNoDataString("You have no active revisions waiting on others.");
->setRevisions($waiting);
$views[] = array(
'title' => 'Waiting On Others',
'view' => $view,

View file

@ -24,8 +24,8 @@ final class DifferentialRevisionListView extends AphrontView {
private $revisions;
private $handles;
private $user;
private $noDataString;
private $fields;
const NO_DATA_STRING = 'No revisions found.';
public function setFields(array $fields) {
assert_instances_of($fields, 'DifferentialFieldSpecification');
@ -60,11 +60,6 @@ final class DifferentialRevisionListView extends AphrontView {
return $this;
}
public function setNoDataString($no_data_string) {
$this->noDataString = $no_data_string;
return $this;
}
public function render() {
$user = $this->user;
@ -97,9 +92,7 @@ final class DifferentialRevisionListView extends AphrontView {
$table->setHeaders($headers);
$table->setColumnClasses($classes);
if ($this->noDataString) {
$table->setNoDataString($this->noDataString);
}
$table->setNoDataString(DifferentialRevisionListView::NO_DATA_STRING);
return $table->render();
}