diff --git a/README.md b/README.md index 9330cb0..b233f9e 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ should find them. * We allow this page to be `frameable` so we can embed it in other dashboards * *Change* to ProjectBoardTaskCard * We display the current status on the task. + * Add project logical viewer for project or user function so we can do viewerprojects() in queries. * Repository * Pointing clone URIs to the Phabricator URI even if a repo is hosted elsewhere. * added buildable interface for push log for harbormaster builds for refs diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 9fdca95..1c6f48d 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -26,6 +26,7 @@ 'PhabricatorDaemonsPrometheusMetric' => 'applications/daemon/metric/PhabricatorDaemonsPrometheusMetric.php', 'PhabricatorGoogleAuthProvider' => 'applications/auth/provider/PhabricatorGoogleAuthProvider.php', 'PhabricatorProjectBoardViewController' => 'applications/project/controller/PhabricatorProjectBoardViewController.php', + 'PhabricatorProjectOrUserFunctionDatasource' => 'applications/project/typeahead/PhabricatorProjectOrUserFunctionDatasource.php', 'PhabricatorPrometheusApplication' => 'applications/prometheus/application/PhabricatorPrometheusApplication.php', 'PhabricatorPrometheusMetric' => 'applications/prometheus/metrics/PhabricatorPrometheusMetric.php', 'PhabricatorPrometheusMetricCounter' => 'applications/prometheus/metrics/PhabricatorPrometheusMetricCounter.php', @@ -64,6 +65,7 @@ 'PhabricatorDaemonsPrometheusMetric' => 'PhabricatorPrometheusMetricGauge', 'PhabricatorGoogleAuthProvider' => 'PhabricatorOAuth2AuthProvider', 'PhabricatorProjectBoardViewController' => 'PhabricatorProjectBoardController', + 'PhabricatorProjectOrUserFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 'PhabricatorPrometheusApplication' => 'PhabricatorApplication', 'PhabricatorPrometheusMetric' => 'Phobject', 'PhabricatorPrometheusMetricCounter' => 'PhabricatorPrometheusMetric', diff --git a/src/applications/project/typeahead/PhabricatorProjectOrUserFunctionDatasource.php b/src/applications/project/typeahead/PhabricatorProjectOrUserFunctionDatasource.php new file mode 100644 index 0000000..850ff21 --- /dev/null +++ b/src/applications/project/typeahead/PhabricatorProjectOrUserFunctionDatasource.php @@ -0,0 +1,28 @@ +<?php + +final class PhabricatorProjectOrUserFunctionDatasource + extends PhabricatorTypeaheadCompositeDatasource { + + public function getBrowseTitle() { + return pht('Browse Users and Projects'); + } + + public function getPlaceholderText() { + return pht('Type a user, project name, or function...'); + } + + public function getComponentDatasources() { + return array( + new PhabricatorViewerDatasource(), + new PhabricatorPeopleDatasource(), + new PhabricatorProjectDatasource(), + new PhabricatorProjectMembersDatasource(), + // TM CHANGES + new PhabricatorProjectLogicalViewerDatasource(), + // TM CHANGES END + new PhabricatorProjectUserFunctionDatasource(), + ); + } + + +}