Add a contextual "scope" dropdown for searches
Summary: Add a "Search for ... in (document group)" thing that picks the current scope based on the current application. Test Plan: Conducted searches in several browsers. Reviewers: btrahan, skrul Reviewed By: btrahan CC: aran, epriestley Maniphest Tasks: T858 Differential Revision: https://secure.phabricator.com/D1610
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,6 +35,7 @@ abstract class DifferentialController extends PhabricatorController {
|
||||
$page->setGlyph("\xE2\x9A\x99");
|
||||
$page->appendChild($view);
|
||||
$page->setIsLoggedOut($viewer_is_anonymous);
|
||||
$page->setSearchDefaultScope(PhabricatorSearchScope::SCOPE_OPEN_REVISIONS);
|
||||
|
||||
$response = new AphrontWebpageResponse();
|
||||
return $response->setContent($page->render());
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
phutil_require_module('phabricator', 'aphront/response/webpage');
|
||||
phutil_require_module('phabricator', 'applications/base/controller/base');
|
||||
phutil_require_module('phabricator', 'applications/search/constants/scope');
|
||||
phutil_require_module('phabricator', 'infrastructure/celerity/api');
|
||||
phutil_require_module('phabricator', 'infrastructure/env');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user