Differential D13200 Diff 31965 src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
| Show All 30 Lines | final class DifferentialRevisionUpdateHistoryView extends AphrontView { | ||||
| public function setCommitsForLinks(array $commits) { | public function setCommitsForLinks(array $commits) { | ||||
| assert_instances_of($commits, 'PhabricatorRepositoryCommit'); | assert_instances_of($commits, 'PhabricatorRepositoryCommit'); | ||||
| $this->commitsForLinks = $commits; | $this->commitsForLinks = $commits; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function render() { | public function render() { | ||||
| $this->requireResource('differential-core-view-css'); | $this->requireResource('differential-core-view-css'); | ||||
| $this->requireResource('differential-revision-history-css'); | $this->requireResource('differential-revision-history-css'); | ||||
| $data = array( | $data = array( | ||||
| array( | array( | ||||
| 'name' => 'Base', | 'name' => pht('Base'), | ||||
| 'id' => null, | 'id' => null, | ||||
| 'desc' => 'Base', | 'desc' => pht('Base'), | ||||
| 'age' => null, | 'age' => null, | ||||
| 'obj' => null, | 'obj' => null, | ||||
| ), | ), | ||||
| ); | ); | ||||
| $seq = 0; | $seq = 0; | ||||
| foreach ($this->diffs as $diff) { | foreach ($this->diffs as $diff) { | ||||
| $data[] = array( | $data[] = array( | ||||
| 'name' => 'Diff '.(++$seq), | 'name' => pht('Diff %d', ++$seq), | ||||
| 'id' => $diff->getID(), | 'id' => $diff->getID(), | ||||
| 'desc' => $diff->getDescription(), | 'desc' => $diff->getDescription(), | ||||
| 'age' => $diff->getDateCreated(), | 'age' => $diff->getDateCreated(), | ||||
| 'obj' => $diff, | 'obj' => $diff, | ||||
| ); | ); | ||||
| } | } | ||||
| $max_id = $diff->getID(); | $max_id = $diff->getID(); | ||||
| ▲ Show 20 Lines • Show All 375 Lines • Show Last 20 Lines | |||||