mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 13:22:42 +01:00
Make "Quote" work with EditEngine in Paste and Maniphest
Summary: Ref T9132. This makes the "Quote" action on comments work properly in these applications. Test Plan: Quoted text in each application. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9132 Differential Revision: https://secure.phabricator.com/D14665
This commit is contained in:
parent
8bbea6d41c
commit
dd0b09a610
4 changed files with 18 additions and 3 deletions
|
@ -143,6 +143,9 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->buildEditEngineCommentView($task);
|
->buildEditEngineCommentView($task);
|
||||||
|
|
||||||
|
$timeline->setQuoteRef($monogram);
|
||||||
|
$comment_view->setTransactionTimeline($timeline);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
|
|
@ -73,7 +73,6 @@ final class ManiphestEditEngine
|
||||||
// - Don't show "change status" for closed tasks.
|
// - Don't show "change status" for closed tasks.
|
||||||
// - Don't show "change owner" for closed tasks.
|
// - Don't show "change owner" for closed tasks.
|
||||||
// - Don't let users change a task status to "Duplicate".
|
// - Don't let users change a task status to "Duplicate".
|
||||||
// - Make sure "Quote" works.
|
|
||||||
// - When closing an unassigned task, assign the closing user.
|
// - When closing an unassigned task, assign the closing user.
|
||||||
// - Make sure implicit CCs on actions are working reasonably.
|
// - Make sure implicit CCs on actions are working reasonably.
|
||||||
|
|
||||||
|
|
|
@ -64,8 +64,9 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
|
||||||
),
|
),
|
||||||
$source_code);
|
$source_code);
|
||||||
|
|
||||||
|
$monogram = $paste->getMonogram();
|
||||||
$crumbs = $this->buildApplicationCrumbs()
|
$crumbs = $this->buildApplicationCrumbs()
|
||||||
->addTextCrumb('P'.$paste->getID(), '/P'.$paste->getID());
|
->addTextCrumb($monogram, '/'.$monogram);
|
||||||
|
|
||||||
$timeline = $this->buildTransactionTimeline(
|
$timeline = $this->buildTransactionTimeline(
|
||||||
$paste,
|
$paste,
|
||||||
|
@ -75,6 +76,9 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->buildEditEngineCommentView($paste);
|
->buildEditEngineCommentView($paste);
|
||||||
|
|
||||||
|
$timeline->setQuoteRef($monogram);
|
||||||
|
$comment_view->setTransactionTimeline($timeline);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($paste->getFullName())
|
->setTitle($paste->getFullName())
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
|
|
@ -23,6 +23,7 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView {
|
||||||
private $currentVersion;
|
private $currentVersion;
|
||||||
private $versionedDraft;
|
private $versionedDraft;
|
||||||
private $editTypes;
|
private $editTypes;
|
||||||
|
private $transactionTimeline;
|
||||||
|
|
||||||
public function setObjectPHID($object_phid) {
|
public function setObjectPHID($object_phid) {
|
||||||
$this->objectPHID = $object_phid;
|
$this->objectPHID = $object_phid;
|
||||||
|
@ -110,8 +111,16 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView {
|
||||||
return $this->editTypes;
|
return $this->editTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render() {
|
public function setTransactionTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline) {
|
||||||
|
|
||||||
|
$timeline->setQuoteTargetID($this->getCommentID());
|
||||||
|
|
||||||
|
$this->transactionTimeline = $timeline;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render() {
|
||||||
$user = $this->getUser();
|
$user = $this->getUser();
|
||||||
if (!$user->isLoggedIn()) {
|
if (!$user->isLoggedIn()) {
|
||||||
$uri = id(new PhutilURI('/login/'))
|
$uri = id(new PhutilURI('/login/'))
|
||||||
|
|
Loading…
Reference in a new issue