Add a basic search typeahead
Summary: This needs a bunch of refinement but pretty much works. Currently shows only users and applications. Plans: - Show actual search results too. - Clean up the datasource endpoint so it's less of a mess. - Make other typeaheads look more like this one. - Improve sorting. - Make object names hit the named objects as the first match. Test Plan: Will attach screenshots. Reviewers: btrahan, vrana, chad Reviewed By: vrana CC: aran Maniphest Tasks: T1569 Differential Revision: https://secure.phabricator.com/D3110
This commit is contained in:
@@ -30,15 +30,35 @@ abstract class PhabricatorApplication {
|
||||
|
||||
|
||||
public function getName() {
|
||||
return substr(__CLASS__, strlen('PhabricatorApplication'));
|
||||
return substr(get_class($this), strlen('PhabricatorApplication'));
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return $this->getName().' Application';
|
||||
}
|
||||
|
||||
public function isEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getPHID() {
|
||||
return 'PHID-APPS-'.get_class($this);
|
||||
}
|
||||
|
||||
/* -( Application Information )-------------------------------------------- */
|
||||
public function getTypeaheadURI() {
|
||||
return $this->getBaseURI();
|
||||
}
|
||||
|
||||
public function getBaseURI() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getIconURI() {
|
||||
return PhabricatorUser::getDefaultProfileImageURI();
|
||||
}
|
||||
|
||||
|
||||
/* -( URI Routing )-------------------------------------------------------- */
|
||||
|
||||
|
||||
public function getRoutes() {
|
||||
|
||||
Reference in New Issue
Block a user