summaryrefslogtreecommitdiff
path: root/app/Controller/UserAjaxController.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-11-27 15:44:45 -0500
committerFrederic Guillot <fred@kanboard.net>2016-11-27 15:44:45 -0500
commitd8b0423d152ca27682b001f2c4d386d9c5dd361e (patch)
tree8b4919d5296b857bcf74e81c8cc06729ddfce5e5 /app/Controller/UserAjaxController.php
parent04ff67e26b880dde8bfb6462f312cf434457cd46 (diff)
Add suggest menu for user mentions in text editor
Diffstat (limited to 'app/Controller/UserAjaxController.php')
-rw-r--r--app/Controller/UserAjaxController.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/Controller/UserAjaxController.php b/app/Controller/UserAjaxController.php
index ed180471..0e654333 100644
--- a/app/Controller/UserAjaxController.php
+++ b/app/Controller/UserAjaxController.php
@@ -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()
+ );
}
/**