Add autocompletion in textarea for user mentions

This commit is contained in:
Frederic Guillot
2015-12-29 18:44:21 +01:00
parent b4c5e36ee4
commit 178eda1887
18 changed files with 2773 additions and 7 deletions

View File

@@ -21,4 +21,17 @@ class UserHelper extends Base
$users = $this->userFilterAutoCompleteFormatter->create($search)->filterByUsernameOrByName()->format();
$this->response->json($users);
}
/**
* User mention autocompletion (Ajax)
*
* @access public
*/
public function mention()
{
$project_id = $this->request->getStringParam('project_id');
$query = $this->request->getStringParam('q');
$users = $this->projectPermission->findUsernames($project_id, $query);
$this->response->json($users);
}
}