diff --git a/src/applications/differential/controller/base/DifferentialController.php b/src/applications/differential/controller/base/DifferentialController.php index 12dabd77d2..3a95ab8659 100644 --- a/src/applications/differential/controller/base/DifferentialController.php +++ b/src/applications/differential/controller/base/DifferentialController.php @@ -29,27 +29,11 @@ abstract class DifferentialController extends PhabricatorController { $viewer_is_anonymous = !$this->getRequest()->getUser()->isLoggedIn(); $page = $this->buildStandardPageView(); - $page->setApplicationName('Differential'); $page->setBaseURI('/differential/'); $page->setTitle(idx($data, 'title')); $page->setGlyph("\xE2\x9A\x99"); $page->appendChild($view); - $tabs = array( - 'revisions' => array( - 'name' => 'Revisions', - 'href' => '/differential/', - ) - ); - if (!$viewer_is_anonymous) { - $tabs = array_merge($tabs, array( - 'create' => array( - 'name' => 'Create Diff', - 'href' => '/differential/diff/create/', - ) - )); - } - $page->setTabs($tabs, idx($data, 'tab')); $page->setIsLoggedOut($viewer_is_anonymous); $response = new AphrontWebpageResponse(); diff --git a/src/applications/differential/controller/diffcreate/DifferentialDiffCreateController.php b/src/applications/differential/controller/diffcreate/DifferentialDiffCreateController.php index c21ded7164..b7cd188dae 100644 --- a/src/applications/differential/controller/diffcreate/DifferentialDiffCreateController.php +++ b/src/applications/differential/controller/diffcreate/DifferentialDiffCreateController.php @@ -45,13 +45,22 @@ class DifferentialDiffCreateController extends DifferentialController { } $form = new AphrontFormView(); + $arcanist_href = PhabricatorEnv::getDoclink( + 'article/Arcanist_User_Guide.html'); + $arcanist_link = phutil_render_tag( + 'a', + array( + 'href' => $arcanist_href, + 'target' => '_blank', + ), + 'Arcanist'); $form ->setAction('/differential/diff/create/') ->setEncType('multipart/form-data') ->setUser($request->getUser()) ->appendChild( '
The best way to create a '. - 'Differential diff is by using Arcanist, but you '. + "Differential diff is by using $arcanist_link, but you ". 'can also just paste a diff (e.g., from svn diff or '. 'git diff) into this box or upload it as a file if you '. 'really want.
') diff --git a/src/applications/differential/controller/diffcreate/__init__.php b/src/applications/differential/controller/diffcreate/__init__.php index 3bc3857036..ed4884c321 100644 --- a/src/applications/differential/controller/diffcreate/__init__.php +++ b/src/applications/differential/controller/diffcreate/__init__.php @@ -13,12 +13,14 @@ phutil_require_module('phabricator', 'applications/differential/constants/lintst phutil_require_module('phabricator', 'applications/differential/controller/base'); phutil_require_module('phabricator', 'applications/differential/storage/diff'); phutil_require_module('phabricator', 'applications/files/storage/file'); +phutil_require_module('phabricator', 'infrastructure/env'); phutil_require_module('phabricator', 'view/form/base'); phutil_require_module('phabricator', 'view/form/control/file'); phutil_require_module('phabricator', 'view/form/control/submit'); phutil_require_module('phabricator', 'view/form/control/textarea'); phutil_require_module('phabricator', 'view/layout/panel'); +phutil_require_module('phutil', 'markup'); phutil_require_module('phutil', 'utils'); diff --git a/src/applications/differential/controller/revisionlist/DifferentialRevisionListController.php b/src/applications/differential/controller/revisionlist/DifferentialRevisionListController.php index 4d9f144bc4..3d4332664c 100644 --- a/src/applications/differential/controller/revisionlist/DifferentialRevisionListController.php +++ b/src/applications/differential/controller/revisionlist/DifferentialRevisionListController.php @@ -233,10 +233,26 @@ class DifferentialRevisionListController extends DifferentialController { array( $view_phid => $handles[$view_phid]->getFullName(), )) - ->setLimit(1)); - + ->setLimit(1)) + ->appendChild( + id(new AphrontFormSubmitControl()) + ->setValue('Filter Revisions')); $filter_view = new AphrontListFilterView(); $filter_view->appendChild($filter_form); + + $viewer_is_anonymous = !$this->getRequest()->getUser()->isLoggedIn(); + if (!$viewer_is_anonymous) { + $create_uri = new PhutilURI('/differential/diff/create/'); + $filter_view->addButton( + phutil_render_tag( + 'a', + array( + 'href' => (string)$create_uri, + 'class' => 'green button', + ), + 'Create Revision')); + } + $side_nav->appendChild($filter_view); } diff --git a/src/applications/differential/controller/revisionlist/__init__.php b/src/applications/differential/controller/revisionlist/__init__.php index 9a6525b135..b22360ded1 100644 --- a/src/applications/differential/controller/revisionlist/__init__.php +++ b/src/applications/differential/controller/revisionlist/__init__.php @@ -14,12 +14,14 @@ phutil_require_module('phabricator', 'applications/differential/view/revisionlis phutil_require_module('phabricator', 'applications/phid/handle/data'); phutil_require_module('phabricator', 'storage/queryfx'); phutil_require_module('phabricator', 'view/form/base'); +phutil_require_module('phabricator', 'view/form/control/submit'); phutil_require_module('phabricator', 'view/form/control/tokenizer'); phutil_require_module('phabricator', 'view/layout/listfilter'); phutil_require_module('phabricator', 'view/layout/panel'); phutil_require_module('phabricator', 'view/layout/sidenav'); phutil_require_module('phutil', 'markup'); +phutil_require_module('phutil', 'parser/uri'); phutil_require_module('phutil', 'utils');