1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-16 03:42:41 +01:00
phorge-phorge/src/applications/differential/customfield/DifferentialAuthorField.php
Chad Little 148a50e48b Convert Differential to new layout
Summary:
First pass at converting Differential, I likely have some buggy-poos but thought I'd toss this up now in case very bad bugs present.

To do:
- Need to put status back on Hovercards
- "Diff Detail" probably needs a better design

Test Plan: Looking at lots of diffs, admittedly I dont have harbormaster, etc, running locally. Checked Diffusion for Table of Content changes on small and large commits.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15463
2016-03-12 13:04:21 -08:00

38 lines
799 B
PHP

<?php
final class DifferentialAuthorField
extends DifferentialCustomField {
public function getFieldKey() {
return 'differential:author';
}
public function getFieldName() {
return pht('Author');
}
public function getFieldDescription() {
return pht('Stores the revision author.');
}
public function canDisableField() {
return false;
}
public function shouldAppearInPropertyView() {
return false;
}
public function renderPropertyViewLabel() {
return $this->getFieldName();
}
public function getRequiredHandlePHIDsForPropertyView() {
return array($this->getObject()->getAuthorPHID());
}
public function renderPropertyViewValue(array $handles) {
return $handles[$this->getObject()->getAuthorPHID()]->renderHovercardLink();
}
}