From b703b94f58c15cea876c599ff380328da830c5ae Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Mon, 16 Apr 2018 11:28:34 -0300 Subject: [PATCH] Adds option to show real name on user popup list (#10444) [NEW] Shows user's real name on autocomplete popup --- packages/rocketchat-ui/client/components/popupList.html | 6 +++++- packages/rocketchat-ui/client/components/popupList.js | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/rocketchat-ui/client/components/popupList.html b/packages/rocketchat-ui/client/components/popupList.html index a0450ca1db94..ce6e0f77a7e0 100644 --- a/packages/rocketchat-ui/client/components/popupList.html +++ b/packages/rocketchat-ui/client/components/popupList.html @@ -19,6 +19,10 @@ {{>avatar username=item.username}} - {{{modifier item.username}}} + {{#if showRealNames}} + {{item.name}} ({{{modifier item.username}}}) + {{else}} + {{{modifier item.username}}} + {{/if}} diff --git a/packages/rocketchat-ui/client/components/popupList.js b/packages/rocketchat-ui/client/components/popupList.js index 32be871dd80c..ac13e550bc99 100644 --- a/packages/rocketchat-ui/client/components/popupList.js +++ b/packages/rocketchat-ui/client/components/popupList.js @@ -29,3 +29,9 @@ Template.popupList_default.helpers({ }; } }); + +Template.popupList_item_default.helpers({ + showRealNames() { + return RocketChat.settings.get('UI_Use_Real_Name'); + } +});