Allow the users to view their unsubmitted inline comments in one view

Summary:
1. Created a filter for user comments that are not submitted yet
2. surface this information to the user by providing a "Draft revisions" link on the differential home page.

Test Plan: tested on one of the diffs

Reviewers: nh, epriestley

Reviewed By: epriestley

CC: aran, epriestley, jungejason

Differential Revision: https://secure.phabricator.com/D1927
This commit is contained in:
nileema
2012-03-19 18:35:32 -07:00
parent 9a5598118e
commit 238b403509
3 changed files with 36 additions and 0 deletions

View File

@@ -219,6 +219,7 @@ final class DifferentialRevisionListController extends DifferentialController {
array('revisions', 'Revisions'),
array('reviews', 'Reviews'),
array('subscribed', 'Subscribed'),
array('drafts', 'Draft Reviews'),
array(null, 'All Revisions'),
array('all', 'All'),
);
@@ -248,6 +249,7 @@ final class DifferentialRevisionListController extends DifferentialController {
'revisions' => true,
'reviews' => true,
'subscribed' => true,
'drafts' => true,
'all' => false,
);
if (!isset($requires[$filter])) {
@@ -262,6 +264,7 @@ final class DifferentialRevisionListController extends DifferentialController {
'revisions' => true,
'reviews' => true,
'subscribed' => true,
'drafts' => true,
'all' => true,
);
if (!isset($allows[$filter])) {
@@ -276,6 +279,7 @@ final class DifferentialRevisionListController extends DifferentialController {
'revisions' => array('phid', 'status', 'order'),
'reviews' => array('phid', 'status', 'order'),
'subscribed' => array('phid', 'status', 'order'),
'drafts' => array('phid', 'status', 'order'),
'all' => array('status', 'order'),
);
if (!isset($controls[$filter])) {
@@ -304,6 +308,9 @@ final class DifferentialRevisionListController extends DifferentialController {
case 'subscribed':
$query->withSubscribers(array($user_phid));
break;
case 'drafts':
$query->withDraftRepliesByAuthors(array($user_phid));
break;
case 'all':
break;
default:
@@ -416,6 +423,7 @@ final class DifferentialRevisionListController extends DifferentialController {
case 'revisions':
case 'reviews':
case 'subscribed':
case 'drafts':
case 'all':
$titles = array(
'revisions' => 'Revisions by Author',