Skip to content

Commit

Permalink
Adds option to show real name on user popup list (#10444)
Browse files Browse the repository at this point in the history
[NEW] Shows user's real name on autocomplete popup
  • Loading branch information
gdelavald authored and rodrigok committed Apr 16, 2018
1 parent c4c0f67 commit b703b94
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/rocketchat-ui/client/components/popupList.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
<span class="rc-popup-list__item-image">
{{>avatar username=item.username}}
</span>
<span class="rc-popup-list__item-name">{{{modifier item.username}}}</span>
{{#if showRealNames}}
<span class="rc-popup-list__item-name">{{item.name}} ({{{modifier item.username}}})</span>
{{else}}
<span class="rc-popup-list__item-name">{{{modifier item.username}}}</span>
{{/if}}
</li>
</template>
6 changes: 6 additions & 0 deletions packages/rocketchat-ui/client/components/popupList.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ Template.popupList_default.helpers({
};
}
});

Template.popupList_item_default.helpers({
showRealNames() {
return RocketChat.settings.get('UI_Use_Real_Name');
}
});

0 comments on commit b703b94

Please sign in to comment.