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:
		@@ -143,6 +143,9 @@ final class ManiphestTaskDetailController extends ManiphestController {
 | 
			
		||||
      ->setViewer($viewer)
 | 
			
		||||
      ->buildEditEngineCommentView($task);
 | 
			
		||||
 | 
			
		||||
    $timeline->setQuoteRef($monogram);
 | 
			
		||||
    $comment_view->setTransactionTimeline($timeline);
 | 
			
		||||
 | 
			
		||||
    return $this->newPage()
 | 
			
		||||
      ->setTitle($title)
 | 
			
		||||
      ->setCrumbs($crumbs)
 | 
			
		||||
 
 | 
			
		||||
@@ -73,7 +73,6 @@ final class ManiphestEditEngine
 | 
			
		||||
    // - Don't show "change status" for closed tasks.
 | 
			
		||||
    // - Don't show "change owner" for closed tasks.
 | 
			
		||||
    // - Don't let users change a task status to "Duplicate".
 | 
			
		||||
    // - Make sure "Quote" works.
 | 
			
		||||
    // - When closing an unassigned task, assign the closing user.
 | 
			
		||||
    // - Make sure implicit CCs on actions are working reasonably.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -64,8 +64,9 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
 | 
			
		||||
      ),
 | 
			
		||||
      $source_code);
 | 
			
		||||
 | 
			
		||||
    $monogram = $paste->getMonogram();
 | 
			
		||||
    $crumbs = $this->buildApplicationCrumbs()
 | 
			
		||||
      ->addTextCrumb('P'.$paste->getID(), '/P'.$paste->getID());
 | 
			
		||||
      ->addTextCrumb($monogram, '/'.$monogram);
 | 
			
		||||
 | 
			
		||||
    $timeline = $this->buildTransactionTimeline(
 | 
			
		||||
      $paste,
 | 
			
		||||
@@ -75,6 +76,9 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
 | 
			
		||||
      ->setViewer($viewer)
 | 
			
		||||
      ->buildEditEngineCommentView($paste);
 | 
			
		||||
 | 
			
		||||
    $timeline->setQuoteRef($monogram);
 | 
			
		||||
    $comment_view->setTransactionTimeline($timeline);
 | 
			
		||||
 | 
			
		||||
    return $this->newPage()
 | 
			
		||||
      ->setTitle($paste->getFullName())
 | 
			
		||||
      ->setCrumbs($crumbs)
 | 
			
		||||
 
 | 
			
		||||
@@ -23,6 +23,7 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView {
 | 
			
		||||
  private $currentVersion;
 | 
			
		||||
  private $versionedDraft;
 | 
			
		||||
  private $editTypes;
 | 
			
		||||
  private $transactionTimeline;
 | 
			
		||||
 | 
			
		||||
  public function setObjectPHID($object_phid) {
 | 
			
		||||
    $this->objectPHID = $object_phid;
 | 
			
		||||
@@ -110,8 +111,16 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView {
 | 
			
		||||
    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();
 | 
			
		||||
    if (!$user->isLoggedIn()) {
 | 
			
		||||
      $uri = id(new PhutilURI('/login/'))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user