mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 13:00:56 +01:00
Simplify Differential "Summary" field
Summary: Ref T11114. Keep UI stuff and mail stuff, toss editing. Test Plan: Viewed and edited revision summaries. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11114 Differential Revision: https://secure.phabricator.com/D17085
This commit is contained in:
parent
c458f09dcc
commit
2ebbac86de
1 changed files with 0 additions and 84 deletions
|
@ -7,10 +7,6 @@ final class DifferentialSummaryField
|
|||
return 'differential:summary';
|
||||
}
|
||||
|
||||
public function getFieldKeyForConduit() {
|
||||
return 'summary';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Summary');
|
||||
}
|
||||
|
@ -27,69 +23,6 @@ final class DifferentialSummaryField
|
|||
return $revision->getSummary();
|
||||
}
|
||||
|
||||
protected function writeValueToRevision(
|
||||
DifferentialRevision $revision,
|
||||
$value) {
|
||||
$revision->setSummary($value);
|
||||
}
|
||||
|
||||
public function readValueFromRequest(AphrontRequest $request) {
|
||||
$this->setValue($request->getStr($this->getFieldKey()));
|
||||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
return id(new PhabricatorRemarkupControl())
|
||||
->setUser($this->getViewer())
|
||||
->setName($this->getFieldKey())
|
||||
->setValue($this->getValue())
|
||||
->setError($this->getFieldError())
|
||||
->setLabel($this->getFieldName());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionTitle(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
$author_phid = $xaction->getAuthorPHID();
|
||||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
return pht(
|
||||
'%s updated the summary for this revision.',
|
||||
$xaction->renderHandleLink($author_phid));
|
||||
}
|
||||
|
||||
public function getApplicationTransactionTitleForFeed(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
|
||||
$object_phid = $xaction->getObjectPHID();
|
||||
$author_phid = $xaction->getAuthorPHID();
|
||||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
return pht(
|
||||
'%s updated the summary for %s.',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($object_phid));
|
||||
}
|
||||
|
||||
public function getApplicationTransactionHasChangeDetails(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getApplicationTransactionChangeDetails(
|
||||
PhabricatorApplicationTransaction $xaction,
|
||||
PhabricatorUser $viewer) {
|
||||
return $xaction->renderTextCorpusChangeDetails(
|
||||
$viewer,
|
||||
$xaction->getOldValue(),
|
||||
$xaction->getNewValue());
|
||||
}
|
||||
|
||||
public function shouldHideInApplicationTransactions(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
return ($xaction->getOldValue() === null);
|
||||
}
|
||||
|
||||
public function shouldAppearInGlobalSearch() {
|
||||
return true;
|
||||
}
|
||||
|
@ -125,23 +58,6 @@ final class DifferentialSummaryField
|
|||
return new PHUIRemarkupView($this->getViewer(), $this->getValue());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionRemarkupBlocks(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
return array($xaction->getNewValue());
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessageTemplate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldOverwriteWhenCommitMessageIsEdited() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInTransactionMail() {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue