Differential D8957 Diff 21317 src/applications/differential/controller/DifferentialRevisionViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/controller/DifferentialRevisionViewController.php
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
} | } | ||||
$comment_view = $this->buildTransactions( | $comment_view = $this->buildTransactions( | ||||
$revision, | $revision, | ||||
$diff_vs ? $diffs[$diff_vs] : $target, | $diff_vs ? $diffs[$diff_vs] : $target, | ||||
$target, | $target, | ||||
$all_changesets); | $all_changesets); | ||||
if (!$viewer_is_anonymous) { | |||||
$comment_view->setQuoteRef('D'.$revision->getID()); | |||||
$comment_view->setQuoteTargetID('comment-content'); | |||||
} | |||||
$wrap_id = celerity_generate_unique_node_id(); | $wrap_id = celerity_generate_unique_node_id(); | ||||
$comment_view = phutil_tag( | $comment_view = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'id' => $wrap_id, | 'id' => $wrap_id, | ||||
), | ), | ||||
$comment_view); | $comment_view); | ||||
▲ Show 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | if (!$viewer_is_anonymous) { | ||||
if ($review_warnings) { | if ($review_warnings) { | ||||
$review_warnings_panel = id(new AphrontErrorView()) | $review_warnings_panel = id(new AphrontErrorView()) | ||||
->setSeverity(AphrontErrorView::SEVERITY_WARNING) | ->setSeverity(AphrontErrorView::SEVERITY_WARNING) | ||||
->setErrors($review_warnings); | ->setErrors($review_warnings); | ||||
$comment_form->setErrorView($review_warnings_panel); | $comment_form->setErrorView($review_warnings_panel); | ||||
} | } | ||||
// TODO: Restore the ability for fields to add accept warnings. | |||||
$comment_form->setActions($this->getRevisionCommentActions($revision)); | $comment_form->setActions($this->getRevisionCommentActions($revision)); | ||||
$action_uri = $this->getApplicationURI( | $action_uri = $this->getApplicationURI( | ||||
'comment/save/'.$revision->getID().'/'); | 'comment/save/'.$revision->getID().'/'); | ||||
$comment_form->setActionURI($action_uri); | $comment_form->setActionURI($action_uri); | ||||
$comment_form->setUser($user); | $comment_form->setUser($user); | ||||
$comment_form->setDraft($draft); | $comment_form->setDraft($draft); | ||||
$comment_form->setReviewers(mpull($reviewers, 'getFullName', 'getPHID')); | $comment_form->setReviewers(mpull($reviewers, 'getFullName', 'getPHID')); | ||||
Show All 24 Lines | $page_pane = id(new DifferentialPrimaryPaneView()) | ||||
$diff_history, | $diff_history, | ||||
$warning, | $warning, | ||||
$local_view, | $local_view, | ||||
$toc_view, | $toc_view, | ||||
$other_view, | $other_view, | ||||
$changeset_view, | $changeset_view, | ||||
)); | )); | ||||
if ($comment_form) { | if ($comment_form) { | ||||
$page_pane->appendChild($comment_form); | $page_pane->appendChild($comment_form); | ||||
} else { | } else { | ||||
// TODO: For now, just use this to get "Login to Comment". | // TODO: For now, just use this to get "Login to Comment". | ||||
$page_pane->appendChild( | $page_pane->appendChild( | ||||
id(new PhabricatorApplicationTransactionCommentView()) | id(new PhabricatorApplicationTransactionCommentView()) | ||||
->setUser($user) | ->setUser($user) | ||||
->setRequestURI($request->getRequestURI())); | ->setRequestURI($request->getRequestURI())); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 532 Lines • Show Last 20 Lines |