Add suggest menu for user mentions in text editor

This commit is contained in:
Frederic Guillot
2016-11-27 15:44:45 -05:00
parent 04ff67e26b
commit d8b0423d15
21 changed files with 454 additions and 30 deletions

View File

@@ -4,6 +4,7 @@ namespace Kanboard\Controller;
use Kanboard\Filter\UserNameFilter;
use Kanboard\Formatter\UserAutoCompleteFormatter;
use Kanboard\Formatter\UserMentionFormatter;
use Kanboard\Model\UserModel;
/**
@@ -37,7 +38,12 @@ class UserAjaxController extends BaseController
$project_id = $this->request->getStringParam('project_id');
$query = $this->request->getStringParam('q');
$users = $this->projectPermissionModel->findUsernames($project_id, $query);
$this->response->json($users);
$this->response->json(
UserMentionFormatter::getInstance($this->container)
->withUsers($users)
->format()
);
}
/**