Page MenuHomePhabricator

D11811.id28471.diff
No OneTemporary

D11811.id28471.diff

diff --git a/src/applications/differential/controller/DifferentialChangesetViewController.php b/src/applications/differential/controller/DifferentialChangesetViewController.php
--- a/src/applications/differential/controller/DifferentialChangesetViewController.php
+++ b/src/applications/differential/controller/DifferentialChangesetViewController.php
@@ -209,10 +209,10 @@
$parser->setMarkupEngine($engine);
$parser->setUser($request->getUser());
- if ($request->isAjax()) {
- $parser->setShowEditAndReplyLinks(true);
- } else {
+ if (!$request->isAjax() || $request->getExists('noEdit')) {
$parser->setShowEditAndReplyLinks(false);
+ } else {
+ $parser->setShowEditAndReplyLinks(true);
}
$output = $parser->render($range_s, $range_e, $mask);
diff --git a/src/applications/differential/controller/DifferentialDiffViewController.php b/src/applications/differential/controller/DifferentialDiffViewController.php
--- a/src/applications/differential/controller/DifferentialDiffViewController.php
+++ b/src/applications/differential/controller/DifferentialDiffViewController.php
@@ -27,15 +27,18 @@
$error_view = id(new PHUIErrorView())
->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
if ($diff->getRevisionID()) {
+ $link = phutil_tag(
+ 'a',
+ array(
+ 'href' => '/D'.$diff->getRevisionID(),
+ ),
+ 'D'.$diff->getRevisionID());
$error_view->appendChild(
pht(
- 'This diff belongs to revision %s.',
- phutil_tag(
- 'a',
- array(
- 'href' => '/D'.$diff->getRevisionID(),
- ),
- 'D'.$diff->getRevisionID())));
+ 'This diff belongs to revision %s. Please visit %s to leave '.
+ 'comments and / or respond to existing comments.',
+ $link,
+ $link));
} else {
// TODO: implement optgroup support in AphrontFormSelectControl?
$select = array();
@@ -126,6 +129,7 @@
->setVisibleChangesets($changesets)
->setRenderingReferences($refs)
->setStandaloneURI('/differential/changeset/')
+ ->setRenderURI('/differential/changeset/?noEdit')
->setDiff($diff)
->setTitle(pht('Diff %d', $diff->getID()))
->setUser($request->getUser());
diff --git a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
--- a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
+++ b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
@@ -62,6 +62,7 @@
}
$max_id = $diff->getID();
+ $revision_id = $diff->getRevisionID();
$idx = 0;
$rows = array();
@@ -169,12 +170,21 @@
}
$last_base = $base;
- $id_link = phutil_tag(
- 'a',
- array(
- 'href' => '/differential/diff/'.$id.'/',
- ),
- $id);
+ if ($revision_id) {
+ $id_link = phutil_tag(
+ 'a',
+ array(
+ 'href' => '/D'.$revision_id.'?id='.$id,
+ ),
+ $id);
+ } else {
+ $id_link = phutil_tag(
+ 'a',
+ array(
+ 'href' => '/differential/diff/'.$id.'/',
+ ),
+ $id);
+ }
$rows[] = array(
$name,
diff --git a/src/applications/differential/view/DifferentialTransactionView.php b/src/applications/differential/view/DifferentialTransactionView.php
--- a/src/applications/differential/view/DifferentialTransactionView.php
+++ b/src/applications/differential/view/DifferentialTransactionView.php
@@ -143,15 +143,21 @@
$is_visible = ($changeset_diff_id == $visible_diff_id);
if (!$is_visible) {
- $item['where'] = pht('(On Diff #%d)', $changeset_diff_id);
-
$revision_id = $this->getRevision()->getID();
$comment_id = $comment->getID();
-
- $item['href'] =
+ $href =
'/D'.$revision_id.
'?id='.$changeset_diff_id.
'#inline-'.$comment_id;
+
+ $item['where'] = phutil_tag(
+ 'a',
+ array(
+ 'href' => $href,
+ ),
+ pht('(On Diff #%d)', $changeset_diff_id));
+
+ $item['href'] = $href;
}
$items[] = $item;

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 1, 4:13 PM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7661708
Default Alt Text
D11811.id28471.diff (4 KB)

Event Timeline